Info-IBMPC@USC-ISIB.ARPA (10/26/84)
From: Info-IBMPC Digest <Info-IBMPC@USC-ISIB.ARPA> From: Jim Gillogly <jim@rand-unix> Date: 21 Oct 84 11:33:24 PDT (Sun) To: Info-IBMPC Digest <Info-IBMPC@usc-isib.ARPA> 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 -------