ack/mach/z80/libem/cms.s
1985-03-29 21:44:50 +00:00

34 lines
298 B
ArmAsm

.define .cms
! any size sets
! parameters:
! hl: size
! stack: second operand
! first operand
! stack: result (out)
.cms:
pop ix
ld b,h
ld c,l
add hl,sp
0:
dec sp
pop af
cpi
jr nz,1f
ld a,b
or c
jr nz,0b
ld de,0
jr 2f
1:
add hl,bc
ld de,1
2:
ld sp,hl
push de
jp (ix)