Skip to content

Commit 811dbe7

Browse files
author
SlithyMatt
committed
Added qbasic b&w text mode
1 parent 6be45e0 commit 811dbe7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

qbasic/mand.bas

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Dim pixels(15) as String
2+
pixels(0) = "$"
3+
pixels(1) = "&"
4+
pixels(2) = "%"
5+
pixels(3) = "@"
6+
pixels(4) = "{"
7+
pixels(5) = "["
8+
pixels(6) = "("
9+
pixels(7) = "/"
10+
pixels(8) = "*"
11+
pixels(9) = "<"
12+
pixels(10) = "+"
13+
pixels(11) = "~"
14+
pixels(12) = ":"
15+
pixels(13) = "."
16+
pixels(14) = " "
17+
FOR PY=0 TO 21
18+
FOR PX=0 TO 31
19+
XZ = PX*3.5/32-2.5
20+
YZ = PY*2/22-1
21+
X = 0
22+
Y = 0
23+
FOR I=0 TO 14
24+
IF X*X+Y*Y > 4 THEN GOTO plotpixel
25+
XT = X*X - Y*Y + XZ
26+
Y = 2*X*Y + YZ
27+
X = XT
28+
NEXT I
29+
plotpixel:
30+
LOCATE PY+1,PX*2+1
31+
PRINT pixels(I)+pixels(I)
32+
NEXT PX
33+
NEXT PY

0 commit comments

Comments
 (0)