mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-05 17:32:02 +00:00
Export SYSPATH
This commit is contained in:
parent
a58f3639a5
commit
e778e018aa
@ -23,6 +23,10 @@ import cmdsys
|
||||
const MACHID_I = $08
|
||||
byte MACHID
|
||||
//
|
||||
// System path
|
||||
//
|
||||
byte syspath
|
||||
//
|
||||
// System flags: memory allocator screen holes.
|
||||
//
|
||||
const restxt1 = $0001
|
||||
|
@ -720,16 +720,27 @@ end
|
||||
// loop
|
||||
// loop
|
||||
//end
|
||||
def strcpy(dst, src)#1
|
||||
memcpy(dst+1, src+1, ^src)
|
||||
^dst = ^src
|
||||
return dst
|
||||
end
|
||||
def strcat(dst, src)#1
|
||||
memcpy(dst + ^dst + 1, src + 1, ^src)
|
||||
^dst = ^dst + ^src
|
||||
return dst
|
||||
end
|
||||
//
|
||||
// Load Pascal CODE file
|
||||
//
|
||||
def loadcode(codefile)
|
||||
byte ref
|
||||
word pcode, seglen
|
||||
|
||||
byte filepath[64]
|
||||
|
||||
//puts(codefile); puts(":\n")
|
||||
pcode = 0
|
||||
ref = fileio:open(codefile)
|
||||
ref = fileio:open(strcat(strcpy(@filepath, @syspath), codefile))
|
||||
//puts("ref = "); prbyte(ref); puts(" perr = "); prbyte(perr); putln
|
||||
if ref
|
||||
pcode = heapmark
|
||||
|
@ -68,6 +68,7 @@ word cmdptr = @hexchar // make it point to a zero
|
||||
//
|
||||
byte syslibstr[] = "CMDSYS"
|
||||
byte machidstr[] = "MACHID"
|
||||
byte syspathstr[] = "SYSPATH"
|
||||
byte putcstr[] = "PUTC"
|
||||
byte putlnstr[] = "PUTLN"
|
||||
byte putsstr[] = "PUTS"
|
||||
@ -94,6 +95,7 @@ byte loadstr[] = "MODLOAD"
|
||||
byte execstr[] = "MODEXEC"
|
||||
byte modadrstr[] = "MODADDR"
|
||||
byte argstr[] = "ARGS"
|
||||
byte syspath[] = "" // Set to NULL
|
||||
word exports[] = @sysstr, @syscall
|
||||
word = @callstr, @call
|
||||
word = @putcstr, @cout
|
||||
@ -120,6 +122,7 @@ word = @loadstr, @loadmod
|
||||
word = @execstr, @execmod
|
||||
word = @modadrstr, @lookupstrmod
|
||||
word = @machidstr, @machid
|
||||
word = @syspathstr,@syspath
|
||||
word = @argstr, @cmdptr
|
||||
word = 0
|
||||
word syslibsym = @exports
|
||||
|
@ -45,6 +45,7 @@ byte cmdln = "" // Overlay exported strings table
|
||||
//
|
||||
byte syslibstr = "CMDSYS"
|
||||
byte machidstr = "MACHID"
|
||||
byte syspathstr = "SYSPATH"
|
||||
byte sysstr = "SYSCALL"
|
||||
byte callstr = "CALL"
|
||||
byte putcstr = "PUTC"
|
||||
@ -100,6 +101,7 @@ word = @loadstr, @loadmod
|
||||
word = @execstr, @execmod
|
||||
word = @modadrstr, @lookupstrmod
|
||||
word = @machidstr, MACHID
|
||||
word = @syspathstr,@syspath
|
||||
word = @argstr, @cmdln
|
||||
word = 0
|
||||
word syslibsym = @exports
|
||||
@ -347,10 +349,9 @@ asm memxcpy(dst,src,size)#0
|
||||
RTS
|
||||
end
|
||||
asm crout()#0
|
||||
DEX
|
||||
LDA #$0D
|
||||
BNE +
|
||||
; FALL THROUGH TO COUT
|
||||
; FALL THROUGH TO COUT
|
||||
end
|
||||
//
|
||||
// CHAR OUT
|
||||
@ -358,6 +359,7 @@ end
|
||||
//
|
||||
asm cout(c)#0
|
||||
LDA ESTKL,X
|
||||
INX
|
||||
BIT $BF98
|
||||
BMI +
|
||||
JSR TOUPR
|
||||
@ -365,7 +367,6 @@ asm cout(c)#0
|
||||
BIT ROMEN
|
||||
JSR $FDED
|
||||
BIT LCRDEN+LCBNK2
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
//
|
||||
@ -411,11 +412,20 @@ asm prstr(s)#0
|
||||
RTS
|
||||
end
|
||||
//
|
||||
// PRINT WORD
|
||||
//
|
||||
asm prword(w)#0
|
||||
LDA ESTKH,X
|
||||
JSR +
|
||||
DEX
|
||||
; FALL THROUGH TO PRBYTE
|
||||
end
|
||||
//
|
||||
// PRINT BYTE
|
||||
//
|
||||
asm prbyte(b)#0
|
||||
LDA ESTKL,X
|
||||
STX ESP
|
||||
+ STX ESP
|
||||
BIT ROMEN
|
||||
JSR $FDDA
|
||||
LDX ESP
|
||||
@ -424,22 +434,6 @@ asm prbyte(b)#0
|
||||
RTS
|
||||
end
|
||||
//
|
||||
// PRINT WORD
|
||||
//
|
||||
asm prword(w)#0
|
||||
STX ESP
|
||||
TXA
|
||||
TAY
|
||||
LDA ESTKH,Y
|
||||
LDX ESTKL,Y
|
||||
BIT ROMEN
|
||||
JSR $F941
|
||||
LDX ESP
|
||||
BIT LCRDEN+LCBNK2
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
//
|
||||
// READ STRING
|
||||
// STR = RDSTR(PROMPTCHAR)
|
||||
//
|
||||
|
@ -63,6 +63,7 @@ word cmdptr
|
||||
//
|
||||
byte syslibstr[] = "CMDSYS"
|
||||
byte machidstr[] = "MACHID"
|
||||
byte syspathstr[] = "SYSPATH"
|
||||
byte sysstr[] = "SYSCALL"
|
||||
byte callstr[] = "CALL"
|
||||
byte putcstr[] = "PUTC"
|
||||
@ -117,6 +118,7 @@ word = @loadstr, @loadmod
|
||||
word = @execstr, @execmod
|
||||
word = @modadrstr, @lookupstrmod
|
||||
word = @machidstr, @machid
|
||||
word = @syspathstr,@syspath
|
||||
word = @argstr, @cmdptr
|
||||
word = 0
|
||||
word syslibsym = @exports
|
||||
|
Loading…
Reference in New Issue
Block a user