Annotation of ntddk/src/video/displays/vga/i386/vgaregs.asm, revision 1.1.1.1

1.1       root        1: ;---------------------------Module-Header------------------------------;
                      2: ; Module Name: vgaregs.asm
                      3: ;
                      4: ; Copyright (c) 1992 Microsoft Corporation
                      5: ;-----------------------------------------------------------------------;
                      6: ;-----------------------------------------------------------------------;
                      7: ; VOID vInitRegs(void)
                      8: ;
                      9: ; Sets the VGA's data control registers to their default states.
                     10: ;
                     11: ;-----------------------------------------------------------------------;
                     12: 
                     13:         .386
                     14: 
                     15: 
                     16: ifndef  DOS_PLATFORM
                     17:         .model  small,c
                     18: else
                     19: ifdef   STD_CALL
                     20:         .model  small,c
                     21: else
                     22:         .model  small,pascal
                     23: endif;  STD_CALL
                     24: endif;  DOS_PLATFORM
                     25: 
                     26:         assume cs:FLAT,ds:FLAT,es:FLAT,ss:FLAT
                     27:         assume fs:nothing,gs:nothing
                     28: 
                     29:         .xlist
                     30:         include stdcall.inc             ;calling convention cmacros
                     31:         include i386\egavga.inc
                     32:         include i386\strucs.inc
                     33:         .list
                     34: 
                     35:         .code
                     36: 
                     37: cProc vInitRegs
                     38: 
                     39: ;       Initialize sequencer to its defaults (all planes enabled, index
                     40: ;       pointing to Map Mask).
                     41: 
                     42:         mov     dx,VGA_BASE + SEQ_ADDR
                     43:         mov     ax,(MM_ALL shl 8) + SEQ_MAP_MASK
                     44:         out     dx,ax
                     45: 
                     46: ;       Initialize graphics controller to its defaults (set/reset disabled for
                     47: ;       all planes, no rotation & ALU function == replace, write mode 0 & read
                     48: ;       mode 0, color compare ignoring all planes (read mode 1 reads always
                     49: ;       return 0ffh, handy for ANDing), and the bit mask == 0ffh, gating all
                     50: ;       bytes from the CPU.
                     51: 
                     52:         mov     dl,GRAF_ADDR
                     53:         mov     ax,(0 shl 8) + GRAF_ENAB_SR
                     54:         out     dx,ax
                     55: 
                     56:         mov     ax,(DR_SET shl 8) + GRAF_DATA_ROT
                     57:         out     dx,ax
                     58: 
                     59:         mov     ax,((M_PROC_WRITE or M_DATA_READ) shl 8) + GRAF_MODE
                     60:         out     dx,ax
                     61: 
                     62:         mov     ax,(0 shl 8) + GRAF_CDC
                     63:         out     dx,ax
                     64: 
                     65:         mov     ax,(0FFh shl 8) + GRAF_BIT_MASK
                     66:         out     dx,ax
                     67: 
                     68:         cRet    vInitRegs
                     69: 
                     70: 
                     71: endProc vInitRegs
                     72: 
                     73:         end
                     74: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.