home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / C-ASM_VI.ARJ / PROGASM.ZIP / PROG060.ASM < prev    next >
Assembly Source File  |  1988-04-10  |  1KB  |  34 lines

  1.  
  2. ;************************************************************************
  3. ; Replace first 32 characters of character generator                    *
  4. ; with a box, using the BIOS function 11hex                             *
  5. ;************************************************************************
  6.  
  7. Box     DB      0FFH,081H,081H,081H, 081H,081H,081H,0FFH
  8.  
  9.         PUBLIC  _BIOS_Write_CG
  10.  
  11. _BIOS_Write_CG  PROC NEAR
  12.         PUSH    BP
  13.         PUSH    ES
  14.  
  15.         LEA     BP,Box                  ;Offset of new bitmap
  16.         MOV     AX,CS                   ;Segement of new bitmap into ES
  17.         MOV     ES,AX
  18.         MOV     CX,1                    ;Do one character at a time
  19.         MOV     DX,0                    ;Start with character 0
  20.         MOV     BL,0                    ;Change table 0
  21.         MOV     BH,8                    ;8 bytes per character
  22. Replace_Loop:
  23.         MOV     AH,11H                  ;Function = LOAD CHARACTER GENERATOR
  24.         MOV     AL,00H                  ;Subfunction = CUSTOM CHAR GEN
  25.         INT     10H                     ;Use BIOS to replace next character
  26.         INC     DX                      ;Point to the next character to replace
  27.         CMP     DX,32                   ;Are we done with all 32 characters?
  28.         JB      Replace_Loop            ;...No, go do next one
  29.  
  30.         POP     ES
  31.         POP     BP
  32.         RET
  33. _BIOS_Write_CG  ENDP
  34.