home .. forth .. nosc mail list archive ..

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

--- Steve Smith <steve@xxxxxxxxxxxxxxxxxxxx> wrote:
> 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@ ?

Hmm, well now my ignorance is exposed.  I didn't know that I had to deal with
both cell addresses and byte address--I assumed all addresses were byte

I tried replacing "[ hw ] 13 type" with "[ hw 2* 2* ] 13 type", but now I just
get 13 garbage characters displayed on the screen.  I'll play around with it a
little more, now that I know I need to investigate the different address types.

FWIW, the '1@', 'string', and 'type' words that I'm using were copied from
blocks 42 and 48 of the patched colorForth available from my site.  I believe I
am using them the same way that they are used in those blocks.  I don't see any
adjustments being made for cell-vs.-byte issues.

-- Kris

Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger

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