BASIC BIT BUG
Before graphical user interfaces (GUIs) became standard, you had to speak to your computer in its native tongue. For the Apple II series, that was Applesoft BASIC.
Originally developed by Microsoft in 1977, Apple employees developed their own version of BASIC to better handle graphics and game controllers. The language was built into the computer's ROM. So when you flipped the power switch, you were greeted by a ] prompt waiting for code, instead of an operating system or desktop.
The AppleSoft BASIC language allowed users to draw shapes and lines using commands like HGR and HPLOT, which was revolutionary for home users at the time.
While I used an Olivetti M20 computer to write my first BASIC programs and games, the Applesoft and Atari BASIC flavors of the language leveraged more graphics-oriented commands. The Olivetti M20 computer was built for business, using the PCOS flavor of BASIC. On the other hand, the Apple II series and Atari computers were built for education, games, and personal use. I recall playing Oregon Trail on Apple IIe computers in the late 1980s, staple educational technology in schools. This Applesoft BASIC program allows you to see how graphical commands along with arrays can create my bit bug logo. You can run the code online using popular Applesoft emulators.
10 REM -- BASIC GRAPHIC PROGRAM BY M4TTBIT FOR APPLE II COMPUTER --
20 HGR: HCOLOR= 1: REM CLEAR SCREEN, SET COLOR
30
40 REM CONFIGURATION
50 VW = 7: VH = 5
60 SC = 4
70 HP = 2: VP = 2
80
90 REM CENTER CALCULATION
100 XS = 140 - (VW * SC * HP / 2)
110 YS = 96 - (VH * SC * VP / 2)
120
130 REM PLOTTING LOOP
140 FOR I = 1 TO 19
150 READ XR, YR
160
170 REM CALCULATE TOP-LEFT CORNER OF THE SCALED BLOCK
180 XP = XS + (XR * SC * HP)
190 YP = YS + (YR * SC * VP)
200
210 REM DRAW THE SCALED BLOCK
220 FOR YF = 0 TO (SC * VP) - 1
230 FOR XF = 0 TO (SC * HP) - 1
240 HPLOT XP + XF, YP + YF
250 NEXT XF
260 NEXT YF
270 NEXT I
280
290 REM PIXEL DATA
300 DATA 2,0, 4,0
310 DATA 1,1, 2,1, 3,1, 4,1, 5,1
320 DATA 1,2, 2,2, 4,2
330 DATA 1,3, 2,3, 3,3, 4,3, 5,3
340 DATA 0,4, 2,4, 4,4, 6,4
350
360 GOTO 360