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

VALUE - as in Forth2012 #88

Closed
mitra42 opened this issue Feb 14, 2021 · 2 comments
Closed

VALUE - as in Forth2012 #88

mitra42 opened this issue Feb 14, 2021 · 2 comments

Comments

@mitra42
Copy link
Owner

mitra42 commented Feb 14, 2021

Forth2012 has VALUE instead of USER which fits in as follows

Type Initialized Definition Fetch Store
VALUE Y 11 VALUE bar bar 22 TO bar
CONSTANT Y 11 CONSTANT bar bar N/A
VARIABLE N VARIABLE bar bar @ 22 bar !
USER Y offset USER bar 11 bar ! bar @ 22 bar !

This is going to cause issues as move to multitasking, but USER has to be restructured then anyway

@mitra42
Copy link
Owner Author

mitra42 commented Feb 15, 2021

Design outline ...

  • Define structure
  • Think through this._USER and put in USER variable itself
  • Define tokenValue - like tokenUser with extra fetch
  • (if reqd) Function tacked onto BuildUser that creates structure instead of tokenUser, depending on some flag
  • Function VALUE() as Forthable replacable function - if reqd
  • TO needs to store using >BODY, >BODY needs extending to cover indirection to user area
  • Replace USER with VALUE as Forth function
  • Go through code and replace in buildUser, other places _USER or USER are used, also check on uses of VARIABLE
  • Port Arduino (flagged in code)

@mitra42
Copy link
Owner Author

mitra42 commented Feb 15, 2021

  • Structure: tokenValue offset in ROM - one cell of user space
  • _USER becomes Ufetch(0)
  • Simple for now - if weren't using UserArea then we'd probably need to link them and store an initiation value

@mitra42 mitra42 closed this as completed Feb 21, 2021
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

1 participant