Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text in screen 12, easy way?
#1
Is there a way to put text in screen 12 besides doing a text box?
Reply
#2
What do you mean?
Code:
SUB PrintF (Text AS STRING, x%, y%, col%)
'Prints the standard 8*8 CGA font
DEF SEG = &HFFA6
   FOR char = 1 TO LEN(Text$)
      Addr = 8 * ASC(MID$(Text$, char, 1)) + 14
      LINE (x, y)-(x + 7, y), col%, , CVI(CHR$(0) + CHR$(PEEK(Addr)))
      LINE (x, y + 1)-(x + 7, y + 1), col%, , CVI(CHR$(0) + CHR$(PEEK(Addr + 1)))
      LINE (x, y + 2)-(x + 7, y + 2), col%, , CVI(CHR$(0) + CHR$(PEEK(Addr + 2)))
      LINE (x, y + 3)-(x + 7, y + 3), col%, , CVI(CHR$(0) + CHR$(PEEK(Addr + 3)))
      LINE (x, y + 4)-(x + 7, y + 4), col%, , CVI(CHR$(0) + CHR$(PEEK(Addr + 4)))
      LINE (x, y + 5)-(x + 7, y + 5), col%, , CVI(CHR$(0) + CHR$(PEEK(Addr + 5)))
      LINE (x, y + 6)-(x + 7, y + 6), col%, , CVI(CHR$(0) + CHR$(PEEK(Addr + 6)))
      LINE (x, y + 7)-(x + 7, y + 7), col%, , CVI(CHR$(0) + CHR$(PEEK(Addr + 7)))
      x% = x% + 8
   NEXT
DEF SEG
END SUB

This originally (in abit changed version) belongs to relsoft, But I hope he won't mind :wink:

Anyway it is a font routine what allows you to puy text anywhere (at any pixel that is) on the screen. Should work fine in any mode beside screen 0

Is it what you'r looking for?
url]http://fbide.sourceforge.net/[/url]
Reply
#3
Yes! thanks a bunch
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)