home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
C-ASM_VI.ARJ
/
PROGASM.ZIP
/
EGALIBP.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-05-01
|
4KB
|
139 lines
PAGE 94,118
TITLE PROGP.ASM - Pascal Assembly Examples for EGA Programmers Guide
NAME PROGP
;************************************************************************
; *
; File: PROGP.ASM *
; Author: Steve Blair *
; Date: April 16, 1988 *
; Description: Assembly procedures with examples for programming *
; the EGA/VGA. These are Pascal compatible examples for *
; the Programmer's Guide to EGA/VGA. *
; *
;************************************************************************
DATA SEGMENT WORD PUBLIC 'DATA'
DATA ENDS
CODE SEGMENT BYTE PUBLIC 'CODE'
ASSUME DS:DATA, CS:CODE
;************************************************************************
; Video BIOS Data Area Locations *
;************************************************************************
BIOS_Mode EQU 449H ;Location of current mode
BIOS_CRT_Addr EQU 463H ;Address of CRT controller
BIOS_Rows EQU 484H ;Number of text rows
BIOS_Columns EQU 44AH ;Number of text columns
BIOS_Height EQU 485H ;Character height
BIOS_Page_Size EQU 44CH ;Number of bytes in one page
BIOS_Curs_Mode EQU 460H ;Cursor start and end
BIOS_Equipment EQU 487H ;Type of equipment in system
BIOS_Switch EQU 488H ;Configuration switches
BIOS_Curs_Pos EQU 450H ;Current cursor address
BIOS_Curs_Start EQU 460H ;Current cursor shape
BIOS_Curs_Stop EQU 461H
;************************************************************************
;************************************************************************
;**** LOW LEVEL REGISTER ACCESS EXAMPLES ****
;************************************************************************
;************************************************************************
INCLUDE PROG003P.ASM
INCLUDE PROG004P.ASM
INCLUDE PROG006P.ASM
INCLUDE PROG009P.ASM
INCLUDE PROG010P.ASM
INCLUDE PROG012P.ASM
INCLUDE PROG013P.ASM
INCLUDE PROG014P.ASM
INCLUDE PROG071P.ASM
INCLUDE PROG016P.ASM
INCLUDE PROG017P.ASM
INCLUDE PROG018P.ASM
;************************************************************************
;************************************************************************
;**** GETTING INFORMATION EXAMPLES ****
;************************************************************************
;************************************************************************
INCLUDE PROG021P.ASM
INCLUDE PROG022P.ASM
INCLUDE PROG024P.ASM
INCLUDE PROG025P.ASM
INCLUDE PROG027P.ASM
INCLUDE PROG028P.ASM
INCLUDE PROG030P.ASM
INCLUDE PROG031P.ASM
INCLUDE PROG032P.ASM
;************************************************************************
;************************************************************************
;**** TEXT MODES EXAMPLES ****
;************************************************************************
;************************************************************************
INCLUDE PROG041P.ASM
INCLUDE PROG043P.ASM
INCLUDE PROG045P.ASM
INCLUDE PROG047P.ASM
INCLUDE PROG049P.ASM
INCLUDE PROG051P.ASM
INCLUDE PROG053P.ASM
INCLUDE PROG055P.ASM
INCLUDE PROG057P.ASM
INCLUDE PROG059P.ASM
INCLUDE PROG061P.ASM
INCLUDE PROG063P.ASM
INCLUDE PROG064P.ASM
INCLUDE PROG066P.ASM
INCLUDE PROG068P.ASM
INCLUDE PROG070P.ASM
;************************************************************************
;************************************************************************
;**** GRAPHICS MODES EXAMPLES ****
;************************************************************************
;************************************************************************
INCLUDE PROG081P.ASM
INCLUDE PROG083P.ASM
INCLUDE PROG084P.ASM
INCLUDE PROG085P.ASM
INCLUDE PROG086P.ASM
INCLUDE PROG087P.ASM
INCLUDE PROG088P.ASM
INCLUDE PROG089P.ASM
INCLUDE PROG091P.ASM
;************************************************************************
; ticks : Return current value of clock tick *
; which is updated 18.2 times a second *
; exit: Register pair DX,AX will have the 32bit value suitable *
; for return of long integer for MS C compiler. *
;************************************************************************
PUBLIC TICKS
TICKS PROC FAR
PUSH ES ; Point ES to segment zero
XOR AX,AX
MOV ES,AX
MOV AX,ES:[46CH] ; Fetch the current tick value
MOV DX,ES:[46EH]
POP ES
RET
TICKS ENDP
CODE ENDS
END