page 60,132 title Screen - Video Display Routines ;************************************************************************ ;* * ;* Copyright (c) 1985 * ;* by Stephen Wilhite, 7431 Saunderlane Ct, Worthington, Ohio * ;* * ;************************************************************************ ;++ ; ABSTRACT: ; ; ? ; ; ENVIRONMENT: MS-DOS, DEC Rainbow 100B ; ; AUTHOR: Steve Wilhite, CREATION DATE: 15-Feb-85 ; ; REVISION HISTORY: ; ;-- include dos.mac pseg ;+ ; Table of Contents: ;- public Put_Char ; Write a character to the screen public Put_Data ; Write characters to the screeen public Put_Data_A ; Write characters & attributes to the screen public Put_Attr ; Write "n" attributes to the screen public Beep ; Beep at user ROM_LATOFS equ 0EF4H ; Define the structure of the video line VLine struc Text db 80 dup(?) Term db ? Link dw ? VLine ends dseg Buffer db 81 dup(?) endds ;+ ; Put_Char(Ch) ;- $proc Put_Char push BP mov BP,SP push ES mov DI,0 mov AL,@ab[BP] int 18H pop ES pop BP ret $endp Put_Char ;+ ; Put_Data(Row, Col, Len, Buf) ;- $proc Put_Data push BP mov BP,SP push ES mov AX,2 ; Character only, no attributes mov BL,@ab[BP] ; Row (1-24) mov BH,@ab+2[BP] ; Column (1-80) mov CX,@ab+4[BP] ; Byte count mov SI,@ab+6[BP] ; Data offset mov DI,14H ; Write data to screen mov BP,DS ; for ROM code int 18H pop ES pop BP ret $endp Put_Data ;+ ; Put_Data_A(Row, Col, Len, Buf, Attr) ;- $proc Put_Data_A push BP mov BP,SP push ES push DS ; ES := DS pop ES mov CX,@ab+4[BP] ; Byte count mov AL,@ab+8[BP] ; Get attribute mov DI,offset Buffer cld ; Forward direction rep stosb ; Fill buffer with the attribute mov AX,0 ; Attributes only mov BL,@ab[BP] ; Row (1-24) mov BH,@ab+2[BP] ; Column (1-80) mov CX,@ab+4[BP] ; Byte count mov SI,@ab+6[BP] ; Data offset mov DX,offset Buffer mov DI,14H ; mov BP,DS ; for ROM code int 18H ; Write characters and attributes to pop ES ; the screen pop BP ret $endp Put_Data_A ;+ ; Put_Attr(Row, Col, Count, Attr) ;- $proc Put_Attr push BP mov BP,SP push ES push DS ; ES := DS pop ES mov CX,@ab+4[BP] ; Byte count mov AL,@ab+6[BP] ; Get attribute mov DI,offset Buffer cld ; Forward direction rep stosb ; Fill buffer with the attribute mov AX,1 ; Attributes only mov BL,@ab[BP] ; Row (1-24) mov BH,@ab+2[BP] ; Column (1-80) mov CX,@ab+4[BP] ; Byte count mov DX,offset Buffer mov DI,14H ; mov BP,DS ; for ROM code int 18H ; Write attributes to screen pop ES pop BP ret $endp Put_Attr ;+ ; Beep() ;- $proc Beep mov AX,7 ; BEL push AX call Put_Char add SP,2 ret $endp Beep endps end OK