Category : Assembly Language Source Code
Archive   : ASM-SUBR.ZIP
Filename : GMESSOUT

 
Output of file : GMESSOUT contained in archive : ASM-SUBR.ZIP
;-------------------------gmessout routine begins--------------------------+
; NAME GMESSOUT
;
; from BLUEBOOK OF ASSEMBLY ROUTINES FOR IBM PC & XT.
; page : 154

; ROUTINE FOR PRINTING A STRING ON THE GRAPHICS SCREEN
;
; FUNCTION: This routine prints a messgae on the graphics screen, using
; the SCHAR or RCHAR routines. The message terminates in a zero.
;
; INPUT: Upon entry:
;
; address of message is in SI
; x-coord of upper LH corner is in xmess
; y-coord of upper LH corner is in ymess
; horiz magnitude of characters is in xmagn
; vert magnitude of characters is in xmagn
; color of chars is in color
; choice of fonts (0=stroke, 1=raster) is in font
;
; OUTPUT: Just to the screen
;
; REGISTERS USED: None modified
;
; SEGMENTS REFERENCED: Upon entry ES must point to the video RAM at
; 0B8000h and DS must point to the data segment used by the point-plot,
; box-filling, line-drawing and stroke character routines.
;
; ROUTINES CALLED: SCHAR or RCHAR
;
; SPECIAL NOTES: No bounds ;hecking is performed. Unpredictable results
; will occur if the horizontal or vertical magnitude is too large.
;
; ROUTINE TO PRINT A MESSAGE TO THE GRAPHICS SCREEN
;
gmessout proc far
;
; get (x,y) location of message on screen
mov ax,xmess ; get x-coord on screen
mov x0,ax ; for first char
mov ax,ymess ; get y-coord on screen
mov y0,ax ; for first char
cld ; forward direction
;
; main loop through characters of the message
gmessloop:
cld ; forward direction
lodsb ; get the ASCII code
cmp al,0 ; test for end of string
je gmessexit
;
; check for fonts
font0:
cmp font,0 ; use font 0 ?
jne nextchar
call rchar ; plot raster characters
;
nextchar:
mov al,8 ; char cell width
mov cl,xmagn ; times horizontal magnitude
mul cl ; multiply
add x0,ax ; add to location of previous char
;
jmp gmessloop ; loop for next char
;
gmessexit:
ret ; return
;
gmessout endp
;-------------------------gmessout routine ends---------------------------+


  3 Responses to “Category : Assembly Language Source Code
Archive   : ASM-SUBR.ZIP
Filename : GMESSOUT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/