Page 1 of 1

print via interrupt

Posted: Sat Jun 30, 2012 2:34 pm
by SMcClouth
For my program I'm using a routine to print, which is as following:

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
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!

Posted: Sat Jun 30, 2012 2:55 pm
by burger2227

Posted: Sat Jun 30, 2012 3:08 pm
by SMcClouth
hey burger2227 already saves me time since I only use PDS... I'll check it out. Thx mate!