Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!ihnp4!zehntel!hplabs!sri-unix!Info-IBMPC@USC-ISIB.ARPA
From: Info-IBMPC@USC-ISIB.ARPA
Newsgroups: net.micro.pc
Subject: [Jim Gillogly : Graphics Characters]
Message-ID: <11764@sri-arpa.UUCP>
Date: Fri, 26-Oct-84 08:08:12 EST
Article-I.D.: sri-arpa.11764
Posted: Fri Oct 26 08:08:12 1984
Date-Received: Mon, 29-Oct-84 03:03:03 EST
Lines: 53

From:  Info-IBMPC Digest 

From: Jim Gillogly 
Date: 21 Oct 84 11:33:24 PDT (Sun)
To: Info-IBMPC Digest 
Subject: Graphics Characters

Joe Newcomer asked how to output special characters (tab, CR, etc) in
their graphic representations from Lattice C.  I do it with a direct call
to the Video_IO interrupt using the following routine "wacc" (write
attribute/character at current cursor).  The cursor position is not
updated.  With a modern Lattice C you can call int86 for the same effect.
You can do colors and (with mono screen) blinking as well.

	Jim Gillogly
----------
; wacc.asm: Spew a character to the screen with attributes set.
; Attributes are the standard foreground and background color, blinking (for
; the appropriate terminal), etc.
;
; 20 Oct 1982, Jim Gillogly
;
PGROUP	GROUP	PROG
PROG	SEGMENT	BYTE PUBLIC 'PROG'
	PUBLIC  WACC
	ASSUME	CS:PGROUP
;
; name		wacc -- write attribute/character at current cursor location
;
; synopsis	wacc(character, attributes);
;		int character;
;		int attributes;
;
; description	Displays the character with graphics, etc. modes set.
;
WACC	PROC	NEAR
	PUSH	BP
;
	MOV	AH,9		;BIOS FUNCTION: WRITE CHAR CURRENT POS
	MOV	BP,SP		;LOOK FOR ARGS
	MOV	AL,[BP+4]	;FIRST ARG INTO AL (CHAR TO WRITE)
	MOV	BL,[BP+6]	;2ND ARG INTO BL (ATTRIBUTES)
	MOV	BH,0		;DISPLAY PAGE
	MOV	CX,1		;WRITE 1 CHARACTER
	INT	10H		;EXECUTE THE VIDEO INTERRUPT
;
	POP	BP
	RET
WACC	ENDP

PROG	ENDS
	END
-------