Compare commits
No commits in common. "9cc8cdef5f6b17c1706e5e83353a09d100f5d70a" and "8356dbbd9305d15d96ccd44ce76c7ef5f69d758b" have entirely different histories.
9cc8cdef5f
...
8356dbbd93
|
@ -1,16 +1,35 @@
|
|||
org 0
|
||||
|
||||
load r0, fResultPtr+0
|
||||
load r1, fResultPtr+1
|
||||
cleq r0, r0, pushWord
|
||||
cleq r0, r0, dumpFloat
|
||||
|
||||
cleq r0, r0, normalize
|
||||
|
||||
xor r0, r0
|
||||
load r1, #12
|
||||
cleq r0, r0, pushWord
|
||||
load r0, fResultPtr+0
|
||||
load r1, fResultPtr+1
|
||||
cleq r0, r0, pushWord
|
||||
cleq r0, r0, dumpFloat
|
||||
dumpFResult:
|
||||
cleq r0, r0, stSwap
|
||||
cleq r0, r0, peekWord
|
||||
or r0, r1
|
||||
xor r2, r2
|
||||
breq r0, r2, dumpFResultEnd
|
||||
cleq r0, r0, stDec
|
||||
|
||||
cleq r0, r0, stSwap
|
||||
cleq r0, r0, stDup
|
||||
cleq r0, r0, stLoadByte
|
||||
cleq r0, r0, popWord
|
||||
xor r0, r0
|
||||
or r0, r1
|
||||
cleq r0, r0, writehexByte
|
||||
load r0, #20
|
||||
store ffff, r0
|
||||
cleq r0, r0, stInc
|
||||
breq r0, r0, dumpFResult
|
||||
|
||||
dumpFResultEnd:
|
||||
cleq r0, r0, newline
|
||||
|
||||
load r0, fResultPtr+0
|
||||
load r1, fResultPtr+1
|
||||
|
@ -59,36 +78,6 @@ printend:
|
|||
cleq r0, r0, newline
|
||||
halt
|
||||
|
||||
dumpFloat:
|
||||
xor r0, r0
|
||||
load r1, #12
|
||||
cleq r0, r0, pushWord
|
||||
dumpFloatLoop:
|
||||
cleq r0, r0, peekWord
|
||||
or r0, r1
|
||||
xor r2, r2
|
||||
breq r0, r2, dumpFloatEnd
|
||||
cleq r0, r0, stDec
|
||||
|
||||
cleq r0, r0, stSwap
|
||||
cleq r0, r0, stDup
|
||||
cleq r0, r0, stLoadByte
|
||||
cleq r0, r0, popWord
|
||||
xor r0, r0
|
||||
or r0, r1
|
||||
cleq r0, r0, writehexByte
|
||||
load r0, #20
|
||||
store ffff, r0
|
||||
cleq r0, r0, stInc
|
||||
cleq r0, r0, stSwap
|
||||
breq r0, r0, dumpFloatLoop
|
||||
|
||||
dumpFloatEnd:
|
||||
cleq r0, r0, popWord
|
||||
cleq r0, r0, popWord
|
||||
breq r0, r0, newline
|
||||
|
||||
|
||||
debug:
|
||||
store debugr0, r0
|
||||
store debugr1, r1
|
||||
|
@ -464,7 +453,7 @@ fResult:
|
|||
data 05 ; exponent
|
||||
data 00
|
||||
data 00
|
||||
data 09 ; overflow
|
||||
data 00 ; overflow
|
||||
data 09 ; mantissa
|
||||
data 09
|
||||
data 09
|
||||
|
@ -886,17 +875,13 @@ normalizeRoundUp:
|
|||
|
||||
breq r0, r0, normalizeRoundUpLoop
|
||||
|
||||
normalizeRoundUpEnd:
|
||||
cleq r0, r0, popWord
|
||||
cleq r0, r0, popWord
|
||||
cleq r0, r0, popWord
|
||||
normalizeRoundUpEnd:
|
||||
cleq r0, r0, popWord
|
||||
cleq r0, r0, popWord
|
||||
cleq r0, r0, popWord
|
||||
|
||||
; Zero out the rounding digit
|
||||
xor r0, r0
|
||||
store fResult+11, r0
|
||||
|
||||
; We might have ended up with a digit in the overflow
|
||||
breq r0, r0, normalize
|
||||
; We might have ended up with a digit in the overflow
|
||||
breq r0, r0, normalize
|
||||
|
||||
normalizeRoundDown:
|
||||
; Zero out the rounding digit
|
||||
|
|
Loading…
Reference in New Issue