mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-01-13 03:30:28 +00:00
Bring CMD up to current
This commit is contained in:
parent
3b3a469e2a
commit
10afdb5d29
@ -504,12 +504,11 @@ asm dcitos
|
||||
STA SRCH
|
||||
LDY #$00
|
||||
- LDA (SRC),Y
|
||||
INY
|
||||
PHA
|
||||
AND #$7F
|
||||
CMP (SRC),Y
|
||||
INY
|
||||
STA (DST),Y
|
||||
PLA
|
||||
BMI -
|
||||
BCC -
|
||||
TYA
|
||||
LDY #$00
|
||||
STA (DST),Y
|
||||
@ -805,52 +804,21 @@ def allocxheap(size)
|
||||
return xaddr
|
||||
end
|
||||
;
|
||||
; DCI table routines,
|
||||
;
|
||||
;def dumptbl(tbl)
|
||||
; byte len
|
||||
;
|
||||
; while ^tbl
|
||||
; len = 0
|
||||
; while ^tbl & $80
|
||||
; cout(^tbl)
|
||||
; tbl = tbl + 1
|
||||
; len = len + 1
|
||||
; loop
|
||||
; cout(^tbl)
|
||||
; tbl = tbl + 1
|
||||
; cout(':')
|
||||
; while len < 15
|
||||
; cout(' ')
|
||||
; len = len + 1
|
||||
; loop
|
||||
; cout('$')
|
||||
; prword(*tbl)
|
||||
; crout
|
||||
; tbl = tbl + 2
|
||||
; loop
|
||||
;end
|
||||
def addtbl(dci, val, last)
|
||||
word tblentry
|
||||
tblentry = *last
|
||||
while ^dci & $80
|
||||
^tblentry = ^dci
|
||||
tblentry = tblentry + 1
|
||||
dci = dci + 1
|
||||
loop
|
||||
(tblentry).0 = ^dci
|
||||
(tblentry):1 = val
|
||||
*last = tblentry + 3
|
||||
^*last = 0
|
||||
end
|
||||
;
|
||||
; Symbol table routines.
|
||||
;
|
||||
def lookupsym(sym)
|
||||
return lookuptbl(sym, symtbl)
|
||||
end
|
||||
def addsym(sym, addr)
|
||||
return addtbl(sym, addr, @lastsym);
|
||||
while ^sym & $80
|
||||
^lastsym = ^sym
|
||||
lastsym = lastsym + 1
|
||||
sym = sym + 1
|
||||
loop
|
||||
(lastsym).0 = ^sym
|
||||
(lastsym):1 = addr
|
||||
lastsym = lastsym + 3
|
||||
^lastsym = 0
|
||||
end
|
||||
;
|
||||
; Module routines.
|
||||
@ -861,7 +829,7 @@ def lookupmod(mod)
|
||||
end
|
||||
def addmod(mod, addr)
|
||||
byte dci[17]
|
||||
return addtbl(modtosym(mod, @dci), addr, @lastsym)
|
||||
return addsym(modtosym(mod, @dci), addr)
|
||||
end
|
||||
def lookupextern(esd, index)
|
||||
word sym, addr
|
||||
|
Loading…
x
Reference in New Issue
Block a user