mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 09:48:05 +11:00
de7cb4a80f
This would be useful, for example, to allow the assembler to write straight to an AT28 EEPROM without going to RAM. This would be a life saver in machines with tight RAM such as the SMS.
11 lines
272 B
Plaintext
11 lines
272 B
Plaintext
VARIABLE ORG
|
|
VARIABLE L1 VARIABLE L2 VARIABLE L3 VARIABLE L4
|
|
: SPLITB
|
|
256 /MOD SWAP
|
|
;
|
|
( We divide by 2 because each PC represents a word. )
|
|
: PC H@ ORG @ - 1 RSHIFT ;
|
|
( A, spits an assembled byte, A,, spits an assembled word
|
|
Both increase PC. )
|
|
: A,, SPLITB A, A, ;
|