1985-03-18 12:46:51 +00:00
|
|
|
.define .adi4
|
1987-01-28 18:57:04 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
|
|
|
.sect .text
|
1985-03-18 12:46:51 +00:00
|
|
|
|
|
|
|
! Add two 32 bits signed or unsigned integers
|
|
|
|
! Expects on stack: operands
|
|
|
|
! Yields on stack: result
|
|
|
|
|
|
|
|
.adi4: pop h
|
|
|
|
shld .retadr ! get return address out of the way
|
|
|
|
pop d
|
|
|
|
pop h
|
|
|
|
xthl
|
|
|
|
dad d
|
|
|
|
shld .tmp1
|
|
|
|
pop d
|
|
|
|
pop h
|
|
|
|
jnc 1f
|
|
|
|
inx h
|
|
|
|
1: dad d
|
|
|
|
push h
|
|
|
|
lhld .tmp1
|
|
|
|
push h
|
|
|
|
lhld .retadr
|
|
|
|
pchl
|