home *** CD-ROM | disk | FTP | other *** search
- ;----------------------------------------------------------------------------
- ; Mode13h - DOS 16bit realmode (Turbo Pascal version)
- ; Copyright (c) 1994,95 by J.E. Hoffmann
- ; All rights reserved
- ;----------------------------------------------------------------------------
- TITLE _VGAPAS.ASM
-
-
- MODEL LARGE,PASCAL
-
-
- IDEAL
- NOJUMPS
- LOCALS @@
-
-
-
- INCLUDE "_VGAXASM.INC"
-
-
-
- PUBLIC Init13h
- PUBLIC Done13h
- PUBLIC IsColorVGA
- PUBLIC WaitVertRetrace
- PUBLIC ClearScreen
- PUBLIC ShowVBuffer
- PUBLIC SetDACBlock
-
-
- DATASEG
- OldMode db 3
- EXTRN _VirtualVSeg :WORD
-
-
-
- CODESEG
- P386N
-
-
-
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- ; extern void pascal far Init13h(void);
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- PROC Init13h FAR
- mov ah,0Fh
- int 10h
- mov [OldMode],al
- mov ax,0013h
- int 10h
- ret
- ENDP
-
-
-
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- ; extern void pascal far Done13h(void);
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- PROC Done13h FAR
- movzx ax,[OldMode]
- int 10h
- ret
- ENDP
-
-
-
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- ; extern int pascal far IsColorVGA(void);
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- PROC IsColorVGA FAR
- mov ax,1A00h
- int 10h
- cmp al,1Ah
- jne @@10
- cmp bl,08h
- jne @@10
- mov ax,1
- jmp @@12
- @@10:
- xor ax,ax
- @@12:
- ret
- ENDP
-
-
-
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- ; extern void pascal far WaitVertRetrace(void);
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- PROC WaitVertRetrace FAR
- mov dx,GR_InputStatus1
- @@11:
- in al,dx
- test al,08h
- jne @@11
- @@12:
- in al,dx
- test al,08h
- je @@12
- ret
- ENDP
-
-
-
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- ; extern void pascal far ClearScreen(char Col);
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- PROC ClearScreen FAR Col :Byte
- pusha
- push es
- mov es,[_VirtualVSeg]
- xor di,di
- mov cx,64000/4
- mov al,[Col]
- mov ah,al
- push ax
- rol eax,16
- pop ax
- repne stosd
- pop es
- popa
- ret
- ENDP
-
-
-
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- ; extern void pascal far ShowVBuffer(void);
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- PROC ShowVBuffer FAR
- push ds
- mov ax,0A000h
- mov es,ax
- xor di,di
- mov ax,[_VirtualVSeg]
- mov ds,ax
- xor si,si
- mov cx,64000/4
- repne movsd
- pop ds
- ret
- ENDP
-
-
-
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- ; extern void pascal far SetDACBlock(char StartReg, int Count, void *Block);
- ;≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
- PROC SetDACBlock FAR StartReg:Byte, Count:Word, Block :DWord
- push ds
- cld
- lds si,[Block]
- mov dx,DC_PELAddressWriteMode
- mov al,[StartReg]
- out dx,al
- inc dx
- mov ax,[Count]
- mov cx,ax
- shl cx,1
- add cx,ax
- repne outsb
- pop ds
- ret
- ENDP
- END
-
-
-
-