home .. forth .. colorforth mail list archive ..

[colorforth] New, Improved "Hello, World!"


In article <MDAEMON-F200107281512.AA123790md80000130173@chaossolutions.o
rg>, Kristopher Johnson <kristopher_d_johnson@xxxxxxxxx> writes
>I've made an attempt at a better "Hello, world!" program.  But it doesn't work
>and I can't figure out why.
>
>macro
>: 1@ ( a-c ) 8a 2, ;  \ retrieve byte at address
>forth
Kris,

Did you allow for the fact that 1@ expects a byte address on the stack
and the pop used to get the string address may be returning a cell
address and therefore needs to be multiplied by 4 to be used by 1@ ?

Cheers,

Steve.
-- 
Steve Smith
steve@xxxxxxxxxxxxxxxxxxxx
------------------------

To Unsubscribe from this list, send mail to Mdaemon@xxxxxxxxxxxxxxxxxx with:
unsubscribe ColorForth
as the first and only line within the message body
Problems   -   List-Admin@xxxxxxxxxxxxxxxxxx
Main ColorForth site   -   http://www.colorforth.com