print via interrupt
Posted: Sat Jun 30, 2012 2:34 pm
For my program I'm using a routine to print, which is as following:
I use this because I don't want to use the standard PRINT and for obvious reasons I'm want it to resemble the C-function. Besides that it has to run in SCREEN 0 but I can't get it anyway to use colors. Does anyone know how to achieve this?
Thanks in advance!
Code: Select all
SUB printf (fmt AS STRING)
temp$ = ""
FOR i% = 1 TO LEN(fmt)
IF MID$(fmt, i%, 2) = "/n" THEN
temp$ = temp$ + CHR$(10) + CHR$(13)
END IF
temp$ = temp$ + MID$(fmt, i%, 1)
NEXT i%
FOR i% = 1 TO LEN(fmt)
char = ASC(MID$(temp$, i%, 1))
RegsX.AX = &HE00 + char
RegsX.BX = 1
InterruptX &H10, RegsX, RegsX
NEXT i%
END SUB
Thanks in advance!