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

  1.  
  2. ;************************************************************************
  3. ; Use BIOS to scroll whole screen                                       *
  4. ; Entry:        Count           - Number of lines to scroll             *
  5. ;************************************************************************
  6.  
  7. Count   EQU     BYTE PTR [BP+4]
  8.  
  9.         PUBLIC  _BIOS_Scroll_Page
  10.  
  11. _BIOS_Scroll_Page PROC NEAR
  12.         PUSH    BP
  13.         MOV     BP,SP
  14.         PUSH    ES
  15.         XOR     AX,AX
  16.         MOV     ES,AX
  17.  
  18.         MOV     BH,07                   ;Attribute for 'blank' lines
  19.         MOV     AL,Count                ;Number of lines to scroll
  20.         MOV     CH,0                    ;Upper left corner into CX
  21.         MOV     CL,0
  22.         MOV     DH,ES:[BIOS_Rows]       ;Lower right corner into DX
  23.         DEC     DH
  24.         MOV     DL,ES:[BIOS_Columns]
  25.         DEC     DL
  26.         CMP     Count,0                 ;Is scroll up?
  27.         JL      B_Page_Down             ;...No, go scroll down
  28. B_Page_Up:                              ;...Yes, load scroll down fn
  29.         MOV     AH,06H                  ;Load service number
  30.         JMP     B_Page_Scroll
  31. B_Page_Down:
  32.         MOV     AH,07H                  ;Load service number
  33.         NEG     AL
  34. B_Page_Scroll:
  35.         INT     10H                     ;Call BIOS to do the scroll
  36.         POP     ES
  37.         POP     BP
  38.         RET
  39. _BIOS_Scroll_Page ENDP
  40.