ack/mach/i80/libem/adi4.s
1987-01-28 18:57:04 +00:00

29 lines
364 B
ArmAsm

.define .adi4
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
! 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