1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-26 19:48:06 +11:00

Compare commits

..

4 Commits

Author SHA1 Message Date
Virgil Dupras
0b3a328e65 Add a layer of indirection for KEY 2020-05-02 11:17:28 -04:00
Virgil Dupras
446a58006d Remove one of the 2 indirection layers for EMIT
2 was overkill
2020-05-02 10:26:34 -04:00
Virgil Dupras
443ed754e9 trs80: add missing blk 2020-05-02 08:27:24 -04:00
Virgil Dupras
3a27479f2b fix stupid typo
I don't believe this, one hour of my life I'll never get back.
2020-05-02 08:06:37 -04:00
10 changed files with 30 additions and 23 deletions

View File

@ -1,5 +1,5 @@
(cont.) (cont.)
RAMSTART INITIAL_SP +55 EMITPTR override RAMSTART INITIAL_SP +55 (key) override
+02 CURRENT +57 readln's variables +02 CURRENT +57 readln's variables
+04 HERE +59 blk's variables +04 HERE +59 blk's variables
+06 C<? +5b z80a's variables +06 C<? +5b z80a's variables
@ -10,7 +10,7 @@ RAMSTART INITIAL_SP +55 EMITPTR override
+2e BOOT C< PTR +2e BOOT C< PTR
+4e INTJUMP +4e INTJUMP
+51 CURRENTPTR +51 CURRENTPTR
+53 EMITPTR +53 (emit) override
(cont.) (cont.)

View File

@ -1,4 +1,4 @@
: KEY : (key)
( inc then fetch ) ( inc then fetch )
ACIAR> @ 1+ DUP ACIA) @ = IF ACIAR> @ 1+ DUP ACIA) @ = IF
DROP ACIA( @ DROP ACIA( @

View File

@ -12,6 +12,5 @@
( setup interrupt ) ( setup interrupt )
0xc3 0x4e RAM+ C! ( c3==JP, 4e==INTJUMP ) 0xc3 0x4e RAM+ C! ( c3==JP, 4e==INTJUMP )
['] ~ACIA 0x4f RAM+ ! ['] ~ACIA 0x4f RAM+ !
['] (emit) 0x53 RAM+ ! ( 53==EMITPTR )
(im1) ; (im1) ;

View File

@ -3,8 +3,8 @@
LIT< (parse) (find) DROP (parse*) ! LIT< (parse) (find) DROP (parse*) !
CURRENT @ 0x2e RAM+ ! ( 2e == BOOT C< PTR ) CURRENT @ 0x2e RAM+ ! ( 2e == BOOT C< PTR )
0 0x08 RAM+ ! ( 08 == C<* override ) 0 0x08 RAM+ ! ( 08 == C<* override )
LIT< (emit) (find) DROP 0x53 RAM+ ! ( 53 == EMITPTR ) 0 0x53 RAM+ ! ( 53 == (emit) override )
0 0x55 RAM+ ! ( 55 == EMITPTR override ) 0 0x55 RAM+ ! ( 55 == (key) override )
( 0c == C<* ) ( 0c == C<* )
LIT< (boot<) (find) DROP 0x0c RAM+ ! LIT< (boot<) (find) DROP 0x0c RAM+ !
( boot< always has a char waiting. 06 == C<?* ) ( boot< always has a char waiting. 06 == C<?* )

View File

@ -1,6 +1,6 @@
: EMIT : EMIT
( 0x53==EMITPTR 0x55==override ) ( 0x53==(emit) override )
85 RAM+ @ DUP NOT IF DROP 83 RAM+ @ THEN EXECUTE ; 83 RAM+ @ DUP IF EXECUTE ELSE DROP (emit) THEN ;
: (print) : (print)
BEGIN BEGIN

View File

@ -7,9 +7,9 @@
SPC BS 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 ( cont.: read one char into input buffer and returns whether we

View File

@ -1,4 +1,4 @@
CODE KEY CODE (key)
A 0x01 LDrn, ( @KEY ) A 0x01 LDrn, ( @KEY )
0x28 RSTn, 0x28 RSTn,
L A LDrr, H 0 LDrn, L A LDrr, H 0 LDrn,

9
blk/497 Normal file
View File

@ -0,0 +1,9 @@
CODE @PUT ( c a -- f )
DE POPqq,
BC POPqq,
chkPS,
A 0x04 LDrn, ( @PUT )
0x28 RSTn,
PUSHZ,
;CODE

Binary file not shown.

View File

@ -16,8 +16,7 @@ H@ 256 /MOD 2 PC! 2 PC!
( Update LATEST ) ( Update LATEST )
PC ORG @ 8 + ! PC ORG @ 8 + !
," CURRENT @ HERE ! " ," CURRENT @ HERE ! "
," : (emit) 0 PC! ; CURRENT @ 83 RAM+ ! " ," : (emit) 0 PC! ; : (key) 0 PC@ ; "
," : KEY 0 PC@ ; "
422 470 XPACKR 422 470 XPACKR
," ' KEY 12 RAM+ ! " ," ' (key) 12 RAM+ ! "
H@ 256 /MOD 2 PC! 2 PC! H@ 256 /MOD 2 PC! 2 PC!