mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 19:48:06 +11:00
a9ed8da0b2
The previous approach of maintaining R> and W> pointers was conceptually simple, but made INT handler code actually quite complex. Now, we maintain indexes instead. It's much easier to perform bounds checks and to compare for equality, something we have to do quick in the INT handler.
12 lines
189 B
Plaintext
12 lines
189 B
Plaintext
( n -- )
|
|
: OP3n
|
|
CREATE C,
|
|
DOES>
|
|
C@ A,
|
|
A,,
|
|
;
|
|
0xcd OP3n CALL,
|
|
0xc3 OP3n JP,
|
|
0x22 OP3n LD(n)HL, 0x2a OP3n LDHL(n),
|
|
0x32 OP3n LD(i)A, 0x3a OP3n LDA(i),
|