Housekeeping
This commit is contained in:
parent
39a85b64a0
commit
57ae0709eb
|
@ -3,25 +3,17 @@
|
||||||
|10 @Console &vector $2 &read $1 &pad $5 &write $1 &error $1
|
|10 @Console &vector $2 &read $1 &pad $5 &write $1 &error $1
|
||||||
|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|
|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|
||||||
|
|
||||||
|0000
|
|0000 @src $40 @queue $1
|
||||||
|
|
||||||
@src $40
|
|
||||||
@queue $1
|
|
||||||
|
|
||||||
|0100 ( -> )
|
|0100 ( -> )
|
||||||
|
|
||||||
;await-src .Console/vector DEO2
|
;await-src .Console/vector DEO2
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
@await-src ( -> )
|
@await-src ( -> )
|
||||||
|
|
||||||
.Console/read DEI .src skey ?on-ready
|
.Console/read DEI .src skey ?on-ready
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
@on-ready ( -> )
|
@on-ready ( -> )
|
||||||
|
|
||||||
;src .File/name DEO2
|
;src .File/name DEO2
|
||||||
#0001 .File/length DEO2
|
#0001 .File/length DEO2
|
||||||
;&buf
|
;&buf
|
||||||
|
@ -31,29 +23,33 @@ BRK
|
||||||
LDAk append
|
LDAk append
|
||||||
!&stream &eof
|
!&stream &eof
|
||||||
POP2
|
POP2
|
||||||
|
( pad )
|
||||||
|
.queue LDZ #00 EQU ?&no-pad
|
||||||
|
#00 append
|
||||||
|
&no-pad
|
||||||
#0a18 DEO
|
#0a18 DEO
|
||||||
#010f DEO
|
#010f DEO
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
&buf $1
|
&buf $1
|
||||||
|
|
||||||
@append ( c -- )
|
(
|
||||||
|
@|core )
|
||||||
|
|
||||||
|
@append ( c -- )
|
||||||
,&chr STR
|
,&chr STR
|
||||||
#0800
|
#0800
|
||||||
&l
|
&l
|
||||||
[ LIT &chr $1 ] OVR #07 SWP SUB SFT #01 AND
|
[ LIT &chr $1 ] OVR #07 SWP SUB SFT #01 AND
|
||||||
[ LIT &inc $1 ] INCk #06 DIVk MUL SUB ,&inc STR
|
[ LIT &inc $1 ] INCk #06 DIVk MUL SUB ,&inc STR
|
||||||
( bit id -- )
|
( bit id -- )
|
||||||
SWP .queue LDZ ORA #10 SFT .queue STZ
|
SWP .queue LDZ ORA DUP ADD .queue STZ
|
||||||
( output )
|
|
||||||
#05 NEQ ?&no-cap
|
#05 NEQ ?&no-cap
|
||||||
#00 .queue LDZ #01 SFT ;MIME ADD2 LDA #18 DEO
|
[ LIT2 00 -queue ]
|
||||||
#00 .queue STZ
|
DUP2 LDZ #01 SFT ;MIME ADD2 LDA #18 DEO
|
||||||
|
STZ
|
||||||
&no-cap
|
&no-cap
|
||||||
INC GTHk ?&l
|
INC GTHk ?&l
|
||||||
POP2
|
POP2
|
||||||
|
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@MIME [
|
@MIME [
|
||||||
|
@ -62,9 +58,10 @@ JMP2r
|
||||||
"ghijklmnopqrstuv
|
"ghijklmnopqrstuv
|
||||||
"wxyz0123456789+/ ]
|
"wxyz0123456789+/ ]
|
||||||
|
|
||||||
|
(
|
||||||
|
@|stdlib )
|
||||||
|
|
||||||
@skey ( key buf -- proc ) OVR #21 LTH ?&eval #00 SWP sput #00 JMP2r &eval POP2 #01 JMP2r
|
@skey ( key buf -- proc ) OVR #21 LTH ?&eval #00 SWP sput #00 JMP2r &eval POP2 #01 JMP2r
|
||||||
@scap ( str* -- end* ) LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w JMP2r
|
@scap ( str* -- end* ) LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w JMP2r
|
||||||
@sput ( chr str* -- ) scap INC2k #00 ROT ROT STA STA JMP2r
|
@sput ( chr str* -- ) scap INC2k #00 ROT ROT STA STA JMP2r
|
||||||
@pstr ( str* -- ) &w LDAk #18 DEO INC2 LDAk ?&w POP2 JMP2r
|
|
||||||
@phex ( short* -- ) SWP phex/b &b DUP #04 SFT phex/c &c #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO JMP2r
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue