ack/mach/z80/libem/cms.s

39 lines
356 B
ArmAsm
Raw Normal View History

1985-03-29 21:44:50 +00:00
.define .cms
1987-02-02 13:30:20 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1985-03-29 21:44:50 +00:00
! 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)