Skip to content

Commit

Permalink
BASIC programs
Browse files Browse the repository at this point in the history
  • Loading branch information
visrealm committed Jun 5, 2024
1 parent a29a827 commit 7117fb1
Show file tree
Hide file tree
Showing 7 changed files with 400 additions and 385 deletions.
File renamed without changes.
15 changes: 15 additions & 0 deletions code/6502/basic/programs/leaf.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
10 DISPLAY 2: COLOR $31
20 T=0:Y=0
30 FOR I=0 TO 6E4
40 X=T:XP=INT(25*Y):YP=INT(-36*X)+96
50 PLOT XP,YP
60 RP=INT(RND(0)*63)
70 GOSUB 130:GOSUB 90:NEXT I
80 GOTO 80
90 IF RP=0 THEN Y=.16*Y:T=0:RETURN
100 IF RP<55 THEN T=.85*X+.04*Y:Y=-.04*X+.85*Y+1.6:RETURN
110 IF RP<59 THEN T=.2*X-.26*Y:Y=.23*X+.22*Y+1.6:RETURN
120 T=-.15*X+.28*Y:Y=.26*X+.24*Y+.44:RETURN
130 IF RP < 21 THEN COLOR $21: RETURN
140 IF RP < 42 THEN COLOR $31: RETURN
150 COLOR $C1: RETURN
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
10 DISPLAY 2
20 FOR C=$21 TO $F1 STEP $10
30 COLOR C
40 FOR X=1 TO 80
50 PLOT X+C/2,X+20
60 NEXT X:NEXT C
10 DISPLAY 2
20 FOR C=$21 TO $F1 STEP $10
30 COLOR C
40 FOR X=1 TO 80
50 PLOT X+C/2,X+20
60 NEXT X:NEXT C
70 GOTO 70
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/github-pages/emulator/hbc56-frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function romDropHandler(event)
}
};
}
else if (file.name.endsWith(".txt"))
else if (file.name.endsWith(".txt") || file.name.endsWith(".bas"))
{
var reader = new FileReader();
reader.readAsText(event.dataTransfer.items[i].getAsFile());
Expand Down
Loading

0 comments on commit 7117fb1

Please sign in to comment.