1987-01-08 10:13:48 +00:00
|
|
|
.sect .text; .sect .rom; .sect .data; .sect .bss
|
1985-02-07 15:33:13 +00:00
|
|
|
.define .and
|
|
|
|
|
|
|
|
! #bytes in cx
|
1987-06-09 10:22:50 +00:00
|
|
|
! save di; it might be a register variable
|
|
|
|
|
1987-01-08 10:13:48 +00:00
|
|
|
.sect .text
|
1985-02-07 15:33:13 +00:00
|
|
|
.and:
|
|
|
|
pop bx ! return address
|
1987-06-09 10:22:50 +00:00
|
|
|
mov dx,di
|
1985-02-07 15:33:13 +00:00
|
|
|
mov di,sp
|
|
|
|
add di,cx
|
|
|
|
sar cx,1
|
|
|
|
1:
|
|
|
|
pop ax
|
|
|
|
and ax,(di)
|
|
|
|
stos
|
|
|
|
loop 1b
|
1987-06-09 10:22:50 +00:00
|
|
|
mov di,dx
|
1985-02-07 15:33:13 +00:00
|
|
|
jmp bx
|