Category : C Source Code
Archive   : WIND.ZIP
Filename : W_MEMCPY.ASM
Output of file : W_MEMCPY.ASM contained in archive : WIND.ZIP
vid_ptr equ [bp+4]
dat_ptr equ [bp+6]
count equ [bp+8]
IFDEF LATTICE
; here's what Lattice uses -- if you're assembling for Lattice C, use
; masm /Dlattice w_memcpy;
DGROUP GROUP DATA
DATA SEGMENT WORD PUBLIC 'DATA'
ASSUME DS:DGROUP,ES:DGROUP,SS:DGROUP
DATA ENDS
PGROUP GROUP PROG
PROG SEGMENT BYTE PUBLIC 'PROG'
ASSUME CS:PGROUP
_snowFlag equ
_vidMem equ
_w_memcpy equ
ELSE
; this works for Microsoft or Turbo C -- assemble with the command:
; masm /MX w_memcpy;
.model small
.code
ENDIF
extrn _vidMem:word,_snowFlag:word
public _w_memcpy
_w_memcpy proc
push bp
mov bp,sp
push es
push si
push di
cld
mov ax,_vidMem
mov es,ax
mov cx,count
or cx,cx
jz done
mov di,vid_ptr
shl di,1
mov si,dat_ptr
test _snowFlag,1
jnz snow
rep movsw
jmp short done
snow: mov dx,3dah
more: lodsw
mov bx,ax
wait1: in al,dx
ror al,1
jb wait1
cli
wait2: in al,dx
ror al,1
jnb wait2
mov ax,bx
stosw
sti
loop more
done: pop di
pop si
pop es
pop bp
ret
_w_memcpy endp
IFDEF LATTICE
PROG ENDS
ENDIF
end
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/