98a ; Example of how to write directly to screen memory, instead of ; using the *slow* BIOS function calls. ; Note: uses the DIRWR.PRC module, which must be included at assembly time. jmp start strgs1: db ' This is a test of writing directly to screen ' len1 equ $-strgs1 db ' It shows the obvious difference in speed ' db ' comparing to writing with BIOS... ' db ' Since the adress of screen memory is at ' db ' B800:0000 it is rather simply achieved. ' strgs2: db ' Here is some more text ' len2 equ $-strgs2 db ' Nice, Huh? ' db ' It is so easy... ' strgs3: db ' And here is even more text ' len3 equ $-strgs3 db ' Note the change in attri- ' db ' butes from box to box! ' db ' It is fantastic. And so ' db ' simple! ' length dw 0 start: call clrscr ;Clear Screen mov cx,5 ;Number of lines mov bl,1DH ;Attribute mov dh,10 ;Row mov dl,10 ;Column mov si,strgs1 ;Adress of string to output mov length,len1 call outstrings mov cx,3 ;Number of lines mov bl,2EH ;Attribute mov dh,0 ;Row mov dl,0 ;Column mov si,strgs2 ;Adress of string to output mov length,len2 call outstrings mov cx,5 ;Number of lines mov bl,3FH ;Attribute mov dh,18 ;Row mov dl,50 ;Column mov si,strgs3 ;Adress of string to output mov length,len3 call outstrings mov ah,00H ;Wait for key int 16H call clrscr ;Clear screen int 20H ;Exit to DOS outstrings: again: push cx mov cx,length ;Length of string call write_str inc dh ;One row down add si,length ;Point si to next string pop cx loop again ;Here we go again... ret . 0