ack/mach/m65oo2/libem/and.s

21 lines
270 B
ArmAsm
Raw Permalink Normal View History

2024-02-22 15:13:52 +00:00
.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