model medium, basic
.stack 20h
.386
.code

;Declare Sub GSpCopy(byval sourceseg%,byval sourceoffset%,byval aryseg%, byval aryofs%)

public GSpCopy
GSpCopy proc
;stack layout:
;bp+10  sseg
;bp+8   sofs
;bp+6   aseg
;bp+4   aofs
;bp+2   retseg
;bp+0   retofs
;ds:si = source
;es:di = destination

mov ax, bp
mov bp, sp

mov bx, ds
mov dx, es

mov si, [bp+8]
mov di, [bp+4]

mov ds, [bp+10]
mov es, [bp+6]

mov cx, 16000
rep movsd

mov ds, bx
mov es, dx

mov bp, ax
ret 8

GSpCopy endp
end
