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 .dup
|
|
|
|
|
|
|
|
! #bytes in cx
|
1987-01-08 10:13:48 +00:00
|
|
|
.sect .text
|
1985-02-07 15:33:13 +00:00
|
|
|
.dup:
|
|
|
|
pop bx ! return address
|
1987-06-09 10:22:50 +00:00
|
|
|
mov ax,si
|
|
|
|
mov dx,di
|
1985-02-07 15:33:13 +00:00
|
|
|
mov si,sp
|
|
|
|
sub sp,cx
|
|
|
|
mov di,sp
|
|
|
|
sar cx,1
|
|
|
|
rep movs
|
1987-06-09 10:22:50 +00:00
|
|
|
mov si,ax
|
|
|
|
mov di,dx
|
1985-02-07 15:33:13 +00:00
|
|
|
jmp bx
|