mirror of
https://github.com/Russell-S-Harper/COMMON.git
synced 2024-11-21 20:31:02 +00:00
Setting result to largest value for true overflow.
This commit is contained in:
parent
8edcce337d
commit
4c38ba57de
@ -599,10 +599,12 @@ _3 JSR _CMPDC ; is D < C?
|
|||||||
ROL _RB+3
|
ROL _RB+3
|
||||||
BCC _3
|
BCC _3
|
||||||
; carry is set, means a real overflow condition
|
; carry is set, means a real overflow condition
|
||||||
LDA _R0+3,X
|
LDA #$FF ; set to the maximum
|
||||||
ORA #_F_O
|
STA _R0,X
|
||||||
|
STA _R0+1,X
|
||||||
|
STA _R0+2,X
|
||||||
|
LDA #_MAX_V|_F_O
|
||||||
STA _R0+3,X
|
STA _R0+3,X
|
||||||
BEQ _4
|
|
||||||
JMP _9
|
JMP _9
|
||||||
_4 LDA _RB ; is RB > 0?
|
_4 LDA _RB ; is RB > 0?
|
||||||
ORA _RB+1
|
ORA _RB+1
|
||||||
|
@ -131,6 +131,7 @@ _MOD_C = $e0
|
|||||||
_EXT_C = $f0
|
_EXT_C = $f0
|
||||||
|
|
||||||
; common constants
|
; common constants
|
||||||
|
_MAX_V = $3f ; i.e. the $3f part of $3fffffff
|
||||||
|
|
||||||
; plus and minus 1 for increment and decrement
|
; plus and minus 1 for increment and decrement
|
||||||
_PLS_1 = %00000100 ; i.e. the $04 part of $00000400
|
_PLS_1 = %00000100 ; i.e. the $04 part of $00000400
|
||||||
|
Loading…
Reference in New Issue
Block a user