home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume11
/
pc-xbd
/
part02
/
graph.asm
< prev
next >
Wrap
Assembly Source File
|
1990-12-17
|
1KB
|
132 lines
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