mirror of
https://github.com/forth-ev/VolksForth.git
synced 2025-02-18 03:30:36 +00:00
Block-IO for py65
This commit is contained in:
parent
09cdf5e6ab
commit
827916c85d
File diff suppressed because one or more lines are too long
@ -58,8 +58,8 @@ CODE CUROFF ( --) NEXT JMP END-CODE
|
|||||||
|
|
||||||
\ *** Block No. 3, Hexblock 3
|
\ *** Block No. 3, Hexblock 3
|
||||||
|
|
||||||
\ DECODE EXPECT KEYBOARD BP28MAY85) cas 15july2020
|
\ DECODE EXPECT KEYBOARD BP28MAY85) cas 18juli2020
|
||||||
08 CONSTANT #BS 0D CONSTANT #CR &27 CONSTANT #ESC
|
7F CONSTANT #BS 0D CONSTANT #CR &27 CONSTANT #ESC
|
||||||
0A CONSTANT #LF
|
0A CONSTANT #LF
|
||||||
: 65DECODE ( ADDR CNT1 KEY -- ADDR CNT2)
|
: 65DECODE ( ADDR CNT1 KEY -- ADDR CNT2)
|
||||||
#BS CASE? IF DUP IF DEL 1- THEN EXIT THEN
|
#BS CASE? IF DUP IF DEL 1- THEN EXIT THEN
|
||||||
@ -172,30 +172,30 @@ $0AA CONSTANT BLK/DRV \ number of Blocks per Drive
|
|||||||
|
|
||||||
\ *** Block No. 9, Hexblock 9
|
\ *** Block No. 9, Hexblock 9
|
||||||
|
|
||||||
\ cas 26jan06
|
\ cas 18juli2020
|
||||||
: >DRIVE ( BLOCK DRV# -- BLOCK' )
|
: >DRIVE ( BLOCK DRV# -- BLOCK' )
|
||||||
BLK/DRV * + OFFSET @ - ;
|
BLK/DRV * + OFFSET @ - ;
|
||||||
: DRV? ( BLOCK -- DRV# )
|
: DRV? ( BLOCK -- DRV# )
|
||||||
OFFSET @ + BLK/DRV / ;
|
OFFSET @ + BLK/DRV / ;
|
||||||
|
|
||||||
: DRVINIT NOOP ;
|
: DRVINIT NOOP ;
|
||||||
.( for read and write errorhandler is needed )
|
|
||||||
| : readserial ( adr blk -- )
|
|
||||||
&27 emit .( rb ) space base push decimal . cr
|
|
||||||
$400 bounds DO key I c! LOOP ;
|
|
||||||
|
|
||||||
| : writeserial ( adr blk -- )
|
: READBLOCK ( ADR BLK )
|
||||||
&27 emit .( wb ) space base push decimal . cr
|
$f011 ! $f013 ! 01 $f010 c! ;
|
||||||
$400 bounds DO I c@ emit LOOP ;
|
|
||||||
|
: WRITEBLOCK ( ADR BLK )
|
||||||
|
$f011 ! $f013 ! 02 $f010 c! ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\ *** Block No. 10, Hexblock a
|
\ *** Block No. 10, Hexblock a
|
||||||
|
|
||||||
\ (r/w er14dez88
|
\ (r/w cas 18juli2020
|
||||||
|
|
||||||
: (R/W ( ADR BLK FILE R/WF -- FLAG)
|
: (R/W ( ADR BLK FILE R/WF -- FLAG)
|
||||||
swap abort" no file"
|
swap abort" no file"
|
||||||
IF readserial ELSE writeserial THEN false ;
|
IF readblock ELSE writeblock THEN false ;
|
||||||
|
|
||||||
' (R/W IS R/W
|
' (R/W IS R/W
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user