mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-24 20:31:12 +00:00
One more attempt at clock fix (and some freeing of bytes)
This commit is contained in:
parent
242f7be1b9
commit
e48a036bb4
@ -39,7 +39,7 @@ word heap
|
||||
word xheap = $0800
|
||||
word lastsym = symtbl
|
||||
byte perr
|
||||
byte[] cmdln // Overlay exported strings table
|
||||
byte cmdln = "" // Overlay exported strings table
|
||||
//
|
||||
// Standard Library exported functions.
|
||||
//
|
||||
@ -67,7 +67,8 @@ byte loadstr = "MODLOAD"
|
||||
byte execstr = "MODEXEC"
|
||||
byte modadrstr = "MODADDR"
|
||||
byte argstr = "ARGS"
|
||||
byte[] prefix // overlay with exported symbols table
|
||||
byte autorun = "AUTORUN"
|
||||
byte prefix[] // overlay with exported symbols table
|
||||
word exports = @sysstr, @syscall
|
||||
word = @callstr, @call
|
||||
word = @putcstr, @cout
|
||||
@ -1276,11 +1277,17 @@ while *stdlibsym
|
||||
addsym(heap, stdlibsym=>2)
|
||||
stdlibsym = stdlibsym + 4
|
||||
loop
|
||||
memcpy(@cmdln, getlnbuf, 128)
|
||||
//
|
||||
// Print some startup info.
|
||||
// Try to load autorun.
|
||||
//
|
||||
if not cmdln
|
||||
autorun = open(@autorun, iobuffer)
|
||||
if autorun > 0
|
||||
cmdln = read(autorun, @stdlibstr, 128)
|
||||
close(autorun)
|
||||
else
|
||||
//
|
||||
// Print some startup info.
|
||||
//
|
||||
prstr(@verstr)
|
||||
prbyte(version.1)
|
||||
cout('.')
|
||||
@ -1290,7 +1297,6 @@ if not cmdln
|
||||
prword(availheap)
|
||||
crout
|
||||
fin
|
||||
getpfx(@prefix)
|
||||
perr = 0
|
||||
while 1
|
||||
if cmdln
|
||||
|
@ -157,46 +157,46 @@ RAMDONE CLI
|
||||
;*
|
||||
;* LOOK FOR STARTUP FILE
|
||||
;*
|
||||
JSR PRODOS ; OPEN AUTORUN
|
||||
!BYTE $C8
|
||||
!WORD AUTOOPENPARMS
|
||||
BCS CMDEXEC
|
||||
LDA AUTOREFNUM
|
||||
STA AUTONLPARMS+1
|
||||
JSR PRODOS
|
||||
!BYTE $C9
|
||||
!WORD AUTONLPARMS
|
||||
BCS CMDEXEC
|
||||
LDA AUTOREFNUM
|
||||
STA AUTOREADPARMS+1
|
||||
JSR PRODOS
|
||||
!BYTE $CA
|
||||
!WORD AUTOREADPARMS
|
||||
BCS CMDEXEC
|
||||
LDX AUTOREADPARMS+6
|
||||
STX $01FF
|
||||
CMDEXEC JSR PRODOS
|
||||
!BYTE $CC
|
||||
!WORD AUTOCLOSEPARMS
|
||||
; JSR PRODOS ; OPEN AUTORUN
|
||||
; !BYTE $C8
|
||||
; !WORD AUTOOPENPARMS
|
||||
; BCS CMDEXEC
|
||||
; LDA AUTOREFNUM
|
||||
; STA AUTONLPARMS+1
|
||||
; JSR PRODOS
|
||||
; !BYTE $C9
|
||||
; !WORD AUTONLPARMS
|
||||
; BCS CMDEXEC
|
||||
; LDA AUTOREFNUM
|
||||
; STA AUTOREADPARMS+1
|
||||
; JSR PRODOS
|
||||
; !BYTE $CA
|
||||
; !WORD AUTOREADPARMS
|
||||
; BCS CMDEXEC
|
||||
; LDX AUTOREADPARMS+6
|
||||
; STX $01FF
|
||||
;CMDEXEC JSR PRODOS
|
||||
; !BYTE $CC
|
||||
; !WORD AUTOCLOSEPARMS
|
||||
JMP CMDENTRY
|
||||
GETPFXPARMS !BYTE 1
|
||||
!WORD STRBUF ; PATH STRING GOES HERE
|
||||
AUTORUN !BYTE 7,'A','U','T','O','R','U','N'
|
||||
AUTOOPENPARMS !BYTE 3
|
||||
!WORD AUTORUN
|
||||
!WORD $0800
|
||||
AUTOREFNUM !BYTE 0
|
||||
AUTONLPARMS !BYTE 3
|
||||
!BYTE 0
|
||||
!BYTE $7F
|
||||
!BYTE $0D
|
||||
AUTOREADPARMS !BYTE 4
|
||||
!BYTE 0
|
||||
!WORD $0200
|
||||
!WORD $0080
|
||||
!WORD 0
|
||||
AUTOCLOSEPARMS !BYTE 1
|
||||
!BYTE 0
|
||||
;AUTORUN !BYTE 7,'A','U','T','O','R','U','N'
|
||||
;AUTOOPENPARMS !BYTE 3
|
||||
; !WORD AUTORUN
|
||||
; !WORD $0800
|
||||
;AUTOREFNUM !BYTE 0
|
||||
;AUTONLPARMS !BYTE 3
|
||||
; !BYTE 0
|
||||
; !BYTE $7F
|
||||
; !BYTE $0D
|
||||
;AUTOREADPARMS !BYTE 4
|
||||
; !BYTE 0
|
||||
; !WORD $0200
|
||||
; !WORD $0080
|
||||
; !WORD 0
|
||||
;AUTOCLOSEPARMS !BYTE 1
|
||||
; !BYTE 0
|
||||
;************************************************
|
||||
;* *
|
||||
;* LANGUAGE CARD RESIDENT PLASMA VM STARTS HERE *
|
||||
|
@ -1279,16 +1279,14 @@ loop
|
||||
//
|
||||
cmdptr = heap
|
||||
^cmdptr = 0
|
||||
terr = open(@autorun, O_READ)
|
||||
if terr > 0
|
||||
^cmdptr = read(terr, cmdptr + 1, 64)
|
||||
close(terr)
|
||||
fin
|
||||
perr = 0
|
||||
//
|
||||
// Print some startup info.
|
||||
//
|
||||
if not ^cmdptr
|
||||
autorun = open(@autorun, O_READ)
|
||||
if autorun > 0
|
||||
^cmdptr = read(autorun, cmdptr + 1, 64)
|
||||
close(autorun)
|
||||
else
|
||||
//
|
||||
// Print some startup info.
|
||||
//
|
||||
prstr(@verstr)
|
||||
prbyte(version.1)
|
||||
cout('.')
|
||||
@ -1298,7 +1296,7 @@ if not ^cmdptr
|
||||
prword(availheap)
|
||||
crout
|
||||
fin
|
||||
getpfx(@prefix)
|
||||
perr = 0
|
||||
//
|
||||
// Handle commands.
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user