Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Just a tiny and fun bit of code
#1
Give it a spin in BAM :

(from page 422, Handbook of BASIC: for the IBM PC, XT, AT, PS/2, and compatibles)

Code: (Select All)
SCREEN 0
PRINT "ABCDEFG"
FOR J = 0 TO 7
LOCATE 2 + J, 1
FOR K = 0 TO 55
IF POINT(K,J) = 0 THEN PRINT " "; ELSE PRINT "*";
NEXT K
PRINT
NEXT J


   
Reply
#2
(06-15-2023, 02:30 AM)CharlieJV Wrote: Give it a spin in BAM :

(from page 422, Handbook of BASIC: for the IBM PC, XT, AT, PS/2, and compatibles)

Code: (Select All)
SCREEN 0
PRINT "ABCDEFG"
FOR J = 0 TO 7
LOCATE 2 + J, 1
FOR K = 0 TO 55
IF POINT(K,J) = 0 THEN PRINT " "; ELSE PRINT "*";
NEXT K
PRINT
NEXT J
Cool, that is almost exactly how I use to create large scrolling text in screen 0 back in the day using QuickBasic 4.x. In fact, I believe I implemented this very style of code in my Super MegaBug game to create the large font used in the game.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#3
thanks CharlieJV Smile 
I moded it a bit for QB64, I hope that you won't mind
Code: (Select All)

Dim As Long i, j, k, cl
Dim As String s
s = "QB64pe"
Screen 8, 0
Cls
Print s
For j = 0 To 7
    Locate 2 + j, 1
    For k = 0 To Len(s) * 8 - 1
        If Point(k, j) = 0 Then Print " "; Else Print "*";
    Next k
    Print
Next j
cl = CsrLin
Locate 1, 1
Print Space$(Len(s));
Locate cl, 1 'restore cursor position
Reply
#4
(06-15-2023, 10:29 AM)Jack Wrote: thanks CharlieJV Smile 
I moded it a bit for QB64, I hope that you won't mind
Code: (Select All)

Dim As Long i, j, k, cl
Dim As String s
s = "QB64pe"
Screen 8, 0
Cls
Print s
For j = 0 To 7
    Locate 2 + j, 1
    For k = 0 To Len(s) * 8 - 1
        If Point(k, j) = 0 Then Print " "; Else Print "*";
    Next k
    Print
Next j
cl = CsrLin
Locate 1, 1
Print Space$(Len(s));
Locate cl, 1 'restore cursor position

Mind?  Never.  Any BASIC program modded and ported to any and every BASIC implementation under the sun (especially QB64pe for the benefit of everybody here), that just tickles me silly.
Reply
#5
If the programmer isn't confident waddling through Galleon's code, this illustration was the only way to work things so the "built-in font" could be displayed at a larger size. Smile

A few decades back I've written a program in C that works on 16-bit MS-DOS that looked at the BIOS locations of the 8x8 font, and printed out short words with various characters and colors. I got carried away and started saving them as BSAVE images of 4000 bytes. There wasn't much to do with those files, unfortunately.

EDIT: Oh I just noticed the trick in BAM, using POINT() with -- SCREEN 0. Whoa wait until Pete finds out about this!
Reply
#6
I think that Pete is resting in the grave, otherwise we would have heard from him by now Sad
Reply
#7
(06-15-2023, 01:56 PM)Jack Wrote: I think that Pete is resting in the grave, otherwise we would have heard from him by now Sad

Yeah, I'm worried about the lad.  That's an awfully long stretch without any signs from him.
Reply




Users browsing this thread: 2 Guest(s)