ams-hackers / gbforth

👾 A Forth-based Game Boy development kit
https://gbforth.org
MIT License
128 stars 24 forks source link

Export rom-move instead of <rom #299

Closed tkers closed 5 years ago

tkers commented 5 years ago

We exported <rom before for being a bit more reusable, but it seems like it would usually be used to do a rom-move (maybe a better name is possible) anyway.

tkers commented 5 years ago

Gforth exposes a word mem, that is defined as:

: mem,
  here over allot swap move ;

which is practically the same as the here [host] <rom swap move [target] dup allot that was used in the Sokoban example (except the rom offset to host address conversion).

Does not seem to be ANS standard, but might make sense to use this name instead of rom-move (which to me suggest it would have a similar signature as move, instead of ,).