HI guys ,
wondering how to get DT's ANSI.INC to work with serial port 2 , it works so far for port 1 only
Code:'**************************************************************** '* Name : ANSI.INC * '* Author : Darrel Taylor * '* Date : 5/2/2003 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** ' TermColor ForegroundLightDark, ForegroundColor, BackgroundColor ' ForColor ForegroundColor ' BackColor BackgroundColor ' Normal ' Bold ' Dim ' Italic ' UnderScore ' Blink ' Negative ' CurUp black con "0" system ' ALL color names ARE case sensitive red con "1" system green con "2" system yellow con "3" system blue con "4" system magenta con "5" system cyan con "6" system white con "7" system dark con "0" system light con "1" system tch var byte system ' Temporary Character goto OverANSI asm ANSIstart HSEROUT?C 27 HSEROUT?C "[" return TermColor macro FGLD, FGCL, BGCL L?CALL ANSIstart HSEROUT?C FGLD HSEROUT?C ";" HSEROUT?C "3" HSEROUT?C FGCL HSEROUT?C ";" HSEROUT?C "4" HSEROUT?C BGCL HSEROUT?C "m" endm ForColor macro FGColor L?CALL ANSIstart HSEROUT?C "3" HSEROUT?C FGColor HSEROUT?C "m" endm BackColor macro BGColor L?CALL ANSIstart HSEROUT?C "4" HSEROUT?C BGColor HSEROUT?C "m" endm DHSEROUT?B macro Bin MOVE?BA Bin L?CALL HSEROUT endm SendFormat L?CALL ANSIstart DHSEROUT?B tch HSEROUT?C "m" return Normal macro MOVE?CB "0",tch L?CALL SendFormat endm Bold macro MOVE?CB "1",tch L?CALL SendFormat endm Dim macro MOVE?CB "2",tch L?CALL SendFormat endm Italic macro MOVE?CB "3",tch L?CALL SendFormat endm UnderScore macro MOVE?CB "4",tch L?CALL SendFormat endm Blink macro MOVE?CB "5",tch L?CALL SendFormat endm Negative macro MOVE?CB "7",tch L?CALL SendFormat endm CurUp macro L?CALL ANSIstart HSEROUT?C "A" endm CurDown macro L?CALL ANSIstart HSEROUT?C "B" endm CurRight macro L?CALL ANSIstart HSEROUT?C "C" endm CurLeft macro L?CALL ANSIstart HSEROUT?C "D" endm CurHome macro L?CALL ANSIstart HSEROUT?C "H" endm CurMove macro Row, Col ;[H = Home, [24;80H = Row 24, Column 80 L?CALL ANSIstart HSEROUTCOUNT?C 2 HSEROUTNUM?C Row HSEROUTDEC? HSEROUT?C ";" HSEROUTCOUNT?C 2 HSEROUTNUM?C Col HSEROUTDEC? HSEROUT?C "H" endm ClearScr macro L?CALL ANSIstart HSEROUT?C "2" HSEROUT?C "J" endm ClearLine macro HSEROUT?C 13 L?CALL ANSIstart HSEROUT?C "K" endm ClearUp macro L?CALL ANSIstart HSEROUT?C "1" HSEROUT?C "J" endm ClearDown macro L?CALL ANSIstart HSEROUT?C "0" HSEROUT?C "J" endm RequestCurPos macro L?CALL ANSIstart HSEROUT?C "6" HSEROUT?C "n" endm endasm OverANSI:




Bookmarks