' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2024.09.09.00.00]) on 2026.02.21 at 17:43 (Coordinated Universal Time)
' Sample program by Charlie Veniot
' This program demonstrates the GETCHR$ function
' Here, the program gets the 8x8 pixel maps of digits from 0 to 9,
' to graphically reproduce large versions of those digits on a "high resolution" screen.
' (Using "BAM ASCII Character Set 2" )


' 🟠 Build "pixel maps" of digits array
  DIM Digit$( 0 TO 9 )
  FOR d% = 0 TO 9
      LET Digit$( d% ) = GETCHR$( 48 + d% )
  NEXT d%

' 🟠 Display each "pixel "

  SCREEN _NEWIMAGE( 724, 64,0)
  COLOR 14

  ▶StartEndlessLoop:

    FOR d% = 0 TO 9
      ' 📒 Show current digit and the string for the digit's pixel map
      LOCATE 5, 2 : PRINT d% + ":  "  +  Digit$( d% )

      ' 📒 Layout the digit's pixel map in an 8x8 grid
      FOR x% = 1 TO 8
          FOR y% = 0 TO 7
              LOCATE y% + 1, x% + 71
              PRINT MID$( Digit$( d% ), x% + y% * 8  , 1 );
          NEXT y%
      NEXT y%

      ' 📒 Create a simple graphic representation of the digit using the digit's pixel map
      FOR x% = 1 TO 8
          FOR y% = 0 TO 7
              IF MID$( Digit$( d% ), x% + y% * 8  , 1 ) = "X" THEN
                 CIRCLE ( 80 * 8 + x% * 8, y% * 8 + 4 ), 6, 14, , ,0.6
                 CIRCLE ( 80 * 8 + x% * 8, y% * 8 + 4 ), 5, 15, , ,0.5,F
              END IF
          NEXT y%
      NEXT y%
      SLEEP 4
      CLS

    NEXT d%

  GOTO ▶StartEndlessLoop
  
  END