<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>
In Compilation Words in TurboForth Kernal
Aligns H to the next (highest) even compilation address. Takes no action if H is already even.
H @ $.
(TurboForth displays an odd value)
ALIGN H @ $.
(TurboForth aligns H/HERE, displaying an even value)
Dictionary entries and executable code must align on even addresses. HEADER automatically calls ALIGN before creating dictionary entries, but sometimes H or HERE can be left with an odd value. The most common cause of this is the word C, which compiles a single byte to memory. In such situations where an odd value in H/HERE is undesirable, ALIGN will align H to the next even value. Note that if H is already aligned to an even address then ALIGN shall take no action.