home *** CD-ROM | disk | FTP | other *** search
- ;[]------------------------------------------------------------------------[]
- ;| |
- ;| (c) 1993,1994 by Marc van Shaney , aka Kaya Memisoglu |
- ;| |
- ;| Dieser Assembler-Source-Code unterliegt dem Urheberrecht von Kaya |
- ;| Memisoglu und darf auch nur mit seiner schriftlichen Genehmigung |
- ;| in kommerziellen Programmen verwendet werden. |
- ;| Ich übernehme keinerlei Verantwortung für eventuelle Schäden,die dieses |
- ;| Programm verursacht. |
- ;| |
- ;| |
- ;| 18.12.1994 Kaya Memisoglu |
- ;| |
- ;[]------------------------------------------------------------------------[]
-
-
- P386
- JUMPS
-
- LOCALS
- VGA_Width equ 320
- VGA_Height equ 200
- VGA_Segment equ 0a000h
- VGA_Mode equ 13h
- Char_Segment equ 0f000h
- Char_Offset equ 0fa6eh
- Text_Mode equ 3
- Black equ 240
- Background equ 255
- VGA_Adresse equ 0a0000000h
-
- CRTC_Index equ 3d4h
- CRTC_Data equ 3d5h
- CRTC_Status equ 3dah
- Display_Enable equ 01
- Vertical_Sync equ 08
-
-
- .MODEL USE16 LARGE
- .Code
-
-
- PUBLIC C Init_Graphic
- Init_Graphic PROC
- push ds
- mov al,VGA_Mode
- mov ah,0
- int 10h
- mov ah,10h
- mov al,01h
- mov bh,0
- int 10h
-
- pop ds
- retcode
- Init_Graphic ENDP
-
-
-
-
-
- PUBLIC C Exit_Graphic
- Exit_Graphic PROC
- push ds
-
- mov al,Text_Mode
- mov ah,0
- int 10h
-
- pop ds
- retcode
- Exit_Graphic ENDP
-
-
-
-
-
-
-
-
- PUBLIC C Set_Colour
- Set_Colour PROC
- ARG COLOR:DATAPTR,Nummer:Word
- push bp
- mov bp,sp
- cli
-
- les bx,COLOR ;In ES:DI Zeiger auf Farbe
- mov dx,03c8h
- mov ax,Nummer ;In AX die Farbnummer
- out dx,al
- inc dx ;Neue Portadresse
- mov al,byte ptr[es:bx]
- shr al,2 ;2 Bit nach rechts verschieben
- out dx,al
- mov al,byte ptr[es:bx+1]
- shr al,2 ;2 Bit nach rechts verschieben
- out dx,al
- mov al,byte ptr[es:bx+2]
- shr al,2 ;2 Bit nach rechts verschieben
- out dx,al
-
- sti
- pop bp
- retcode
- Set_Colour ENDP
-
-
-
-
- PUBLIC C Put_Frame
- Put_Frame PROC
- ARG frame:dataptr
- push bp
- mov bp,sp
- push si
- push di
-
- mov cx,3e80h
- lfs si,frame
- mov ax,VGA_Segment
- mov es,ax
- xor di,di
- rep movs dword ptr [es:di],[fs:si]
-
- pop di
- pop si
- pop bp
- retcode
- Put_Frame ENDP
-
- END