1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-01-24 20:31:12 +00:00

Additional script demos and associated bug fixes

This commit is contained in:
David Schmenk 2024-01-04 17:06:50 -08:00
parent 1db7cd16ee
commit 420af77a96
3 changed files with 36 additions and 10 deletions

View File

@ -212,6 +212,7 @@ cp scripts/grlib.4th prodos/scripts/GRLIB.4TH.TXT
cp scripts/hgrlib.4th prodos/scripts/HGRLIB.4TH.TXT
cp scripts/int32.4th prodos/scripts/INT32.4TH.TXT
cp scripts/fpu.4th prodos/scripts/FPU.4TH.TXT
cp scripts/rod.4th prodos/scripts/ROD.4TH.TXT
cp scripts/bounce.4th prodos/scripts/BOUNCE.4TH.TXT
cp scripts/hrbounce.4th prodos/scripts/HRBOUNCE.4TH.TXT

View File

@ -77,7 +77,11 @@ FILEIOAPI 1 IFACE PLASMA SETPFX
( LOADMOD" CONIO" CONIO is already available in plforth )
LOOKUP CONIO CONSTANT CONIOAPI
CONIOAPI 3 IFACE PLASMA HOME
CONIOAPI 4 IFACE PLASMA GOTOXY
CONIOAPI 11 IFACE PLASMA TONE
CONIOAPI 3 IFACE PLASMA _HOME : HOME _HOME DROP ;
CONIOAPI 4 IFACE PLASMA _GOTOXY : GOTOXY _GOTOXY DROP ;
CONIOAPI 7 IFACE PLASMA _TEXT : TEXT 40 _TEXT DROP ;
CONIOAPI 8 IFACE PLASMA _GR : GR 1 _GR DROP ;
CONIOAPI 9 IFACE PLASMA _COLOR : COLOR _COLOR DROP ;
CONIOAPI 10 IFACE PLASMA _PLOT : PLOT _PLOT DROP ;
CONIOAPI 11 IFACE PLASMA _TONE : TONE _TONE DROP ;
CONIOAPI 12 IFACE PLASMA RAND

View File

@ -10,7 +10,7 @@ word vlist
word startheap, arg, infunc, inptr, IIP, W
word keyinbuf = $1FF
const SRCREFS = 2
const INBUF_SIZE = 81
const INBUF_SIZE = 128
byte srclevel = 0
word inbufptr
byte inref[SRCREFS]
@ -111,9 +111,9 @@ predef _immediate_#0, _exit_#0, _pad_#1, _trailing_(a,b)#2
predef _tors_(a)#0, _fromrs_#1, _toprs_#1, _execute_(a)#0, _lookup_#1
predef _move_(a,b,c)#0, _fill_(a,b,c)#0, _plasma_(a)#0
predef _var_(a)#0, _const_(a)#0, _lit_#1, _slit_#1, _find_(a)#2, _tick_#1
predef _forget_#0, _terminal_#1, _prat_(a)#0, _str_#0, _prstr_#0, _prpstr_#0
predef _prval_(a)#0, _prbyte_(a)#0, _prhex_(a)#0, _accept_(a,b)#1
predef _src_(a)#0, _srcstr_#0, _query_#0, _expect_(a,b)#0, _type_(a,b)#0
predef _forget_#0, _terminal_#1, _prat_(a)#0, _prhexat_(a)#0, _str_#0, _prstr_#0, _prpstr_#0
predef _prval_(a)#0, _prbyte_(a)#0, _prshex_(a)#0, _prsbyte_(a)#0, _prhex_(a)#0
predef _accept_(a,b)#1, _src_(a)#0, _srcstr_#0, _query_#0, _expect_(a,b)#0, _type_(a,b)#0
predef _vlist_#0, _tron_#0, _troff_#0, _stepon_#0, _stepoff_#0
predef _itc_#0, _pbc_#0, _comment_#0
predef _brk_#0, _brkon_#0, _brkoff_#0, _word_(a)#1, _count_(a)#2
@ -528,10 +528,14 @@ word = @d_word, 0, @_trailing_
char d_prat = "?"
byte = 0
word = @d_trailing, 0, @_prat_
// PRINT HEX @TOS
char d_prhexat = "$?"
byte = 0
word = @d_prat, 0, @_prhexat_
// PRINT TOS
char d_prtos = "."
byte = 0
word = @d_prat, 0, @_prval_
word = @d_prhexat, 0, @_prval_
// PRINT TOS HEX
char d_prtoshex = "$."
byte = 0
@ -540,10 +544,18 @@ word = @d_prtos, 0, @_prhex_
char d_prtosbyte = "C$."
byte = 0
word = @d_prtoshex, 0, @_prbyte_
// PRINT TOS $HEX
char d_prtosshex = "$$."
byte = 0
word = @d_prtosbyte, 0, @_prshex_
// PRINT TOS SHEX BYTE
char d_prtossbyte = "CS$."
byte = 0
word = @d_prtosshex, 0, @_prsbyte_
// EMIT
char d_emit = "EMIT"
byte = 0
word = @d_prtosbyte, 0, @putc
word = @d_prtossbyte, 0, @putc
// CR
char d_cr = "CR"
byte = 0
@ -1013,7 +1025,7 @@ def interpret#0
inchars--
^inchars = inlen
puts(inchars)
puts(" : Compile ony word\n")
puts(" : Compile only word\n")
_quit_
fin
execword(dentry)
@ -1635,9 +1647,18 @@ end
def _prhex_(a)#0
puth(a); putc(' ')
end
def _prsbyte_(a)#0
putc('$'); putb(a); putc(' ')
end
def _prshex_(a)#0
putc('$'); puth(a); putc(' ')
end
def _prat_(a)#0
puti(*a); putc(' ')
end
def _prhexat_(a)#0
putc('$'); puth(*a); putc(' ')
end
def _str_#0
word str
byte len