home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / video / 10 / 10_5.asm < prev   
Encoding:
Assembly Source File  |  1988-08-11  |  734 b   |  45 lines

  1.         TITLE    'Listing 10-5'
  2.         NAME    SetFontPages
  3.         PAGE    55,132
  4.  
  5. ;
  6. ; Name:        SetFontPages
  7. ;
  8. ;        Update MCGA Font Pages
  9. ;
  10. ; Caller:    Microsoft C:
  11. ;
  12. ;            void SetFontPages(n0,n1);
  13. ;
  14. ;            int    n0,n1;    /* font page values */
  15. ;
  16.  
  17. ARGn0        EQU    [bp+4]
  18. ARGn1        EQU    [bp+6]
  19.  
  20. _TEXT        SEGMENT    byte public 'CODE'
  21.         ASSUME    cs:_TEXT
  22.  
  23.         PUBLIC    _SetFontPages
  24. _SetFontPages    PROC    near
  25.  
  26.         push    bp        ; preserve caller registers
  27.         mov    bp,sp
  28.  
  29.         mov    ax,1103h    ; AH := INT 10H function number
  30.                     ; AL := 3 (Set Block Specifier)
  31.         mov    bl,ARGn1    ; BL := value for bits 2-3
  32.         shl    bl,1
  33.         shl    bl,1        ; BL bits 2-3 := n1
  34.         or    bl,ARGn0    ; BL bits 0-1 := n0
  35.         int    10h        ; load font pages
  36.  
  37.         pop    bp
  38.         ret        
  39.  
  40. _SetFontPages    ENDP
  41.  
  42. _TEXT        ENDS
  43.  
  44.         END
  45.