ack/mach/m65oo2/libem/and.s

21 lines
270 B
ArmAsm

.sect .text; .sect .rom; .sect .data; .sect .bss
.define .and
! #bytes in cx
! save di; it might be a register variable
.sect .text
.and:
pop bx ! return address
mov dx,di
mov di,sp
add di,cx
sar cx,1
1:
pop ax
and ax,(di)
stos
loop 1b
mov di,dx
jmp bx