Change trashes → clobbers in calculator.asm

This commit is contained in:
Juhani Krekelä 2022-08-17 02:33:49 +03:00
parent cc933eeac1
commit c89d8e9850
1 changed files with 16 additions and 16 deletions

View File

@ -91,7 +91,7 @@ tmpWordLow: data 0
; out: ; out:
; r0:r1 = word ; r0:r1 = word
; trashes: ; clobbers:
; r2, r3 ; r2, r3
peekWord: peekWord:
cleq r0, r0, popWord cleq r0, r0, popWord
@ -122,7 +122,7 @@ tmpLoadWord23:
; in: ; in:
; r0:r1 = word ; r0:r1 = word
; trashes: ; clobbers:
; r0, r1, r2, r3 ; r0, r1, r2, r3
pushWord: pushWord:
store pushWordLow, r1 store pushWordLow, r1
@ -134,7 +134,7 @@ pushWord:
; out: ; out:
; r0:r1 ; r0:r1
; trashes: ; clobbers:
; r2, r3 ; r2, r3
popWord: popWord:
cleq r0, r0, popByte cleq r0, r0, popByte
@ -150,7 +150,7 @@ popWord:
; in: ; in:
; r0 = byte ; r0 = byte
; trashes: ; clobbers:
; r0, r1, r2, r3 ; r0, r1, r2, r3
pushByte: pushByte:
load r2, SP+0 load r2, SP+0
@ -169,7 +169,7 @@ pushByte:
; out: ; out:
; r0 = byte ; r0 = byte
; trashes: ; clobbers:
; r1, r2, r3 ; r1, r2, r3
popByte: popByte:
load r0, SP+0 load r0, SP+0
@ -211,7 +211,7 @@ loadByte:
; out: ; out:
; r0:r1 = result ; r0:r1 = result
; r2 = carryout ; r2 = carryout
; trashes: ; clobbers:
; r3 ; r3
addWord: addWord:
store addWordFirstHigh, r0 store addWordFirstHigh, r0
@ -246,7 +246,7 @@ addWord:
; out: ; out:
; r0:r1 = result ; r0:r1 = result
; r2 = carryout ; r2 = carryout
; trashes: ; clobbers:
; r3 ; r3
subWord: subWord:
store subWordMinuendHigh, r0 store subWordMinuendHigh, r0
@ -281,7 +281,7 @@ subWord:
; in/out: ; in/out:
; r0:r1 = word ; r0:r1 = word
; trashes: ; clobbers:
; r2, r3 ; r2, r3
incWord: incWord:
store incWordHigh, r0 store incWordHigh, r0
@ -304,7 +304,7 @@ incWord:
; in/out: ; in/out:
; r0:r1 = word ; r0:r1 = word
; trashes: ; clobbers:
; r2, r3 ; r2, r3
decWord: decWord:
store decWordHigh, r0 store decWordHigh, r0
@ -333,7 +333,7 @@ decWord:
; out: ; out:
; r0 = result ; r0 = result
; r1 = carryout ; r1 = carryout
; trashes: ; clobbers:
; r2, r3 ; r2, r3
addByte3: addByte3:
store addByte3ThirdAddend, r2 store addByte3ThirdAddend, r2
@ -358,7 +358,7 @@ addByte3:
; out: ; out:
; r0 = result ; r0 = result
; r1 = carryout ; r1 = carryout
; trashes: ; clobbers:
; r2, r3 ; r2, r3
addByte: addByte:
; Initiliaze carryout to 0 ; Initiliaze carryout to 0
@ -405,7 +405,7 @@ addByte:
; r0 = number in range [0, 0xf] ; r0 = number in range [0, 0xf]
; out: ; out:
; r0 = ascii character corresponding to input ; r0 = ascii character corresponding to input
; trashes: ; clobbers:
; r3 ; r3
nybble2hex: nybble2hex:
xor r3, r3 xor r3, r3
@ -496,7 +496,7 @@ nybble2hex:
; r0 = ascii hex digit ; r0 = ascii hex digit
; out: ; out:
; r0 = corresponding nybble ; r0 = corresponding nybble
; trashes: ; clobbers:
; r3 ; r3
hex2nybble: hex2nybble:
load r3, litchar0 load r3, litchar0
@ -601,7 +601,7 @@ hex2nybble:
; in: ; in:
; r1:r0 = word ; r1:r0 = word
; trashes: ; clobbers:
; r0, r2, r3 ; r0, r2, r3
writehexWord: writehexWord:
cleq r0, r0, writehexByte cleq r0, r0, writehexByte
@ -613,7 +613,7 @@ writehexWord:
; in: ; in:
; r0 = byte ; r0 = byte
; trashes: ; clobbers:
; r0, r2, r3 ; r0, r2, r3
writehexByte: writehexByte:
; Store copy of the byte (as r0 is modified by nybble2hex) ; Store copy of the byte (as r0 is modified by nybble2hex)
@ -640,7 +640,7 @@ writehexByte:
; Common output routines ; Common output routines
; ------------------------------------------------------------------ ; ------------------------------------------------------------------
; trashes: ; clobbers:
; r3 ; r3
newline: newline:
load r3, litcharCR load r3, litcharCR