From b8d8007a3f40add3dfdf72779d35a6bc71219159 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Fri, 1 May 2020 14:38:31 -0400 Subject: [PATCH] trs80: add *CL< and *CL> --- blk/249 | 1 + blk/492 | 2 +- blk/494 | 2 +- blk/495 | 2 +- blk/496 | 10 ++++++++-- blk/499 | 2 +- blk/500 | 7 +++++-- 7 files changed, 18 insertions(+), 8 deletions(-) diff --git a/blk/249 b/blk/249 index 7db0042..5adff56 100644 --- a/blk/249 +++ b/blk/249 @@ -4,6 +4,7 @@ : PUSH0, BC 0 LDddnn, BC PUSHqq, ; : PUSH1, BC 1 LDddnn, BC PUSHqq, ; : PUSHZ, BC 0 LDddnn, IFZ, BC INCss, THEN, BC PUSHqq, ; +: PUSHA, B 0 LDrn, C A LDrr, BC PUSHqq, ; : HLZ, A H LDrr, L ORr, ; : DEZ, A D LDrr, E ORr, ; : LDDE(HL), E (HL) LDrr, HL INCss, D (HL) LDrr, ; diff --git a/blk/492 b/blk/492 index 63f74b3..ba6c95c 100644 --- a/blk/492 +++ b/blk/492 @@ -1 +1 @@ -493 496 LOADR +493 497 LOADR diff --git a/blk/494 b/blk/494 index 4cbca34..abe4d8f 100644 --- a/blk/494 +++ b/blk/494 @@ -1,4 +1,4 @@ -CODE DCSTAT ( drv -- f ) +CODE @DCSTAT ( drv -- f ) BC POPqq, chkPS, A 0x28 LDrn, ( @DCSTAT ) diff --git a/blk/495 b/blk/495 index fe778dd..34862a0 100644 --- a/blk/495 +++ b/blk/495 @@ -1,4 +1,4 @@ -CODE RDSEC ( drv cylsec addr -- f ) +CODE @RDSEC ( drv cylsec addr -- f ) HL POPqq, DE POPqq, BC POPqq, diff --git a/blk/496 b/blk/496 index 2c25794..9789f06 100644 --- a/blk/496 +++ b/blk/496 @@ -1,4 +1,4 @@ -CODE WRSEC ( drv cylsec addr -- f ) +CODE @WRSEC ( drv cylsec addr -- f ) HL POPqq, DE POPqq, BC POPqq, @@ -7,5 +7,11 @@ CODE WRSEC ( drv cylsec addr -- f ) 0x28 RSTn, PUSHZ, ;CODE - +CODE @GET ( a -- c f ) + DE POPqq, + chkPS, + A 0x03 LDrn, ( @GET ) + 0x28 RSTn, + PUSHA, PUSHZ, +;CODE diff --git a/blk/499 b/blk/499 index e1439d5..7dc8921 100644 --- a/blk/499 +++ b/blk/499 @@ -6,7 +6,7 @@ 256 * + ( cylsec ) ; : FD@! ( wref blk -- ) - 1 DCSTAT NOT IF _err THEN + 1 @DCSTAT NOT IF _err THEN 4 * ( wr sec ) 4 0 DO ( wr sec ) DUP I + _cylsec ( wr sec cs ) diff --git a/blk/500 b/blk/500 index d774b56..e202cf4 100644 --- a/blk/500 +++ b/blk/500 @@ -1,4 +1,7 @@ -: FD@ ['] RDSEC SWAP FD@! ; -: FD! ['] WRSEC SWAP FD@! ; +: FD@ ['] @RDSEC SWAP FD@! ; +: FD! ['] @WRSEC SWAP FD@! ; : FD$ ['] FD@ BLK@* ! ['] FD! BLK!* ! ; +: _err ABORT" *CLerr" ; +: *CL< 0 BEGIN DROP 0x0238 @GET UNTIL ; +: *CL> 0x0238 @PUT NOT IF _err THEN ;