implemented NEGOP math routine
This commit is contained in:
1 parent
733bf8d2ba
commit
0e319d9871
4 files changed
+11
-5
No files matched your search
@@ -0,0 +1,22 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - toggle FAC1 sign (if not 0)
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 117
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
|
||||
NEGOP:
|
||||
|
||||
lda FAC1_exponent
|
||||
beq !+ // do not toggle the sign if value is 0
|
||||
|
||||
lda FAC1_sign
|
||||
eor #$FF
|
||||
sta FAC1_sign
|
||||
!:
|
||||
rts
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
Reference in new issue
Block a user