This commit is contained in:
Frater 2017-09-24 01:45:36 +02:00
commit 43352ff262
1291 changed files with 220976 additions and 0 deletions

88
PAM/COPPER.ASM Normal file
View file

@ -0,0 +1,88 @@
IDEAL
MODEL large
P386
CODESEG
PUBLIC C frame_count, C init_copper, C close_copper, C cop_pal, C do_pal
twait dw 0
frame_count dw 0
cop_pal dd 0
do_pal dw 0
PROC close_copper
mov bx, 7
mov ax, 0
mov cx, 0
mov dx, 0
int 0fch
mov bx, 7
mov ax, 1
mov cx, 0
mov dx, 0
int 0fch
mov bx, 7
mov ax, 2
mov cx, 0
mov dx, 0
int 0fch
ret
ENDP
PROC init_copper
mov bx, 7
mov ax, 1
mov cx, OFFSET copper3
mov dx, SEG copper3
int 0fch
mov bx, 7
mov ax, 2
mov cx, OFFSET copper2
mov dx, SEG copper2
int 0fch
mov bx, 7
mov ax, 0
mov cx, OFFSET copper3
mov dx, SEG copper3
int 0fch
ret
ENDP
PROC copper2
inc [cs:frame_count]
cmp [cs:do_pal], 0d
je @@no_pal
pusha
push ds
lds si, [cs:cop_pal]
mov cx, 768d
mov dx, 3c8h
mov al, 0d
out dx, al
inc dx
rep outsb
mov [cs:do_pal], 0d
pop ds
popa
@@no_pal:
retf
ENDP
PROC copper3
retf
ENDP
END