Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate line in hello_world #17

Open
agsb opened this issue Jul 15, 2024 · 3 comments
Open

duplicate line in hello_world #17

agsb opened this issue Jul 15, 2024 · 3 comments

Comments

@agsb
Copy link

agsb commented Jul 15, 2024

: lit rp@ @ dup 2 + rp@ ! @ ;

: ['] rp@ @ dup 2 + rp@ ! @ ;

Both in hello_world.Forth.

Maybe a error ?

@agsb
Copy link
Author

agsb commented Jul 15, 2024

or use

: ['] lit ;

@ruv
Copy link

ruv commented Sep 15, 2024

or use

: ['] lit ;

It is incorrect, because lit does manipulation of the return address (see also my explanation).

This word ['] can be defined via lit as follows:

: ['] lit lit , ; immediate

NB: this word is not standard, the standard word ['] shall do parsing.

@agsb
Copy link
Author

agsb commented Sep 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants