Added proquints

This commit is contained in:
Devine Lu Linvega 2023-05-24 10:45:19 -07:00
parent 6b7842b0db
commit a2bc082bc1
3 changed files with 82 additions and 0 deletions

25
cli/proquints/build.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/sh -e
ID="proquints"
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxncli"
LIN="uxncli $HOME/roms/uxnlin.rom"
SRC="${ID}.tal"
DST="${ID}.rom"
CPY="$HOME/roms"
ARG="test.txt"
if [[ "$*" == *"--lint"* ]]
then
$LIN $SRC
fi
$ASM $SRC $DST
if [[ "$*" == *"--save"* ]]
then
cp $DST $CPY
fi
$EMU $DST $ARG

View File

@ -0,0 +1,56 @@
( uxncli proquints.rom file.bin )
|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
|0000 @src $40 @queue $1
|0100 ( -> )
;await-src .Console/vector DEO2
BRK
@await-src ( -> )
.Console/read DEI .src skey ?on-ready
BRK
@on-ready ( -> )
;src .File/name DEO2
#0002 .File/length DEO2
;&buf
&stream
DUP2 .File/read DEO2
.File/success DEI2 #0000 EQU2 ?&eof
LDA2k proquint
!&stream &eof
POP2
#0a18 DEO
#010f DEO
BRK
&buf $2
(
@|core )
@proquint ( short* -- )
( c1 ) DUP2 #0c emit-con
( v1 ) DUP2 #0a emit-vow
( c2 ) DUP2 #06 emit-con
( v2 ) DUP2 #03 emit-vow
( c3 ) #00 emit-con
#20 &emit ( c -- ) #18 DEO
JMP2r
@emit-con SFT2 #000f AND2 ;&con ADD2 LDA !proquint/emit
&con "bdfghjklmnprstvz
@emit-vow SFT2 #0003 AND2 ;&vow ADD2 LDA !proquint/emit
&vow "aiou
(
@|stdlib )
@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
@sput ( chr str* -- ) scap INC2k #00 ROT ROT STA STA JMP2r

1
cli/proquints/test.txt Normal file
View File

@ -0,0 +1 @@
Many hands make light work.