Merge pull request #19 from Russell-S-Harper/development

Setting result to largest value for true overflow.
This commit is contained in:
Russell-S-Harper 2018-08-17 22:58:39 -04:00 committed by GitHub
commit 1296af0704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -599,10 +599,12 @@ _3 JSR _CMPDC ; is D < C?
ROL _RB+3
BCC _3
; carry is set, means a real overflow condition
LDA _R0+3,X
ORA #_F_O
LDA #$FF ; set to the maximum
STA _R0,X
STA _R0+1,X
STA _R0+2,X
LDA #_MAX_V|_F_O
STA _R0+3,X
BEQ _4
JMP _9
_4 LDA _RB ; is RB > 0?
ORA _RB+1

View File

@ -131,6 +131,7 @@ _MOD_C = $e0
_EXT_C = $f0
; common constants
_MAX_V = $3f ; i.e. the $3f part of $3fffffff
; plus and minus 1 for increment and decrement
_PLS_1 = %00000100 ; i.e. the $04 part of $00000400