1985-03-18 12:46:51 +00:00
|
|
|
.define .ngi4
|
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
|
|
|
|
|
|
|
! Exchange 32 bits integer by its two's complement
|
|
|
|
! Expects operand on stack
|
|
|
|
! Yields result on stack
|
|
|
|
|
|
|
|
.ngi4: pop d
|
|
|
|
lxi h,0
|
|
|
|
dad sp
|
|
|
|
xra a
|
|
|
|
sub m
|
|
|
|
mov m,a
|
|
|
|
inx h
|
|
|
|
mvi a,0
|
|
|
|
sbb m
|
|
|
|
mov m,a
|
|
|
|
inx h
|
|
|
|
mvi a,0
|
|
|
|
sbb m
|
|
|
|
mov m,a
|
|
|
|
inx h
|
|
|
|
mvi a,0
|
|
|
|
sbb m
|
|
|
|
mov m,a
|
|
|
|
push d
|
|
|
|
ret
|