ack/mach/z80/libem/aar2.s

29 lines
451 B
ArmAsm
Raw Permalink Normal View History

1985-03-29 21:44:50 +00:00
.define .aar2
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
! special case aar: element size = 2 (statically known)
! parameters:
! on stack
! execution time: 124 states
.aar2:
pop ix ! save return address
pop hl ! pointer to descriptor
ld c,(hl) ! bc := lower bound
inc hl
ld b,(hl)
pop hl ! index
xor a
sbc hl,bc ! index - lwb
add hl,hl ! size*(index-lwb)
pop de ! base address of array
add hl,de
push hl
jp (ix)