Take advantage of tail call optimization where possible in calculator.asm

This commit is contained in:
Juhani Krekelä 2022-09-15 17:30:41 +03:00
parent 41bdec1b12
commit 95b7c676b2
1 changed files with 4 additions and 12 deletions

View File

@ -334,9 +334,7 @@ fUnpack:
cleq r0, r0, stLowNybble
cleq r0, r0, stOver
cleq r0, r0, stStoreByte
cleq r0, r0, stDec
ret
breq r0, r0, stDec
; ptr -- f
fPack:
@ -388,9 +386,7 @@ fPack:
cleq r0, r0, stLoadByte
cleq r0, r0, stOr
cleq r0, r0, stSwap
cleq r0, r0, stInc
ret
breq r0, r0, stInc
; ------------------------------------------------------------------
; Unpacked floating point variables
@ -602,9 +598,7 @@ fPrint:
load r0, fArg1+2
cleq r0, r0, writehexNybble
load r0, fArg1+3
cleq r0, r0, writehexNybble
ret
breq r0, r0, writehexNybble
fPrintNegativeExponent:
cleq r0, r0, popWord ; Remove result we don't need
@ -678,9 +672,7 @@ fPrint:
cleq r0, r0, popWord
xor r0, r0
or r0, r1
cleq r0, r0, writehexNybble
ret
breq r0, r0, writehexNybble
fPrintOverflow:
load r0, #4f ; O