mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-24 20:31:12 +00:00
Fix function pointers in sandbox.
Cleanup plvm02.s source (no functional change)
This commit is contained in:
parent
e48a036bb4
commit
73bfdae1a9
BIN
SANDBOX.PO
BIN
SANDBOX.PO
Binary file not shown.
@ -87,8 +87,9 @@ export def main(range)
|
||||
wend
|
||||
putln
|
||||
end
|
||||
ptr = @main
|
||||
ptr(@array:6)
|
||||
ptr = @array
|
||||
main(@array:6)
|
||||
puti((ptr):6)
|
||||
putln
|
||||
puti(ptr=>6)
|
||||
|
@ -2976,7 +2976,7 @@ def parse_value(rvalue)
|
||||
type = type | BPTR_TYPE
|
||||
deref = deref + 1
|
||||
fin
|
||||
break
|
||||
break
|
||||
is WPTR_TKN
|
||||
if deref
|
||||
push_op(token, 0)
|
||||
@ -2984,15 +2984,15 @@ def parse_value(rvalue)
|
||||
type = type | WPTR_TYPE
|
||||
deref = deref + 1
|
||||
fin
|
||||
break
|
||||
break
|
||||
is AT_TKN
|
||||
deref = deref - 1
|
||||
break
|
||||
break
|
||||
is SUB_TKN
|
||||
is COMP_TKN
|
||||
is LOGIC_NOT_TKN
|
||||
push_op(token, 0)
|
||||
break
|
||||
break
|
||||
otherwise
|
||||
return 0
|
||||
wend
|
||||
@ -3005,18 +3005,18 @@ def parse_value(rvalue)
|
||||
is CHR_TKN
|
||||
value = constval
|
||||
type = type | CONST_TYPE
|
||||
break
|
||||
break
|
||||
is ID_TKN
|
||||
idptr = id_lookup(tknptr, tknlen)
|
||||
if !idptr; return 0; fin
|
||||
if !(idptr->idtype); return 0; fin
|
||||
type = type | idptr->idtype
|
||||
value = idptr=>idval
|
||||
break
|
||||
break
|
||||
is CLOSE_PAREN_TKN
|
||||
// type = type | WORD_TYPE
|
||||
emit_val = TRUE
|
||||
break
|
||||
break
|
||||
otherwise
|
||||
return 0
|
||||
wend
|
||||
@ -3030,15 +3030,15 @@ def parse_value(rvalue)
|
||||
is NEG_TKN
|
||||
pop_op
|
||||
value = -value
|
||||
break
|
||||
break
|
||||
is COMP_TKN
|
||||
pop_op
|
||||
value = ~value
|
||||
break
|
||||
break
|
||||
is LOGIC_NOT_TKN
|
||||
pop_op
|
||||
value = !value
|
||||
break
|
||||
break
|
||||
otherwise
|
||||
cparams = FALSE
|
||||
wend
|
||||
@ -3122,7 +3122,7 @@ def parse_value(rvalue)
|
||||
token = DOT_TKN
|
||||
else
|
||||
token = COLON_TKN
|
||||
fin
|
||||
fin
|
||||
//
|
||||
// Fall through
|
||||
//
|
||||
@ -3230,7 +3230,7 @@ def parse_value(rvalue)
|
||||
if type & LOCAL_TYPE
|
||||
emit_llw(value + elem_offset)
|
||||
else
|
||||
emit_law(value, elem_offset, type)
|
||||
emit_law(value, elem_offset)
|
||||
fin
|
||||
elsif type & PTR_TYPE
|
||||
emit_lw
|
||||
|
@ -154,49 +154,9 @@ RAMDONE CLI
|
||||
STA LCDEFCMD,Y
|
||||
DEY
|
||||
BPL -
|
||||
;*
|
||||
;* 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
|
||||
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
|
||||
;************************************************
|
||||
;* *
|
||||
;* LANGUAGE CARD RESIDENT PLASMA VM STARTS HERE *
|
||||
|
Loading…
x
Reference in New Issue
Block a user