mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-25 04:38:05 +11:00
Add a layer of indirection for KEY
This commit is contained in:
parent
446a58006d
commit
0b3a328e65
18
blk/081
18
blk/081
@ -1,16 +1,16 @@
|
||||
(cont.)
|
||||
RAMSTART INITIAL_SP +55 RESERVED
|
||||
+02 CURRENT +57 readln's variables
|
||||
+04 HERE +59 blk's variables
|
||||
+06 C<? +5b z80a's variables
|
||||
+08 C<* override +5d adev's variables
|
||||
+0a PARSEPTR +5f FUTURE USES
|
||||
+0c C<* +70 DRIVERS
|
||||
+0e WORDBUF +80 RAMEND
|
||||
RAMSTART INITIAL_SP +55 (key) override
|
||||
+02 CURRENT +57 readln's variables
|
||||
+04 HERE +59 blk's variables
|
||||
+06 C<? +5b z80a's variables
|
||||
+08 C<* override +5d adev's variables
|
||||
+0a PARSEPTR +5f FUTURE USES
|
||||
+0c C<* +70 DRIVERS
|
||||
+0e WORDBUF +80 RAMEND
|
||||
+2e BOOT C< PTR
|
||||
+4e INTJUMP
|
||||
+51 CURRENTPTR
|
||||
+53 (emit) over.
|
||||
+53 (emit) override
|
||||
|
||||
|
||||
(cont.)
|
||||
|
2
blk/359
2
blk/359
@ -1,4 +1,4 @@
|
||||
: KEY
|
||||
: (key)
|
||||
( inc then fetch )
|
||||
ACIAR> @ 1+ DUP ACIA) @ = IF
|
||||
DROP ACIA( @
|
||||
|
1
blk/405
1
blk/405
@ -4,6 +4,7 @@
|
||||
CURRENT @ 0x2e RAM+ ! ( 2e == BOOT C< PTR )
|
||||
0 0x08 RAM+ ! ( 08 == C<* override )
|
||||
0 0x53 RAM+ ! ( 53 == (emit) override )
|
||||
0 0x55 RAM+ ! ( 55 == (key) override )
|
||||
( 0c == C<* )
|
||||
LIT< (boot<) (find) DROP 0x0c RAM+ !
|
||||
( boot< always has a char waiting. 06 == C<?* )
|
||||
|
6
blk/454
6
blk/454
@ -7,9 +7,9 @@
|
||||
SPC BS
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
: KEY
|
||||
85 RAM+ @ ( (key) override )
|
||||
DUP IF EXECUTE ELSE DROP (key) THEN ;
|
||||
|
||||
|
||||
( cont.: read one char into input buffer and returns whether we
|
||||
|
2
blk/493
2
blk/493
@ -1,4 +1,4 @@
|
||||
CODE KEY
|
||||
CODE (key)
|
||||
A 0x01 LDrn, ( @KEY )
|
||||
0x28 RSTn,
|
||||
L A LDrr, H 0 LDrn,
|
||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
@ -16,8 +16,7 @@ H@ 256 /MOD 2 PC! 2 PC!
|
||||
( Update LATEST )
|
||||
PC ORG @ 8 + !
|
||||
," CURRENT @ HERE ! "
|
||||
," : (emit) 0 PC! ; "
|
||||
," : KEY 0 PC@ ; "
|
||||
," : (emit) 0 PC! ; : (key) 0 PC@ ; "
|
||||
422 470 XPACKR
|
||||
," ' KEY 12 RAM+ ! "
|
||||
," ' (key) 12 RAM+ ! "
|
||||
H@ 256 /MOD 2 PC! 2 PC!
|
||||
|
Loading…
Reference in New Issue
Block a user