home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / mouse / lib / ega / examples / f5examp.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  733 b   |  23 lines

  1. ; The following example writes the contents of "outvals" to the Miscellaneous
  2. ; Output register, Sequencer Memory Mode register, and CRT Controller Mode
  3. ; Control register.
  4.  
  5. outvals    dw    0020h        ; miscellaneous output register
  6.     db    0        ; 0 for single registers
  7.     db    0a7h        ; output value
  8.  
  9.     dw    0008h        ; sequencer
  10.     db    04h        ; memory mode register index
  11.     db    03h        ; output value
  12.  
  13.     dw    0000h        ; crt controller
  14.     db    17h        ; mode control register index
  15.     db    0a3h        ; output value
  16.  
  17.     mov    ax, ds            ; assume outvals in data segment
  18.     mov    es, ax            ; es = data segment
  19.     mov    bx, offset outvals    ; es:bx = outvals address
  20.     mov    ah, 0f5h        ; f5 = write register set
  21.     mov    cx, 3            ; number of entries in outvals
  22.     int    10h            ; write the registers!
  23.