.model medium, basic
.486
.code
public gsblit
gsblit proc

;stack:
;bp+14   seg
;bp+12   ofs
;bp+10   size
;bp+8    #
;bp+6    retseg
;bp+4    retofs
;bp+2    bp
;bp      ds
push es
push bp

;

xor eax, eax ;bah. 32-bit register delay in dos mode :o(
mov bp, sp

;

mov es, [bp+14]
mov al, [bp+8]

mov ah, al
mov di, [bp+12]

push ax
mov cx, [bp+10]

;

bswap eax

shr cx, 2
pop ax

rep stosd

pop bp
pop es

ret 8
gsblit endp
end
