qa.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
EnableCGA
   Example  Back  Contents  Index
──────────────────────────────────────────────────────────────────────────────
 
;* EnableCGA - Enables CGA video by reprogramming the control register.
;*
;* Uses:    vconfig - Video configuration structure, declared in the
;*          DEMO.INC include file. The structure must first be
;*          initialized by calling the GetVidConfig procedure.
;*
;* Params:  None
;*
;* Return:  None
 
EnableCGA PROC \
        USES ax dx                      ; Preserve registers
 
        mov     dx, 03D8h               ; Address of control register
        mov     al, vconfig.CGAvalue    ; Reprogram with proper value
        out     dx, al                  ; Enable video
        ret
 
EnableCGA ENDP
                                    -♦-