mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-24 20:31:12 +00:00
Better fix for 65802 DIV and MOD bug
This commit is contained in:
parent
b176847778
commit
a92301908a
@ -620,10 +620,10 @@ DIV JSR _DIV
|
||||
;*
|
||||
MOD JSR _DIV
|
||||
STA NOS,S ; REMNDR
|
||||
PLA
|
||||
LDA TMP
|
||||
STA DST ; SAVE IN CASE OF DIVMOD
|
||||
STX DVSIGN
|
||||
TXA
|
||||
PLA
|
||||
TXA ; DIVSGN
|
||||
AND #$0080 ; REMAINDER IS SIGN OF DIVIDEND
|
||||
BNE NEG
|
||||
JMP NEXTOP
|
||||
|
@ -18,6 +18,7 @@ ESTKL = ESTK
|
||||
ESTKH = ESTK+ESTKSZ/2
|
||||
VMZP = ESTK+ESTKSZ
|
||||
ESP = VMZP
|
||||
DVSIGN = VMZP
|
||||
IFP = ESP+1
|
||||
IFPL = IFP
|
||||
IFPH = IFP+1
|
||||
@ -25,8 +26,7 @@ PP = IFP+2
|
||||
PPL = PP
|
||||
PPH = PP+1
|
||||
IPY = PP+2
|
||||
DVSIGN = IPY+1
|
||||
TMP = DVSIGN+1
|
||||
TMP = IPY+1
|
||||
TMPL = TMP
|
||||
TMPH = TMP+1
|
||||
NPARMS = TMPL
|
||||
|
Loading…
x
Reference in New Issue
Block a user