Category : A Collection of Games for DOS and Windows
Archive   : XBD.ZIP
Filename : GRAPH.ASM

 
Output of file : GRAPH.ASM contained in archive : XBD.ZIP
TITLE SOUND.ASM


PAGE ,132




.MODEL SMALL


.CODE


;
; void drawPgm(int x, int y, char *pgm, char mode)
;

PUBLIC _drawPgm

_drawPgm PROC

push bp
mov bp, sp

push si
push di
push es


mov ax, 0A000h
mov es, ax

mov ax, word ptr [BP+06h] ; y
mov bx, 80
mul bx
add ax, word ptr [BP+04h] ; x
mov di, ax

mov si, word ptr [BP+08h] ; pgm
add si, 4


cld

mov dx, 03CEh

mov ax, 0FF08h ; All bits are writen
out dx, ax


mov ax, 0005h ; Write Mode 0
out dx, ax

mov ax, 0003h ; Mode Register SETed
out dx, ax


mov dx, 03C4h
mov bx, 78


push di
mov cx, 16
mov ax, 0102h ; Enable PLAN 0
out dx, ax
l1:
movsw
add di, bx
loop l1
pop di


push di
mov cx, 16
shl ah, 1 ; Enable PLAN 1
out dx, ax
l2:
movsw
add di, bx
loop l2
pop di


push di
mov cx, 16
shl ah, 1 ; Enable PLAN 2
out dx, ax
l3:
movsw
add di, bx
loop l3
pop di


mov cx, 16
shl ah, 1 ; Enable PLAN 3

out dx, ax
l4:
movsw
add di, bx
loop l4


mov ax, 0F02h
out dx, ax

mov dx, 03CEh

mov ax, 0000h
out dx, ax
mov ax, 0001h
out dx, ax
mov ax, 0FF08h
out dx, ax


pop es
pop di
pop si

mov sp, bp
pop bp

ret


_drawPgm ENDP


END


  3 Responses to “Category : A Collection of Games for DOS and Windows
Archive   : XBD.ZIP
Filename : GRAPH.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/