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

24 lines
393 B
ArmAsm

.define .aar2
! 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)