mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-10 06:30:41 +00:00
Merge branch 'master' of https://github.com/dschmenk/PLASMA
This commit is contained in:
commit
760a20f70a
@ -11,10 +11,10 @@ end
|
||||
//
|
||||
// Uthernet register offsets
|
||||
//
|
||||
const TXDATA = $00
|
||||
const RXDATA = $00
|
||||
const TXCMD = $04
|
||||
const TXLEN = $06
|
||||
const TX_DATA = $00
|
||||
const RX_DATA = $00
|
||||
const TX_CMD = $04
|
||||
const TX_LEN = $06
|
||||
const INT_STATUS = $08
|
||||
const PREG_INDEX = $0A
|
||||
const PREG_DATA = $0C
|
||||
@ -214,13 +214,13 @@ end
|
||||
// Identify Uthernet card and initialize
|
||||
//
|
||||
for slot = $90 to $F0 step $10
|
||||
if (peekiow(slot+TXCMD) & $CC3F) == $09
|
||||
if (peekiow(slot+TX_CMD) & $CC3F) == $09
|
||||
pokeiow(slot+PREG_INDEX, 0)
|
||||
if peekiow(slot+PREG_DATA) == $630E
|
||||
pokepreg($0114, $40) // RESET
|
||||
rxdata_hi = slot + 1
|
||||
txcmd = slot + TXCMD
|
||||
txlen = slot + TXLEN
|
||||
txcmd = slot + TX_CMD
|
||||
txlen = slot + TX_LEN
|
||||
isq = slot + INT_STATUS
|
||||
pregidx = slot + PREG_INDEX
|
||||
pregdata = slot + PREG_DATA
|
||||
|
@ -45,7 +45,7 @@ int id_match(char *name, int len, char *id)
|
||||
if (len > 16) len = 16;
|
||||
while (len--)
|
||||
{
|
||||
if (name[len] != id[1 + len])
|
||||
if (toupper(name[len]) != id[1 + len])
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
@ -94,7 +94,7 @@ int idconst_add(char *name, int len, int value)
|
||||
idconst_name[consts][0] = len;
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
while (len--)
|
||||
idconst_name[consts][1 + len] = name[len];
|
||||
idconst_name[consts][1 + len] = toupper(name[len]);
|
||||
idconst_value[consts] = value;
|
||||
consts++;
|
||||
return (1);
|
||||
@ -123,7 +123,7 @@ int idlocal_add(char *name, int len, int type, int size)
|
||||
idlocal_name[locals][0] = len;
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
while (len--)
|
||||
idlocal_name[locals][1 + len] = name[len];
|
||||
idlocal_name[locals][1 + len] = toupper(name[len]);
|
||||
idlocal_type[locals] = type | LOCAL_TYPE;
|
||||
idlocal_offset[locals] = localsize;
|
||||
localsize += size;
|
||||
@ -153,7 +153,7 @@ int idglobal_add(char *name, int len, int type, int size)
|
||||
idglobal_name[globals][0] = len;
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
while (len--)
|
||||
idglobal_name[globals][1 + len] = name[len];
|
||||
idglobal_name[globals][1 + len] = toupper(name[len]);
|
||||
idglobal_type[globals] = type;
|
||||
if (!(type & EXTERN_TYPE))
|
||||
{
|
||||
@ -205,7 +205,7 @@ int idfunc_add(char *name, int len, int type, int tag)
|
||||
idglobal_name[globals][0] = len;
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
while (len--)
|
||||
idglobal_name[globals][1 + len] = name[len];
|
||||
idglobal_name[globals][1 + len] = toupper(name[len]);
|
||||
idglobal_type[globals] = type;
|
||||
idglobal_tag[globals++] = tag;
|
||||
if (type & EXTERN_TYPE)
|
||||
|
@ -803,11 +803,11 @@ def writeheader(refnum)
|
||||
loop
|
||||
^moddep = 0 // Terminate dependency list
|
||||
len = moddep - 1 - @header
|
||||
modfix = len + MODADDR - codebuff // Convert generated address into module adress
|
||||
modfix = len + RELADDR - codebuff // Convert generated address into module adress
|
||||
header:0 = len + codeptr - codebuff // sizeof header+data+bytecode
|
||||
header:2 = $DA7F // Magic #
|
||||
header:4 = modsysflags // Module SYSFLAGS
|
||||
header:6 = len + MODADDR + datasize // Byte code offset
|
||||
header:6 = len + RELADDR + datasize // Byte code offset
|
||||
header:8 = def_cnt // DEFinition count
|
||||
header:10 = entrypoint + modfix // Init entrypoint
|
||||
fileio:write(refnum, @header, len + 2)
|
||||
@ -907,12 +907,12 @@ end
|
||||
//
|
||||
def writemodule(refnum)#0
|
||||
word hdrlen, esd, esdlen, modfix, modadj, modofst, fixups, updtptr
|
||||
|
||||
|
||||
//
|
||||
// Write module header
|
||||
//
|
||||
hdrlen = writeheader(refnum)
|
||||
modfix = hdrlen + MODADDR
|
||||
modfix = hdrlen + RELADDR
|
||||
modofst = hdrlen - codebuff
|
||||
//
|
||||
// Adjust internal fixups for header size
|
||||
|
@ -411,11 +411,6 @@ t_token scan(void)
|
||||
scantoken = TERNARY_TOKEN;
|
||||
scanpos += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
scantoken = TERNARY_TOKEN;
|
||||
scanpos++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
|
@ -1,31 +1,31 @@
|
||||
//
|
||||
// Lexical anaylzer
|
||||
//
|
||||
def isalpha(c)
|
||||
if c >= 'A' and c <= 'Z'
|
||||
return TRUE
|
||||
elsif c >= 'a' and c <= 'z'
|
||||
return TRUE
|
||||
elsif c == '_'
|
||||
return TRUE
|
||||
fin
|
||||
return FALSE
|
||||
end
|
||||
def isnum(c)
|
||||
return c >= '0' and c <= '9'
|
||||
end
|
||||
def isalphanum(c)
|
||||
if c >= 'A' and c <= 'Z'
|
||||
return TRUE
|
||||
elsif c >= 'a' and c <= 'z'
|
||||
return TRUE
|
||||
elsif c >= '0' and c <= '9'
|
||||
return TRUE
|
||||
elsif c == '_'
|
||||
return TRUE
|
||||
fin
|
||||
return FALSE
|
||||
end
|
||||
//def isalpha(c)
|
||||
// if c >= 'A' and c <= 'Z'
|
||||
// return TRUE
|
||||
// //elsif c >= 'a' and c <= 'z'
|
||||
// // return TRUE
|
||||
// elsif c == '_'
|
||||
// return TRUE
|
||||
// fin
|
||||
// return FALSE
|
||||
//end
|
||||
//def isnum(c)
|
||||
// return c >= '0' and c <= '9'
|
||||
//end
|
||||
//def isalphanum(c)
|
||||
// if c >= 'A' and c <= 'Z'
|
||||
// return TRUE
|
||||
// //elsif c >= 'a' and c <= 'z'
|
||||
// // return TRUE
|
||||
// elsif c >= '0' and c <= '9'
|
||||
// return TRUE
|
||||
// elsif c == '_'
|
||||
// return TRUE
|
||||
// fin
|
||||
// return FALSE
|
||||
//end
|
||||
def keymatch
|
||||
byte i, keypos
|
||||
word chrptr
|
||||
@ -37,7 +37,7 @@ def keymatch
|
||||
chrptr = tknptr - 1
|
||||
while keywrds[keypos] == tknlen
|
||||
for i = 1 to tknlen
|
||||
if toupper(^(chrptr + i)) <> keywrds[keypos + i]
|
||||
if ^(chrptr + i) <> keywrds[keypos + i]
|
||||
break
|
||||
fin
|
||||
next
|
||||
@ -51,7 +51,7 @@ end
|
||||
def scannum
|
||||
word num
|
||||
num = 0
|
||||
|
||||
|
||||
if ^scanptr == '$'
|
||||
repeat
|
||||
scanptr++
|
||||
@ -84,17 +84,21 @@ def scan
|
||||
scanptr++
|
||||
loop
|
||||
tknptr = scanptr
|
||||
scanchr = ^scanptr
|
||||
scanchr = toupper(^scanptr)
|
||||
//
|
||||
// Scan for token based on first character
|
||||
//
|
||||
if isalpha(scanchr)
|
||||
//if isalpha(scanchr)
|
||||
if (scanchr >= 'A' and scanchr <= 'Z') or (scanchr == '_')
|
||||
//
|
||||
// ID, either variable name or reserved word
|
||||
//
|
||||
repeat
|
||||
^scanptr = scanchr
|
||||
scanptr++
|
||||
until not isalphanum(^scanptr)
|
||||
scanchr = toupper(^scanptr)
|
||||
//until not isalphanum(scanchr)
|
||||
until not ((scanchr >= 'A' and scanchr <= 'Z') or (scanchr >= '0' and scanchr <= '9' ) or (scanchr == '_'))
|
||||
tknlen = scanptr - tknptr
|
||||
token = keymatch
|
||||
elsif scanchr >= '0' and scanchr <= '9' // isnum()
|
||||
@ -143,10 +147,13 @@ def scan
|
||||
scanptr++
|
||||
when ^scanptr
|
||||
is 'n'
|
||||
is 'N'
|
||||
constval = $0D; break
|
||||
is 'r'
|
||||
is 'R'
|
||||
constval = $0A; break
|
||||
is 't'
|
||||
is 'T'
|
||||
constval = $09; break
|
||||
otherwise
|
||||
constval = scannum
|
||||
@ -172,10 +179,13 @@ def scan
|
||||
scanptr++
|
||||
when ^scanptr
|
||||
is 'n'
|
||||
is 'N'
|
||||
^strconstptr = $0D; break
|
||||
is 'r'
|
||||
is 'R'
|
||||
^strconstptr = $0A; break
|
||||
is 't'
|
||||
is 'T'
|
||||
^strconstptr = $09; break
|
||||
otherwise
|
||||
^strconstptr = scannum
|
||||
@ -272,9 +282,6 @@ def scan
|
||||
if ^(scanptr + 1) == '?'
|
||||
token = TERNARY_TKN;
|
||||
scanptr = scanptr + 2
|
||||
else
|
||||
token = TERNARY_TKN;
|
||||
scanptr++
|
||||
fin
|
||||
break
|
||||
is 0
|
||||
|
@ -82,7 +82,7 @@ end
|
||||
def parse_constterm
|
||||
word val
|
||||
byte size, type
|
||||
|
||||
|
||||
when scan
|
||||
is OPEN_PAREN_TKN
|
||||
push_val(parse_constexpr)
|
||||
@ -227,12 +227,12 @@ def parse_list#2
|
||||
until token <> COMMA_TKN
|
||||
return listseq, listdepth
|
||||
end
|
||||
def parse_value(codeseq, rvalue)#2
|
||||
def parse_value(codeseq, r_val)#2
|
||||
byte cfnparms, cfnvals, stackdepth, operation
|
||||
word deref, type, optos, idptr, value, const_offset
|
||||
word uopseq, valseq, idxseq
|
||||
|
||||
deref = rvalue
|
||||
deref = r_val
|
||||
optos = opsp
|
||||
type = 0
|
||||
value = 0
|
||||
@ -253,7 +253,7 @@ def parse_value(codeseq, rvalue)#2
|
||||
is LOGIC_NOT_TKN
|
||||
uopseq = gen_uop(uopseq, token);
|
||||
is ADD_TKN
|
||||
if not rvalue; exit_err(ERR_INVAL|ERR_SYNTAX); fin
|
||||
if not r_val; exit_err(ERR_INVAL|ERR_SYNTAX); fin
|
||||
break
|
||||
is BPTR_TKN
|
||||
is WPTR_TKN
|
||||
@ -307,12 +307,12 @@ def parse_value(codeseq, rvalue)#2
|
||||
deref--
|
||||
break
|
||||
is DROP_TKN
|
||||
if rvalue; exit_err(ERR_INVAL|ERR_STATE); fin
|
||||
if r_val; exit_err(ERR_INVAL|ERR_STATE); fin
|
||||
codeseq = gen_op(codeseq, DROP_CODE)
|
||||
scan
|
||||
return codeseq, 0 // Special case return
|
||||
is LAMBDA_TKN
|
||||
if not rvalue; return codeseq, 0; fin // Lambdas can't be LVALUES
|
||||
if not r_val; return codeseq, 0; fin // Lambdas can't be LVALUES
|
||||
value = parse_lambda
|
||||
valseq = gen_opglbl(NULL, GADDR_CODE, value, 0)
|
||||
deref--
|
||||
@ -444,7 +444,7 @@ def parse_value(codeseq, rvalue)#2
|
||||
//
|
||||
// Resolve outstanding dereference pointer loads
|
||||
//
|
||||
while deref > rvalue
|
||||
while deref > r_val
|
||||
if type & FUNC_TYPE
|
||||
if cfnparms; exit_err(ERR_MISS|ERR_ID); fin
|
||||
valseq = gen_op(valseq, ICAL_CODE)
|
||||
@ -478,7 +478,7 @@ def parse_value(codeseq, rvalue)#2
|
||||
//
|
||||
// Wrap up LVALUE store
|
||||
//
|
||||
if not rvalue
|
||||
if not r_val
|
||||
if type & (BYTE_TYPE | BPTR_TYPE)
|
||||
valseq = gen_op(valseq, SB_CODE)
|
||||
elsif type & (WORD_TYPE | WPTR_TYPE)
|
||||
|
@ -257,7 +257,7 @@ predef emit_pending_seq#0
|
||||
//
|
||||
// Module relocation base address
|
||||
//
|
||||
const MODADDR = $1000
|
||||
const RELADDR = $1000
|
||||
//
|
||||
// Exports for optimizer module
|
||||
//
|
||||
|
@ -1,4 +1,4 @@
|
||||
const MODADDR = $1000
|
||||
const RELADDR = $1000
|
||||
const inbuff = $200
|
||||
const freemem = $0006
|
||||
//
|
||||
@ -792,7 +792,7 @@ def loadmod(mod)#1
|
||||
memcpy(@header, heap, 128)
|
||||
modsize = header:0
|
||||
moddep = @header.1
|
||||
defofst = modsize + MODADDR
|
||||
defofst = modsize + RELADDR
|
||||
init = 0
|
||||
if rdlen > 4 and heap=>2 == $DA7F // DAVE+1 = magic number :-)
|
||||
//
|
||||
@ -841,7 +841,7 @@ def loadmod(mod)#1
|
||||
// Apply all fixups and symbol import/export.
|
||||
//
|
||||
modfix = modaddr - modfix
|
||||
modofst = modfix - MODADDR
|
||||
modofst = modfix - RELADDR
|
||||
modend = modaddr + modsize
|
||||
bytecode = defofst + modofst
|
||||
defofst = bytecode - defofst
|
||||
|
@ -1,7 +1,7 @@
|
||||
const MACHID = $BF98
|
||||
const iobuffer = $0800
|
||||
const databuff = $2000
|
||||
const MODADDR = $1000
|
||||
const RELADDR = $1000
|
||||
const symtbl = $0C00
|
||||
const freemem = $0006
|
||||
const getlnbuf = $01FF
|
||||
@ -935,7 +935,7 @@ def loadmod(mod)#1
|
||||
rdlen = read(refnum, @header, 128)
|
||||
modsize = header:0
|
||||
moddep = @header.1
|
||||
defofst = modsize + MODADDR
|
||||
defofst = modsize + RELADDR
|
||||
init = 0
|
||||
if rdlen > 4 and header:2 == $DA7F // DAVE+1 = magic number :-)
|
||||
//
|
||||
@ -999,7 +999,7 @@ def loadmod(mod)#1
|
||||
// Apply all fixups and symbol import/export.
|
||||
//
|
||||
modfix = modaddr - modfix
|
||||
modofst = modfix - MODADDR
|
||||
modofst = modfix - RELADDR
|
||||
modend = modaddr + modsize
|
||||
bytecode = defofst + modofst
|
||||
rld = modend // Re-Locatable Directory
|
||||
|
@ -925,8 +925,8 @@ ICALADR JSR $FFFF
|
||||
STA IPH
|
||||
PLA
|
||||
STA IPL
|
||||
LDY #$00
|
||||
JMP NEXTOP
|
||||
LDY #$01
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT
|
||||
;*
|
||||
@ -952,8 +952,8 @@ ENTER INY
|
||||
DEY
|
||||
STA (IFP),Y
|
||||
BNE -
|
||||
+ LDY #$02
|
||||
JMP NEXTOP
|
||||
+ LDY #$03
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* LEAVE FUNCTION
|
||||
;*
|
||||
|
@ -1419,8 +1419,8 @@ CALL +INC_IP
|
||||
BIT LCRWEN+LCBNK2
|
||||
BIT LCRWEN+LCBNK2
|
||||
}
|
||||
LDY #$00
|
||||
JMP NEXTOP
|
||||
LDY #$01
|
||||
JMP FETCHOP
|
||||
;
|
||||
CALLX +INC_IP
|
||||
LDA (IP),Y
|
||||
@ -1455,8 +1455,8 @@ CALLX +INC_IP
|
||||
BIT LCRWEN+LCBNK2
|
||||
BIT LCRWEN+LCBNK2
|
||||
}
|
||||
LDY #$00
|
||||
JMP NEXTOP
|
||||
LDY #$01
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* INDIRECT CALL TO ADDRESS (NATIVE CODE)
|
||||
;*
|
||||
@ -1483,8 +1483,8 @@ ICAL LDA ESTKL,X
|
||||
BIT LCRWEN+LCBNK2
|
||||
BIT LCRWEN+LCBNK2
|
||||
}
|
||||
LDY #$00
|
||||
JMP NEXTOP
|
||||
LDY #$01
|
||||
JMP FETCHOP
|
||||
;
|
||||
ICALX LDA ESTKL,X
|
||||
STA TMPL
|
||||
@ -1517,8 +1517,8 @@ ICALX LDA ESTKL,X
|
||||
BIT LCRWEN+LCBNK2
|
||||
BIT LCRWEN+LCBNK2
|
||||
}
|
||||
LDY #$00
|
||||
JMP NEXTOP
|
||||
LDY #$01
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* JUMP INDIRECT TRHOUGH TMP
|
||||
;*
|
||||
@ -1551,8 +1551,8 @@ ENTER INY
|
||||
DEY
|
||||
STA (IFP),Y
|
||||
BNE -
|
||||
+ LDY #$02
|
||||
JMP NEXTOP
|
||||
+ LDY #$03
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* LEAVE FUNCTION
|
||||
;*
|
||||
|
@ -1064,8 +1064,8 @@ CALLADR JSR $FFFF
|
||||
STA IPH
|
||||
PLA
|
||||
STA IPL
|
||||
LDY #$00
|
||||
JMP NEXTOP
|
||||
LDY #$01
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* INDIRECT CALL TO ADDRESS (NATIVE CODE)
|
||||
;*
|
||||
@ -1090,8 +1090,8 @@ ICALADR JSR $FFFF
|
||||
STA IPH
|
||||
PLA
|
||||
STA IPL
|
||||
LDY #$00
|
||||
JMP NEXTOP
|
||||
LDY #$01
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT
|
||||
;*
|
||||
@ -1120,8 +1120,8 @@ ENTER INY
|
||||
DEY
|
||||
STA (IFP),Y
|
||||
BNE -
|
||||
+ LDY #$02
|
||||
JMP NEXTOP
|
||||
+ LDY #$03
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* LEAVE FUNCTION
|
||||
;*
|
||||
|
@ -7,7 +7,7 @@
|
||||
;**********************************************************
|
||||
!CPU 65816
|
||||
SELFMODIFY = 0
|
||||
DEBUG = 0
|
||||
DEBUG = 1
|
||||
;*
|
||||
;* THE DEFAULT CPU MODE FOR EXECUTING OPCODES IS:
|
||||
;* 16 BIT A/M
|
||||
@ -592,14 +592,14 @@ _DIV STY IPY
|
||||
_DIV1 ASL ; DVDND
|
||||
DEY
|
||||
BCC _DIV1
|
||||
STA TMP ;NOS,S ; DVDND
|
||||
STA TMP ; NOS,S ; DVDND
|
||||
LDA #$0000 ; REMNDR
|
||||
_DIVLP ROL ; REMNDR
|
||||
CMP TOS+2,S ; DVSR
|
||||
BCC +
|
||||
SBC TOS+2,S ; DVSR
|
||||
SEC
|
||||
+ ROL TMP ;NOS,S ; DVDND
|
||||
+ ROL TMP ; NOS,S ; DVDND
|
||||
DEY
|
||||
BNE _DIVLP
|
||||
_DIVEX LDY IPY
|
||||
@ -1379,8 +1379,8 @@ EMUSTK STA TMP
|
||||
LDX LCRWEN+LCBNK2
|
||||
LDX LCRWEN+LCBNK2
|
||||
}
|
||||
LDY #$00
|
||||
JMP NEXTOP
|
||||
LDY #$01
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* CALL INTO ABSOLUTE ADDRESS (NATIVE CODE)
|
||||
;*
|
||||
@ -1497,8 +1497,8 @@ EMUSTKX STA TMP
|
||||
LDX LCRWEN+LCBNK2
|
||||
LDX LCRWEN+LCBNK2
|
||||
}
|
||||
LDY #$00
|
||||
JMP NEXTOP
|
||||
LDY #$01
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* JUMP INDIRECT THROUGH TMP
|
||||
;*
|
||||
@ -1543,8 +1543,8 @@ ENTER INY
|
||||
BNE -
|
||||
STX ESP
|
||||
+ +ACCMEM16 ; 16 BIT A/M
|
||||
LDY #$02
|
||||
JMP NEXTOP
|
||||
LDY #$03
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* LEAVE FUNCTION
|
||||
;*
|
||||
@ -1598,6 +1598,7 @@ LEAVE +ACCMEM8 ; 8 BIT A/M
|
||||
STA IFP
|
||||
SEC ; SWITCH TO EMULATED MODE
|
||||
XCE
|
||||
!AS
|
||||
LDA PSR
|
||||
PHA
|
||||
PLP
|
||||
@ -1828,9 +1829,9 @@ STEP STX TMPL
|
||||
TSX
|
||||
CMP #$10
|
||||
BCC DBGKEY
|
||||
; LDX TMPL
|
||||
; CPX #$56 ; FORCE PAUSE AT 'ICAL'
|
||||
; BEQ DBGKEY
|
||||
LDX TMPL
|
||||
CPX #$54 ; FORCE PAUSE AT 'CALL'
|
||||
BEQ DBGKEY
|
||||
- LDX $C000
|
||||
CPX #$9B
|
||||
BNE +
|
||||
|
@ -1,5 +1,5 @@
|
||||
const membank = $FFEF
|
||||
const MODADDR = $1000
|
||||
const RELADDR = $1000
|
||||
//
|
||||
// System flags: memory allocator screen holes.
|
||||
//
|
||||
@ -81,7 +81,7 @@ byte sextstr[] = "SEXT"
|
||||
byte divmodstr[] = "DIVMOD"
|
||||
byte loadstr[] = "MODLOAD"
|
||||
byte execstr[] = "MODEXEC"
|
||||
byte modadrstr[] = "MODADDR"
|
||||
byte modadrstr[] = "RELADDR"
|
||||
byte prefix[] // Overlay with exported symbols table
|
||||
word exports[] = @sysmodstr, @version
|
||||
word = @sysstr, @syscall
|
||||
@ -1007,7 +1007,7 @@ def loadmod(mod)#1
|
||||
rdlen = read(refnum, @header, 128)
|
||||
modsize = header:0
|
||||
moddep = @header.1
|
||||
defofst = modsize + MODADDR
|
||||
defofst = modsize + RELADDR
|
||||
init = 0
|
||||
if rdlen > 4 and header:2 == $DA7F // DAVE+1 = magic number :-)
|
||||
//
|
||||
@ -1073,7 +1073,7 @@ def loadmod(mod)#1
|
||||
// Apply all fixups and symbol import/export.
|
||||
//
|
||||
modfix = modaddr - modfix
|
||||
modofst = modfix - MODADDR
|
||||
modofst = modfix - RELADDR
|
||||
modend = modaddr + modsize
|
||||
bytecode = defofst + modofst
|
||||
rld = modend // Re-Locatable Directory
|
||||
|
Loading…
x
Reference in New Issue
Block a user