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 >
Assembly Source File  |  1988-05-01  |  4KB  |  139 lines

  1.     PAGE    94,118
  2.     TITLE    PROGP.ASM - Pascal Assembly Examples for EGA Programmers Guide
  3.     NAME    PROGP
  4.  
  5. ;************************************************************************
  6. ;                                    *
  7. ;    File:    PROGP.ASM                        *
  8. ;    Author: Steve Blair                        *
  9. ;    Date:    April 16, 1988                        *
  10. ;    Description: Assembly procedures with examples for programming    *
  11. ;        the EGA/VGA.  These are Pascal compatible examples for    *
  12. ;        the Programmer's Guide to EGA/VGA.            *
  13. ;                                    *
  14. ;************************************************************************
  15.  
  16.  
  17. DATA    SEGMENT WORD PUBLIC 'DATA'
  18. DATA    ENDS
  19.  
  20. CODE    SEGMENT BYTE PUBLIC 'CODE'
  21.     ASSUME    DS:DATA, CS:CODE
  22.  
  23. ;************************************************************************
  24. ; Video BIOS Data Area Locations                    *
  25. ;************************************************************************
  26.  
  27. BIOS_Mode    EQU    449H        ;Location of current mode
  28. BIOS_CRT_Addr    EQU    463H        ;Address of CRT controller
  29. BIOS_Rows    EQU    484H        ;Number of text rows
  30. BIOS_Columns    EQU    44AH        ;Number of text columns
  31. BIOS_Height    EQU    485H        ;Character height
  32. BIOS_Page_Size    EQU    44CH        ;Number of bytes in one page
  33. BIOS_Curs_Mode    EQU    460H        ;Cursor start and end
  34. BIOS_Equipment    EQU    487H        ;Type of equipment in system
  35. BIOS_Switch    EQU    488H        ;Configuration switches
  36. BIOS_Curs_Pos    EQU    450H        ;Current cursor address
  37. BIOS_Curs_Start EQU    460H        ;Current cursor shape
  38. BIOS_Curs_Stop    EQU    461H
  39.  
  40.  
  41. ;************************************************************************
  42. ;************************************************************************
  43. ;**** LOW LEVEL REGISTER ACCESS EXAMPLES                  ****
  44. ;************************************************************************
  45. ;************************************************************************
  46.  
  47.  
  48. INCLUDE     PROG003P.ASM
  49. INCLUDE     PROG004P.ASM
  50. INCLUDE     PROG006P.ASM
  51. INCLUDE     PROG009P.ASM
  52. INCLUDE     PROG010P.ASM
  53. INCLUDE     PROG012P.ASM
  54. INCLUDE     PROG013P.ASM
  55. INCLUDE     PROG014P.ASM
  56. INCLUDE     PROG071P.ASM
  57. INCLUDE     PROG016P.ASM
  58. INCLUDE     PROG017P.ASM
  59. INCLUDE     PROG018P.ASM
  60.  
  61. ;************************************************************************
  62. ;************************************************************************
  63. ;**** GETTING INFORMATION EXAMPLES                     ****
  64. ;************************************************************************
  65. ;************************************************************************
  66.  
  67. INCLUDE     PROG021P.ASM
  68. INCLUDE     PROG022P.ASM
  69. INCLUDE     PROG024P.ASM
  70. INCLUDE     PROG025P.ASM
  71. INCLUDE     PROG027P.ASM
  72. INCLUDE     PROG028P.ASM
  73. INCLUDE     PROG030P.ASM
  74. INCLUDE     PROG031P.ASM
  75. INCLUDE     PROG032P.ASM
  76.  
  77. ;************************************************************************
  78. ;************************************************************************
  79. ;**** TEXT MODES EXAMPLES                         ****
  80. ;************************************************************************
  81. ;************************************************************************
  82.  
  83. INCLUDE     PROG041P.ASM
  84. INCLUDE     PROG043P.ASM
  85. INCLUDE     PROG045P.ASM
  86. INCLUDE     PROG047P.ASM
  87. INCLUDE     PROG049P.ASM
  88.  
  89. INCLUDE     PROG051P.ASM
  90. INCLUDE     PROG053P.ASM
  91. INCLUDE     PROG055P.ASM
  92. INCLUDE     PROG057P.ASM
  93. INCLUDE     PROG059P.ASM
  94.  
  95. INCLUDE     PROG061P.ASM
  96. INCLUDE     PROG063P.ASM
  97. INCLUDE     PROG064P.ASM
  98. INCLUDE     PROG066P.ASM
  99. INCLUDE     PROG068P.ASM
  100. INCLUDE     PROG070P.ASM
  101.  
  102. ;************************************************************************
  103. ;************************************************************************
  104. ;**** GRAPHICS MODES EXAMPLES                         ****
  105. ;************************************************************************
  106. ;************************************************************************
  107.  
  108. INCLUDE     PROG081P.ASM
  109. INCLUDE     PROG083P.ASM
  110. INCLUDE     PROG084P.ASM
  111. INCLUDE     PROG085P.ASM
  112. INCLUDE     PROG086P.ASM
  113. INCLUDE     PROG087P.ASM
  114. INCLUDE     PROG088P.ASM
  115. INCLUDE     PROG089P.ASM
  116.  
  117. INCLUDE     PROG091P.ASM
  118. ;************************************************************************
  119. ; ticks  : Return current value of clock tick                *
  120. ;       which is updated 18.2 times a second             *
  121. ; exit:    Register pair DX,AX will have the 32bit  value suitable    *
  122. ;       for return of long integer for MS C compiler.        *
  123. ;************************************************************************
  124.  
  125.     PUBLIC    TICKS
  126.  
  127. TICKS    PROC    FAR
  128.     PUSH    ES            ; Point ES to segment zero
  129.     XOR    AX,AX
  130.     MOV    ES,AX
  131.     MOV    AX,ES:[46CH]        ; Fetch the current tick value
  132.     MOV    DX,ES:[46EH]
  133.     POP    ES
  134.     RET
  135. TICKS    ENDP
  136.  
  137. CODE    ENDS
  138.     END
  139.