Update to work with multiple-step shifts in Thingamajig v1.1-dev
This commit is contained in:
parent
339f117e58
commit
92b1c81162
24
gidubba.asm
24
gidubba.asm
|
@ -189,10 +189,7 @@ getarg: load r0, arg1
|
|||
breq r0, r1, cmderr
|
||||
xor r2, r2
|
||||
xor r2, r0
|
||||
shl r2
|
||||
shl r2
|
||||
shl r2
|
||||
shl r2
|
||||
shl r2, 4
|
||||
;Second digit
|
||||
load r0, arg1 + 1
|
||||
cleq r0, r0, hex2n
|
||||
|
@ -208,10 +205,7 @@ getarg: load r0, arg1
|
|||
breq r0, r1, cmderr
|
||||
xor r2, r2
|
||||
xor r2, r0
|
||||
shl r2
|
||||
shl r2
|
||||
shl r2
|
||||
shl r2
|
||||
shl r2, 4
|
||||
;Fourth digit
|
||||
load r0, arg1 + 3
|
||||
cleq r0, r0, hex2n
|
||||
|
@ -229,10 +223,7 @@ getarg: load r0, arg1
|
|||
breq r0, r1, cmderr
|
||||
xor r2, r2
|
||||
xor r2, r0
|
||||
shl r2
|
||||
shl r2
|
||||
shl r2
|
||||
shl r2
|
||||
shl r2, 4
|
||||
;Second digit
|
||||
load r0, arg2 + 1
|
||||
cleq r0, r0, hex2n
|
||||
|
@ -985,11 +976,11 @@ sumlop: xor r1, r1
|
|||
xor r1, r1
|
||||
xor r1, r2
|
||||
;Shift the carry
|
||||
shl r2
|
||||
shl r2, 1
|
||||
|
||||
;Check for and store overflow if any
|
||||
;Check
|
||||
rol r1
|
||||
rol r1, 1
|
||||
breq r1, r2, nvrflw
|
||||
;Store
|
||||
load r1, #1
|
||||
|
@ -1291,10 +1282,7 @@ bt2hex: xor r2, r2
|
|||
xor r2, r1
|
||||
|
||||
;Convert the high nibble to a digit
|
||||
ror r0
|
||||
ror r0
|
||||
ror r0
|
||||
ror r0
|
||||
ror r0, 4
|
||||
cleq r0, r0, n2hex
|
||||
|
||||
;Load the digit of the low nibble to r1
|
||||
|
|
Loading…
Reference in New Issue