QBasic Forum BASIC Discussion Board

[QB FAQ] [QB Archives, Links and Downloads] [Subforums and Chat Room] [Search]

Run QBasic Code on Modern Systems:  QB64   Post Code or Ask for Help:  Post Code   Homework Policy



34 year old basic/dos game on the qb64 forum (not qb64 compatible)

by mn (no login)

http://www.qb64.net/forum/index.php?topic=12331.msg106369

there are two files, afrsrc.bas and african.bas.

as far as i can tell, afrsrc is the commodore pet version, which for obvious reasons looks like it's for the commodore 64 (including lack of spaces throughout the if/thens.)

african.bas is the version updated to msdos, including glorious def fn's.

line numbers go up to the 60000's but the actual line count is 725.

i suspect it will run in qb as-is.

i think it would be fun to get this compiling (in freebasic,) i don't know if it supports def fn or not, but i suspect i can translate those.

i'm not sure whether this is worth translating or not. it would be fun to run it because it's 34 years old, but i'm still trying to guess if all these old games from this guy are on a particular theme.

anyway, should be fun to see if i can get it running without qb. if you guys can run it in qb i'd like to hear about it.

Posted on Nov 28, 2014, 9:30 AM

Respond to this message   

Return to Index


translating

by mn (no login)

"i'm not sure whether this is worth translating or not."

was supposed to be "i'm not sure whether this is worth translating to python or not."

there's a lot of lines, there's a lot of line numbers, and it doesn't look like that incredible a text game.

i'm pretty sure it will be worth getting to run in freebasic. i would be tickled if fb supported def fn better than qb64 does.

it might even run in qb64, but only if it supports def fn. someone left me with the impression it does not.

Posted on Nov 28, 2014, 9:33 AM

Respond to this message   

Return to Index


i got bored, here are the changes i made so far

by mn (no login)

option gosub at the top (because i won't use --lang qb, because it's an insult to qb)

change 49 DEF FNR(etc...) to:

FUNCTION FNR(N)
FNR = (N*RND(1)+.99)
END FUNCTION

remove "key off:" from line 5

remove $metacommands from lines 1-4

change input#1 to input #1 on lines 4450-60,

change print#1 to print #1 on lines 4350-60,

remove line numbers from data statements and move to end

...ok, i'm getting bored with it. i will post what it's got so far.

Posted on Nov 28, 2014, 10:16 AM

Respond to this message   

Return to Index


slightly updated version, perhaps useless

by mn (no login)

'option gosub
5 CLS:LOCATE 7,30 : PRINT "African Adventure"
6 LOCATE 9,23 : PRINT "or, in search of Dr. Livingston"
7 LOCATE 10,20 : PRINT "Original version from 'softside' 9/80"
8 DEFINT A-Z
10 LOCATE 11,19 : PRINT "By R. & B. Fullerton and C. &K. Russell"
20 LOCATE 12,12 : PRINT" This version was originally adapted for the PET and"
30 LOCATE 13,25 : PRINT "expanded by David Malmberg"
35 LOCATE 14,13 : PRINT "Further expanded and ported to MSDOS by Tony Baechler."
40 LOCATE 17,1 : GOSUB 110
FUNCTION FNR(N)
FNR = N*RND(1)+.99
END FUNCTION
50 X=RND(-TI):Y=1:XG=1:G6$="You do not have it.":G7$="Nothing unusual."
51 G8$="With your puny spear?"
100 G3$="Do not be absurd.":G2$="You are on your own."
101 G1$="You already have it.":R$=" It is done."
102 PM=37:VM=36:NM=60:IM=35:DIM V$(VM):DIM N$(NM):DIM I$(IM):DIM IL(IM)
103 DIM IP(IM):DIM IZ(IM): DIM P$(PM):DIM P(PM,5):DIM D(22)
104 SP$=STRING$(40,00) : GOSUB 50001
105 INPUT "Do you need instructions? (Y/N)";Q$
106 Q$=LEFT$ (Q$,1)
107 IF Q$ = "Y" OR Q$ = "y" THEN 60000
108 IF Q$= "N" OR Q$= "n" THEN 1000 ELSE GOTO 105
110 LINE INPUT "Press ENTER to continue...";QQ$:CLS: RETURN
111 GOTO 500
200 GOSUB 490:GOTO 1000
490 IF Y=1 OR Y=36 THEN PRINT">";:GOTO 495
491 PRINT "Yes, Bwana ";
495 A$="":B$=A$:C$=A$:GV$=A$:GN$=A$:LINE INPUT A$
496 IF A$= "I" THEN A$ = "i"
497 IF A$= "hint" OR A$ = "help" OR A$= "HELP" THEN A$= "HINT"
498 IF A$= "Q" OR A$= "q" OR A$= "quit" THEN A$= "QUIT"
499 GOTO 111
500 Z=LEN(A$):IF Z=0 THEN 490
501 IF Z-1 THEN 510
502 IF A$="i" THEN V=3:N=0:RETURN
503 V=0:C$=A$:GOTO 580
510 GOSUB 600:B$=D$:GV$=G$:IF Z1=1 THEN C$=B$:V=0:GOTO 580
511 V=0:FOR I=1 TO VM:IF B$=V$(I)THEN V=I:I=VM
512 NEXT:IF V<>0 THEN 550
520 V=0:C$=B$:GOTO 580
550 IF (Z-Z1-1)<1 THEN 590
551 A$=RIGHT$(A$,Z-Z1-1):Z=LEN(A$):C$=A$
560 IF LEFT$(C$,1)<>" "THEN 570
561 C$=RIGHT$(C$,Z-1):Z=LEN(C$):IF Z=0 THEN 590
562 GOTO 560
570 A$=C$:GOSUB 600:C$=D$
580 GN$=G$:N=0:FOR I=1 TO NM:IF C$=N$(I)THEN N=I:I=NM
581 NEXT:IF N=60 THEN N=40
582 RETURN
590 N=0:RETURN
600 I=0:FOR II=1 TO Z:IF MID$(A$,II,1)=" " THEN I=II:II=Z
601 NEXT:IF I=0 THEN I=II
610 D$=LEFT$(A$,I-1):G$=D$:D$=LEFT$(D$,5):Z1=LEN(D$):RETURN
1000 PRINT"":J=FRE(0):GA$="...neither are seen again."
1001 GB$="The natives take your ":GC$="You are lying in a soft warm bed."
1002 GD$="You are at the closet.":GE$="Several natives wave hello."
1003 G4$="That's too dangerous!":G5$="It's nowhere in sight."
1004 G9$="You had better leave, fast!"
1005 PRINT P$(Y):PRINT:D$="You can now see: "
1006 Z=12:Z1=Y:IF Y<>1 OR K<>0 THEN 1020
1008 IF IL(1)=1 THEN PRINT D$;I$(1):GOTO 1080
1009 PRINT D$;: PRINT G7$: GOTO 1080
1010 D$="You are carrying ":Z=16:Z1=-1
1020 A$=D$:J=1
1030 FOR I=1 TO IM:IF IL(I)<>Z1 AND IL(I)<>-2 THEN 1070
1035 B$=I$(I):IF I=5 AND IL(I)=-2 THEN IF Z1=Y OR IL(2)>2 THEN 1070
1040 IF J=0 THEN 1050
1041 J=0:D$=D$+B$:Z=LEN(D$):PRINT D$;:GOTO 1070
1050 PRINT", ";:IF Z+LEN(B$)>40 THEN PRINT:Z=0
1060 D$=B$:Z=Z+LEN(D$)+2:PRINT D$;
1070 NEXT:IF A$<>D$ THEN PRINT".":GOTO 1080
1071 PRINT D$;:IF Z1=Y THEN PRINT G7$:GOTO 1080
1072 PRINT "nothing."
1080 IF XB=1 THEN PRINT GC$
1081 KK=0:FOR I=0 TO 5:IF P(Y,I)<>0 THEN KK=1
1082 NEXT:IF KK=0 THEN 1090
1083 PRINT "Obvious directions are ";: KK=0
1084 FOR I=0 TO 5:IF P(Y,I)=0 THEN 1088
1085 IF KK<>0 THEN PRINT", ";
1086 PRINT N$(I+7); : KK=KK+1
1087 'IF KK=2 THEN PRINT ""
1088 NEXT : PRINT "."
1090 IF V=3 OR V=13 THEN 1250
1200 XD=XD+1:IF Y=7 THEN 5000
1201 IF Y=17 THEN 5100
1202 IF Y=34 THEN 5200
1203 IF Y=22 OR Y=27 THEN 5300
1204 IF Y=12 THEN 5400
1205 IF Y<>12 THEN XQ=0
1210 IF Y1=18 OR Y=18 THEN 1250
1211 X7=0
1220 XD=0
1250 ZZ$="A native throws a spear at you. It just misses. The native runs off."
1251 IF TS=1 OR T<20 OR Y>35 OR Y=7 OR (Y>10 AND Y<14) THEN 1260
1255 PRINT ZZ$:IL(6)=Y:TS=1
1260 IF N4<>0 THEN 1270
1261 IF IL(13)=-1 THEN N5=N5+1:A$="a charming little flute"
1262 IF N5>16 THEN PRINT "After many hours of whittling, your sugar"
1263 IF N5>16 THEN PRINT "cane is now "A$".":S=S+5:N4=1
1264 IF N5>16 THEN IL(20)=-1:IL(13)=0
1270 IF XE=0 AND (Y=2 OR Y=10) THEN S=S-50:GOTO 1280
1271 GOTO 1300
1280 PRINT "Oh no . . . your feet are bare . . . . too late!":GOTO 7000
1300 PRINT:GOSUB 490:GOTO 1500
1450 IF Y=9 OR Y=10 THEN PRINT "A fierce black leopard bars the way.":GOTO 1200
1460 IF Y<>32 THEN 1470
1461 IF FNR(5)<3 THEN Y=34:GOTO 1000
1462 Y=31:GOTO 1000
1470 PRINT "That leads to quicksand.":GOTO 1200
1500 T=T+1:IF V THEN 1600
1501 IF N THEN 1520
1510 I=FNR(3):IF I=1 THEN PRINT "What?"
1511 IF I=2 THEN PRINT "Huh?"
1512 IF I=3 THEN PRINT "What in the world are you talking about?"
1515 GOTO 1200
1520 IF N>12 THEN 1550
1521 IF N<7 THEN 1525
1522 N=N-6
1525 Z=P(Y,N-1)
1530 IF Z<0 THEN 1560
1531 IF Z=98 THEN 1450
1532 IF Z<>0 THEN 1540
1533 I=FNR(3):IF I=1 THEN PRINT "That direction is sealed off."
1534 IF I=2 THEN PRINT "You won't get anywhere going there."
1535 IF I=3 THEN PRINT"You can't go that way."
1536 GOTO 1200
1540 Y1=Y:Y=Z:GOTO 1000
1550 PRINT"What do you want to do with the ";GN;"?":GOTO 1200
1560 IF RND(1)<.5 THEN Z=0:GOTO 1530
1561 Y=-Z:GOTO 1000
1570 IF Y=12 THEN IF RND(1)<.25 THEN Y=11
1571 GOTO 1000
1580 IF Y=22 THEN IF RND(1)<.5 THEN Y=21:GOTO 1000
1581 Y=19:GOTO 1000
1585 IF RND(1)<.38 THEN Y=-Z:I$(14)="a hungry alligator":GOTO 1000
1586 Z=0:GOTO 1530
1600 ON V GOTO 1614,1800,1010,1900,1900,2100,2200,1000,2900,2500
1601 ZZ=V-10
1602 ON ZZ GOTO 2600,2700,1010,2400,3000,3100,3200,3300,3400,3500
1603 ZZ=V-20
1604 ON ZZ GOTO 2700,3600,3760,3800,3900,3700,3400,4000,4000,4100
1611 ZZ=V-30
1612 ON ZZ GOTO 4300,4400,4500,4500,4600,4700
1614 IF N=0 THEN PRINT "Who knows what a "GN$" is?": GOTO 1300
1615 IF MI>4 THEN PRINT "Your load's too heavy.": GOTO 1300
1617 IF N=16 AND V5=1 AND IL(18)=Y THEN I=18 : GOTO 1690
1620 IF V5 AND N=16 THEN 1630
1621 GOSUB 5900:IF X1>0 THEN 3710
1625 IF N=11 THEN N=22:GOTO 2740
1627 IF N<>34 THEN 1630
1628 IF Y=33 THEN 3720
1629 GOTO 5960
1630 IF N=24 THEN 1700
1631 II=0:FOR I = 1 TO IM : IF N=IZ(I) THEN II=I: I=IM
1632 NEXT I : IF II=0 THEN 1510
1633 I=II
1635 IF NOT (IL(I)=-1 OR (IL(2)=-1 AND IL(I)=-2)) THEN 1640
1636 IF I=7 THEN PRINT LEFT$(G1$,17)+"him.":GOTO 1200
1637 PRINT G1$:GOTO 1200
1640 IF IL(I)<>Y OR (Y=1 AND K=0 AND I<>1) THEN 5960
1642 IF XB THEN IF I<>1 THEN PRINT "from bed?":GOTO 1220
1645 IF N=18 THEN 3600
1646 IF I=2 AND IL(5)=-2 THEN MI=MI+1
1650 IF N<>37 THEN 1660
1651 IF XF=1 THEN 1690
1652 PRINT "It's not free.":GOTO 1200
1660 IF N<>38 THEN 1665
1661 PRINT"Dr.Livingston?":INPUT A$:IF A$<>"I presume" THEN GOSUB 500:GOTO 1500
1665 IF N<>48 THEN 1670
1666 IF IL(29)<>-1 THEN 7000
1667 IF Y=4 THEN PRINT "A deadly spider crawls out of the wood and into the brush."
1670 IF N=49 THEN PRINT "It's too hot.":GOTO 1200
1671 IF N<>47 THEN 1690
1672 IF IL(23)=Y THEN I=23:GOTO 1690
1673 IF IL(26)<>-1 THEN PRINT "You need a cage.":GOTO 1200
1674 IL(26)=0:IL(22)=0:IL(23)=Y:IZ(22)=0:MI=MI-1:GOTO 1000
1690 PRINT R$
1695 IL(I)=-1:MI=MI+1:GOTO 1200
1700 IF XE THEN PRINT "You're wearing them.":GOTO 1200
1705 Z=35:IF RND(1)<.38 THEN 1710
1706 IF RND(1)<.5 THEN Z=25:GOTO 1710
1707 Z=27
1710 IF K<>1 THEN 1720
1711 PRINT "Your feet are now snug in a pair of hiking boots.":S=S+5:XE=1
1712 IL(17)=Z:IL(7)=0:GOTO 1300
1720 PRINT "What boots?":GOTO 1300
1800 IF N=0 THEN 1510
1810 IF N=24 THEN PRINT "They're stuck.":GOTO 1200
1811 II=0:FOR I=1 TO IM:IF IZ(I)=N THEN II=I:I=IM ELSE NEXT I
1812 IF II=0 THEN 1510
1813 I=II
1820 IF IL(I)>-1 THEN 5950
1821 IF Y=1 AND K=0 AND I>1 THEN PRINT "There's no room.":GOTO 1300
1830 IF IL(I)<>-2 THEN 1840
1831 IF IL(2)=-1 THEN 3100
1832 GOTO 5950
1840 IF N=16 THEN 3110
1841 IF I=2 AND IL(5)=-2 THEN MI=MI-1
1890 IL(I)=Y:PRINT R$:GOSUB 3480
1895 MI=MI-1:GOTO 1200
1900 B$="It's already ":C$=B$+"closed.":A$=B$+"open.":D$="From bed?"
1901 IF N=0 THEN 1510
1902 IF V=5 THEN 2000
1905 IF Y-1 THEN 1930
1906 IF N-22 THEN 1920
1910 IF XB=1 THEN PRINT D$:GOTO 1200
1915 IF K=0 THEN K=1:GOTO 1000
1916 PRINT A$:GOTO 1200
1920 IF N<>20 THEN 1930
1921 IF IL(1)<>-1 THEN 5950
1922 IF XC=0 THEN PRINT"The book falls open to an underlined passage.":XC=1:GOTO 1200
1923 PRINT A$:GOTO 1200
1930 IF N<>13 THEN 1940
1931 IF IL(2)<>-1 THEN 5950
1932 IF IL(2)=-1 THEN PRINT A$
1933 IF XX<>2 THEN PRINT "Something fell out."
1934 IF XX=1 THEN XX=2:IL(31)=Y
1935 IF XX=0 THEN XX=1:IL(28)=Y
1936 GOTO 1200
1940 IF N<>55 THEN 1960
1942 IF IL(34)<>0 THEN PRINT "It's already open.":GOTO 1200
1944 IF IL(32)<>0 THEN PRINT "It's locked.":GOTO 1200
1946 IF IL(33)=-1 THEN PRINT "Put it down first.":GOTO 1200
1948 IF IL(33)<>Y THEN PRINT "It's not here.":GOTO 1200
1950 PRINT "OK, it is open.":IL(34)=Y:IZ(34)=55:IL(33)=0:IZ(33)=0:IL(35)=Y
1952 GOTO 1200
1960 IF N<>50 THEN 1510
1962 IF IL(23)=Y OR IL(23)=-1 THEN 3131
1965 IF IL(26)=Y OR IL(26)=-1 THEN PRINT "OK, it's open.":GOTO 1200
1966 PRINT "It's not here.":GOTO 1200
2000 IF Y-1 THEN 2020
2001 IF N-22 THEN 2010
2005 IF XB=1 THEN PRINT D$:GOTO 1200
2007 IF K=1 THEN K=0:GOTO 1000
2008 PRINT C$:GOTO 1200
2010 IF N<>20 THEN 2020
2011 IF IL(1)<>-1 THEN 5950
2012 IF XC=1 THEN PRINT R$:XC=0:GOTO 1200
2013 PRINT C$:GOTO 1200
2020 IF N<>13 THEN 2030
2021 IF IL(2)<>-1 THEN 5950
2022 IF IL(5)=-2 THEN PRINT "The mouse won't escape!":GOTO 1200
2023 PRINT "It'll just fall open again.":GOTO 1200
2030 IF N<>55 THEN 2050
2031 TT$ = "OK, it's closed."
2032 IF IL(32)<>0 OR IL(33)<>0 THEN PRINT "It's already closed.":GOTO 1200
2034 IF IL(34)=-1 THEN PRINT "Put it down first.":GOTO 1200
2036 IF IL(34)<>Y THEN PRINT "it's not here.":GOTO 1200
2040 IF IL(34)=Y THEN PRINT TT$:IL(33)=Y:IZ(33)=55:IL(34)=0:IZ(34)=0
2045 GOTO 1200
2050 IF N<>50 THEN 1510
2055 IF IL(26)=Y OR IL(26)=-1 THEN PRINT "OK, it's closed.":GOTO 1200
2056 PRINT "It's not here.":GOTO 1200
2100 IF Y=2 THEN 2210
2101 IF IL(1)=-1 AND XB=1 THEN IL(1)=1:MI=MI-1:Y=2:XB=0:GOTO 1000
2102 GOTO 1510
2200 IF N>0 THEN 1510
2201 IF Y<>1 THEN 2205
2202 Y=10:XB=0:IF IL(1)=-1 THEN MI=MI-1:IL(1)=1
2203 GOTO 1000
2205 IF Y<>10 THEN 1510
2206 IF IL(17)=-1 THEN IL(17)=FNR(33)+2:PRINT"Help!":MI=MI-1:FOR J=1 TO 5000:NEXT
2210 Y=1:GOTO 1000
2400 IF Y<>29 THEN 2410
2401 IF N<>40 THEN 2420
2402 IF IL(4)<>-1 THEN 5950
2403 PRINT GB$"groundnuts.":XF=1:IL(4)=0:MI=MI-1:S=S+10:GOTO 1200
2410 IF Y<>17 THEN 2420
2411 IF N<>42 THEN 2420
2412 IF IL(10)<>-1 THEN 5950
2413 PRINT GB$"beans, gives you a trinket, then runs away.";:
2414 XG=0:S=S+15:N$(26)="ring":IL(10)=0:IL(19)=-1:GOTO 1200
2420 PRINT "No way, Jose!":GOTO 1200
2500 IF Y=1 THEN PRINT "This may seem absurd but in the book is a magical word":GOTO 1250
2510 IF Y=23 OR Y=24 THEN PRINT "You won't make it with a 'hop' or 'skip'":GOTO 1250
2520 IF Y=25 OR Y=22 OR Y=12 OR Y=27 THEN PRINT "Be persistent.":GOTO 1250
2530 IF (Y=34 OR Y=17)AND IL(6)=-1 THEN PRINT "You look hostile.":GOTO 1250
2535 IF Y=37 THEN PRINT "Check pointers!":GOTO 1250
2540 IF Y=34 THEN PRINT "Lion traps circle the village.":GOTO 1250
2545 IF Y=36 THEN PRINT "Beware of a rom change from commodore.":GOTO 1250
2550 IF Y=7 THEN PRINT "Some snakes just can't be charmed.":GOTO 1250
2560 PRINT G2$:GOTO 1250
2600 A$="Africa - Land of the Unknown by R.U. Redde"
2601 B$="...plorer nodded off to sleep, his thoughts began to drift..."
2602 B$=B$+"drift...drift"
2605 IF N<>36 THEN 2610
2606 IF IL(11)=-1 THEN PRINT "swami diamond":GOTO 1200
2607 GOTO 5950
2610 IF N<>19 THEN 2620
2611 IF Y=29 OR Y=33 THEN PRINT "trading post":GOTO 1200
2612 IF Y<>31 THEN 5950
2613 PRINT"Ujiji country --- keep out!!"
2614 PRINT"No heed 'em --- we eat 'em":GOTO 1200
2620 IF NOT (N=20 OR N=25) THEN 1510
2621 IF IL(1)<>-1 THEN 5950
2622 IF XB<>1 THEN PRINT "Try reading in bed.":GOTO 1200
2623 IF N<>20 THEN 2630
2624 PRINT A$:GOTO 1200
2630 IF XC=1 THEN PRINT B$:GOTO 1200
2631 GOTO 5960
2700 IF N=0 THEN 1510
2701 IF N<13 THEN 1520
2702 IF N=17 THEN 3800
2703 IF N=21 AND Y=3 THEN Y=2:GOTO 1000
2704 IF N=46 AND Y=17 THEN Y=18:GOTO 1000
2705 IF N=56 OR N=57 OR N=59 THEN 4500
2740 IF N=22 AND Y=1 THEN PRINT GD$:XB=0:GOTO 1200
2741 IF N<>23 THEN 2760
2742 IF Y=1 THEN PRINT GC$:XB=1:GOTO 1300
2743 PRINT "In darkest Africa?":GOTO 1200
2760 IF N=41 AND Y=34 THEN Y=35:GOTO 1000
2761 IF N<>29 THEN 2770
2762 IF Y<>16 THEN 2765
2763 Y=17:GOTO 1000
2765 IF Y=32 THEN N=3:GOTO 1525
2770 GOTO 1510
2900 IF N<>35 THEN 2910
2901 IF IL(16)=-1 THEN 2920
2902 GOTO 5950
2910 IF N<>14 THEN PRINT G3$:GOTO 1200
2911 IF IL(6)<>-1 THEN 5950
2920 PRINT "It sails through the air.......and hits the";
2921 IF Y=2 THEN PRINT "water, quickly sinking.":J=0:GOTO 2940
2930 J=Y:IF Y=1 THEN PRINT "floor":GOTO 2935
2931 PRINT "ground"
2935 IF Y=7 THEN J=6
2940 IF N=14 THEN IL(6)=J
2941 IF N<>14 THEN IL(16)=J
2945 IF NOT (Y=IL(14) AND RND(1)<.5) THEN 2950
2946 FOR I=1 TO 1000:NEXT
2947 PRINT "Wait! That's not ground."
2948 FOR I=1 TO 1000:NEXT
2949 PRINT "It's an alligator":I$(14)="A dead alligator"
2950 GOTO 1895
3000 IF (Y=17 OR Y=34 OR Y=29) AND N=44 AND IL(6)=-1 THEN PRINT G8$:GOTO 1200
3001 GOTO 3710
3100 IF N<>18 THEN 3110
3101 IF NOT (IL(5)=-2 AND IL(2)=-1) THEN 5950
3102 IF Y=9 OR Y=10 THEN 3105
3103 PRINT "The mouse jumps out and scampers off.":IL(5)=2:GOTO 1895
3105 PRINT "The mouse jumps out and startles the leopard into flight.";GA$
3106 P(9,4)=10:P(10,5)=9:IL(5)=0:S=S+15:GOTO 1895
3110 IF N<>16 THEN 3130
3111 IF IL(18)<>-1 THEN 5950
3112 IF Y=22 THEN 3116
3113 PRINT "The viper slowly slithers away.":IL(18)=7:GOTO 1895
3116 PRINT "The viper wakes up and attacks the dog. . . and both fall into the"
3117 PRINT" quicksand.";GA$:IL(18)=0:S=S+15
3120 IL(21)=Y:PRINT
3121 PRINT "Something sparkles in the grass.":GOTO 1895
3130 IF N<>47 THEN 1510
3131 PRINT "The lion is free.":IL(23)=0:IL(22)=Y:IL(26)=-1:IZ(22)=47:GOTO 1200
3200 IF N<>16 THEN 3710
3201 IF V5<>0 THEN PRINT "Again?":GOTO 1200
3202 IF Y<>IL(8) THEN PRINT G5$:GOTO 1200
3203 IF IL(20)<>-1 THEN PRINT "You may have good looks,but...":GOTO 1200
3204 V5=1
S=S+10
PRINT R$
IL(18)=Y
IL(8)=0
GOTO 1210
3300 IF N=43 THEN 3310
3301 PRINT"OK - here goes...j u m p !!!":GOTO 1200
3310 IF Y<23 OR Y>24 THEN PRINT "There isn't any quicksand here.":GOTO 1200
3320 PRINT "Do you really expect to jump over 30 ft?"
3321 A$=INKEY$: IF A$ = "" THEN 3321 ELSE 3322
3322 IF A$<>"y"THEN GOSUB 500:GOTO 1500
3330 PRINT "OK - here goes...j u m p !!!":FOR I=1 TO 1000:NEXT
3360 PRINT "Ta da!!!":IF Y=23 THEN Y=24:GOTO 1000
3361 Y=23:GOTO 1000
3400 GOSUB 3480
3410 PRINT "Your score is "SS" points out of 325"
3411 PRINT "in "T" turns.":IF V<>27 THEN 1250
3420 IF Y=2 OR Y=10 OR D$="quit" OR D$="QUIT" THEN END
3425 IF RE THEN IF RND(1)>.4 THEN END
3430 PRINT "Ready for a miracle...you have recovered":MI=0
3431 FOR I=2 TO IM:IF IL(I)=-1 THEN IL(I)=FNR(32)+3
3432 NEXT
3435 FOR I=1 TO 8000:NEXT
3440 Y=2:RE=1:GOTO 1000
3480 SS=0:FOR I=1 TO IM:IF IL(I)=1 THEN SS=SS+IP(I)
3485 NEXT I:SS=SS+S:IF SS<250 THEN RETURN
3492 B$="An ":A$="adventurer":IF T<250 THEN SS=SS+15:B$="A talented "
3494 IF T<220 THEN SS=SS+10:B$="A skilled "
3496 IF T<190 THEN SS=SS+10:B$="A master "
3498 PRINT "You are "B$;A$:D$="quit":V=27:GOTO 3410
3500 IF N=0 THEN 1510
3501 IF Y=1 OR Y>3 THEN 3530
3505 IF N=21 THEN PRINT"Where?":GOTO 1200
3520 IF Y=2 OR (Y=3 AND (N=10 OR N=4))THEN 2700
3530 IF Y=23 OR Y=24 THEN PRINT "On quicksand?":GOTO 1200
3540 PRINT "On land?":GOTO 1200
3600 IF N=47 THEN 1670
3601 IF N<>18 THEN 3710
3602 IF Y<>IL(5)THEN 5960
3603 IF IL(2)=-1 THEN 3606
3604 PRINT "You don't have anything to put it in.":GOTO 1200
3606 PRINT "The mouse is now lost in the folds of your knapsack."
3607 I=0:IL(5)=-2:GOTO 1695
3700 IF N=18 OR N=34 THEN PRINT "It just ate.":GOTO 1200
3710 IF N=0 THEN 1510
3711 GOSUB 5900:IF X1=1 THEN PRINT G4$:GOTO 1200
3712 IF X1=2 THEN 5960
3720 IF NOT (N=18 OR N=34) THEN 3730
3721 IF V=17 THEN PRINT "Rodents are charming enough!":GOTO 1200
3722 PRINT "It's too quick.":GOTO 1200
3730 PRINT G3$:GOTO 1200
3760 IF Y<>18 THEN 1510
3761 Y=17:GOTO 1000
3800 IF Y=6 OR Y=7 THEN Y=7:GOTO 1000
3801 GOTO 1510
3900 A$="....ummmmm gooood!"
3901 IF N=18 AND IL(5)=-2 AND IL(2)=-1 THEN PRINT "Y u k!!!":IL(5)=0:GOTO 1895
3920 II=0:FOR I=1 TO IM:IF IZ(I)=N THEN II=I:I=IM
3921 NEXT I:IF II=0 THEN 3960
3922 IF IL(II)<>-1 THEN 5950
3923 IF N=42 OR N=53 OR N=40 OR N=39 THEN PRINT R$;A$:IL(II)=0:GOTO 1895
3945 IF N=0 THEN 1510
3950 GOSUB 5900:IF X1=1 THEN PRINT G4$:GOTO 1200
3960 PRINT G3$:GOTO 1200
4000 IF N<>49 THEN 4010
4001 IF IL(28)<>-1 THEN PRINT "You have no matches.":GOTO 1200
4002 IF IL(24)=-1 THEN PRINT"Prepare the wood.":GOTO 1200
4003 IF IL(24)<>Y THEN PRINT"You need wood.":GOTO 1200
4004 PRINT "The fire is blazing.":IL(24)=0:IL(25)=Y:GOTO 1200
4010 IF N<>50 THEN 1510
4011 IF IL(27)<>-1 THEN PRINT "You have no tools.":GOTO 1200
4012 IF IL(24)<>-1 THEN PRINT "You have no wood.":GOTO 1200
4013 IL(26)=Y:IL(24)=0:GOTO 1000
4100 IF N=49 OR N=48 THEN 4001
4101 IF N<>52 THEN 4104
4102 PRINT "The matches are blazing brightly.":IL(28)=0:IL(30)=-1:IZ(28)=0
4103 GOTO 1200
4104 IF N=50 AND IL(28)=-1 THEN IL(26)=0:GOTO 4004
4105 PRINT "Be careful with fire, stupid!":GOTO 1200
4300 REM save
4301 D(1)=T:D(2)=MI:D(3)=K:D(4)=S:D(5)=XE:D(6)=XX:D(7)=TS:D(8)=XF:D(9)=N5
4302 D(10)=N4:D(11)=V5:D(12)=X7:D(13)=XG:D(14)=SS
4303 D(15)=IZ(22):D(16)=IZ(23):D(17)=IZ(28)
4304 D(18)=IZ(30):D(19)=IZ(32):D(20)=IZ(33):D(21)=IZ(34):D(22)=Y
4310 INPUT "Filename";TL$:IF TL$="*" THEN 4310
4330 OPEN TL$ FOR OUTPUT AS #1
4340 PRINT "Writing game data"
4350 FOR I=1 TO 22: PRINT #1,D(I);CHR$(13); : NEXT
4360 FOR I=1 TO IM: PRINT #1,IL(I);CHR$(13); : NEXT
4370 CLOSE #1 : PRINT "Saved."
4380 GOTO 1200
4400 REM load
4410 INPUT"Filename";TL$:IF TL$="*"THEN 4410
4430 OPEN TL$ FOR INPUT AS #1
4440 PRINT "Reading game data"
4450 FOR I=1 TO 22:INPUT #1,D(I):NEXT
4460 FOR I=1 TO IM:INPUT #1,IL(I):NEXT
4470 CLOSE #1: PRINT "Restored."
4471 T=D(1):MI=D(2):K=D(3):S=D(4):XE=D(5):XX=D(6):TS=D(7):XF=D(8):N5=D(9)
4472 N4=D(10):V5=D(11):X7=D(12):XG=D(13):SS=D(14)
4473 IZ(22)=D(15):IZ(23)=D(16):IZ(28)=D(17)
4474 IZ(30)=D(18):IZ(32)=D(19):IZ(33)=D(20):IZ(34)=D(21):Y=D(22)
4499 GOTO 1000
4500 IF Y=36 OR Y=37 THEN 4502
4501 GOTO 1510
4502 IF N=56 OR N=57 THEN Y=37:GOTO 1000
4503 IF N=59 THEN PRINT"Return everything to the bedroom and say 'score'.":GOTO 1200
4504 GOTO 1510
4600 IF N<>55 THEN 1510
4601 TT$="OK, it's unlocked."
4610 IF IL(33)<>0 OR IL(34)<>0 THEN PRINT "It's already unlocked.":GOTO 1200
4615 IF IL(31)<>-1 THEN PRINT "You don't have the key.":GOTO 1200
4620 IF IL(32)=-1 THEN PRINT "Put it down first.":GOTO 1200
4630 IF IL(32)<>Y THEN PRINT "It is not here.":GOTO 1200
4640 IF IL(32)=Y THEN PRINT TT$:IL(32)=0:IZ(32)=0:IL(33)=Y:IZ(33)=55
4650 GOTO 1200
4700 IF N<>55 THEN 1510
4701 TT$="OK, it's locked."
4710 IF IL(32)<>0 THEN PRINT "It's already locked.":GOTO 1200
4715 IF IL(31)<>-1 THEN PRINT "You don't have the key.":GOTO 1200
4720 IF IL(33)=-1 OR IL(34)=-1 THEN PRINT "Put it down first.":GOTO 1200
4730 IF IL(33)=Y THEN PRINT TT$:IL(33)=0:IZ(33)=0:IL(32)=Y:IZ(32)=55
4740 IF IL(34)=Y THEN PRINT TT$:IL(34)=0:IZ(34)=0:IL(32)=Y:IZ(32)=55
4750 GOTO 1200
5000 IF V5<>0 THEN 1210
5001 IF XD=5 THEN 5140
5002 IF XD=8 THEN 7000
5003 GOTO 1250
5100 IF X7<>0 THEN 5110
5101 X7=1:IF IL(6)=-1 THEN 5130
5102 GOTO 5120
5110 IF IL(6)<>-1 THEN 5150
5111 IF XD>4 THEN 7000
5112 GOTO 5140
5120 IF XG=0 THEN 1210
5121 PRINT "A friendly native approaches with some trinkets."
5122 PRINT"It appears he wants make a trade.":GOTO 1220
5130 PRINT"Suddenly a volley of spears flies over your head. "
5131 PRINT"An obvious warning!"
5140 PRINT G9$:GOTO 1250
5150 PRINT GE$:GOTO 1220
5200 IF X7 THEN 5110
5201 X7=1:IF IL(6)-1 THEN 5130
5202 GOTO 5150
5300 IF Y=IL(15) AND I$(15)="A wild dog" THEN 5303
5301 IF Y=IL(14) AND I$(14)="A hungry alligator" THEN 5303
5302 GOTO 1210
5303 IF XD=8 THEN 7000
5304 IF XD=3 OR XD=5 THEN PRINT G9$
5310 GOTO 1250
5400 IF XQ=1 THEN 1250
5401 PRINT "A voice echoes from the mouth of the cave . . .s w a m i"
5402 XQ=1:GOTO 1210
5900 X1=0:IF N=16 OR N=27 OR N=32 OR N=33 THEN 5907
5901 RETURN
5907 TT$="Badly wounded, he crawls away."
5908 X1=1:IF IL(6)=-1 OR IL(16)=-1 THEN 5910
5909 RETURN
5910 QQ=0:IF (N=33 AND Y=27)THEN X1=2
5911 IF N=32 AND Y=22 THEN X1=2
5912 IF N=27 AND (Y=9 OR Y=10) AND P(9,4)=98 THEN X1=2
5913 IF N=16 AND V5=0 AND Y=7 THEN X1=2
5914 IF X1=2 AND RND(1)<.25 THEN PRINT TT$:QQ=1:XD=0
5915 IF QQ=0 THEN X1=1:RETURN
5916 II=0:FOR I=1 TO IM:IF IZ(I)=N THEN II=I:I=IM
5917 NEXT:IL(II)=Y+1
5920 RETURN
5950 IF N=38 THEN PRINT LEFT$(G6$,15)+"him.":GOTO 1200
5951 PRINT G6$:GOTO 1200
5960 IF N=38 THEN PRINT "He"+RIGHT$(G5$,20):GOTO 1200
5970 PRINT G5$:GOTO 1200
7000 PRINT ""
7001 IF Y=2 THEN PRINT "A scorpion bit you on the toe."
7002 IF Y=7 THEN PRINT "The viper struck."
7003 IF Y=27 THEN PRINT "The alligator got you."
7004 IF Y=4 THEN PRINT "A deadly spider hidden in the wood bit you on the hand."
7005 IF Y=34 THEN PRINT "The Ujiji had a very good meal. You were it."
7008 GOTO 7011
7009 PRINT "A poison-tipped spear got you in the back."
7010 PRINT:PRINT "Another explorer is lost in the wilds of darkest Africa."
7011 V=27:GOTO 3400

50001 P$(1)= "You are in a bedroom, wearing pj's. " + SP$
50002 P$(1)=P$(1) + "A nightstand is between the closet and the bed. "
50003 P$(1)=P$(1) + "The bedcovers are turned down."
50004 P$(2)="You are drifting in a row boat on a big lake."
50005 P$(2)=P$(2)+" There is a beach on the eastern shoreline."
50020 P$(3)="You are on the eastern shoreline. A boat is tied to the dock."
50021 P$(4)="You are on a grassy plain."
50022 P$(5)=""
50023 P$(6)="A trail begins here. Off to one side is a tree."
50060 P$(7)="You are precariously balanced in a moss-covered tree."
50061 P$(8)="You are on a north-south trail. Cliffs to the east "
50062 P$(8)=P$(8)+"reach up to a plateau."
50063 P$(9)="You are at the foot of a cliff. A path leads up to an opening."
50110 P$(10)="You are at the mouth of a cave. A trail leads downward."
50111 P$(11)="You are in a tunnel. A faint glow is to the west of you."
50112 P$(11)=P$(11)+" A sign on the wall says caverns ahead"
50113 P$(11)=P$(11)+"--enter at your own risk"
50130 P$(12)="You are in an immense cavern. The walls are covered with"
50131 P$(12)=P$(12)+" an iridescent glow."
50132 P$(13)="You are in a long east-west passage."
50133 P$(14)=""
50134 P$(15)="The trail here is overgrown with grass."
50135 P$(16)="The trail widens out to a nearby village."
50140 P$(17)="You are in a native village. There are several campfires about."
50141 P$(18)="You are in a grass hut."
50142 P$(19)="You are at the edge of the jungle. A trail leads north."
50143 P$(20)="You are at the edge of the jungle. Grasslands extend to"
50144 P$(20)=P$(20)+" the east and south."
50145 P$(17)=P$(17)+" The witch doctor's hut is to the south."
50160 P$(21)="You are in a jungle. Trails lead off in several directions."
50161 P$(22)=""
50162 P$(23)="There is a large body of quicksand here with a trail just beyond."
50163 P$(24)=""
50164 P$(25)=""
50165 P$(26)="You are on a grassy plains. The terrain is becoming marshy."
50170 P$(27)="You are in the marshes. Something is moving in the grass."
50171 P$(28)="You are in a valley. A small opening marks the hill beside"
50172 P$(28)=P$(28)+" you. Rolling hills flow southward."
50180 P$(29)="You are at a trading post. An eager native smiles at you as"
50181 P$(29)=P$(29)+" he points to his sign."
50182 P$(30)="You are in a field of corn. The ground drops off to the north."
50183 P$(31)="You are on a grassy plains. Two shrunken heads decorate a sign."
50190 P$(32)="You are on the plains. A village lies to the east."
50191 P$(33)="You are behind a hut. There is a sign in the ground. "
50192 P$(33)=P$(33)+" A squirrel just ran by."
50200 P$(34)="You are in a Ujiji village. A native stands near holding a"
50201 P$(34)=P$(34)+" spear. He looks excited."
50202 P$(35)="You are in a pit. Light streams in from above."
50210 P$(36)="You are lost inside the PET computer, somewhere under the crt."
50211 P$(36)=P$(36)+" Strange and wonderous components are all around."
50220 P$(37)="You are inside an obsolete set of roms; undocumented pointers"
50221 P$(37)=P$(37)+" are all around."
50900 P$(5)=P$(4):P$(14)=P$(10):P$(22)=P$(21):P$(25)=P$(21):P$(24)=P$(23)
50901 FOR I=1 TO PM:FOR J=0 TO 5:READ P(I,J):NEXT J,I
53000 FOR I=1 TO VM:READ V$(I):NEXT
54000 FOR I=1 TO NM:READ N$(I):NEXT
55000 FOR I=1 TO IM:READ I$(I):NEXT
56000 FOR I=1 TO IM:READ IL(I),IP(I),IZ(I):NEXT
56100 RETURN
60000 CLS
60005 LOCATE 7,27 : PRINT "African Adventure"
60010 LOCATE 9,1 : PRINT "Dr. Livingston is again 'lost' in the darkest out-reaches of Africa."
60030 PRINT "His rescue is your overall objective. To explore the terrain and to rescue"
60050 PRINT "Dr. Livingston, you need to enter a two word (verb-noun) command like"
60070 PRINT "'go east' or 'get book'. You may also move by entering just the"
60080 PRINT "direction or the first letter; i.e., 'e' for east."
60090 PRINT
60100 PRINT "The computer's vocabulary is limited, so if a word doesn't seem to"
60120 PRINT "work, try a new word or another approach."
60125 PRINT
60130 PRINT "In addition to Livingston, you will earn points for each object you 'get'"
60150 PRINT "and return to a secret location, but some objects may be put to better"
60170 PRINT "use during your adventure, so be creative!"
60175 PRINT : PRINT
60180 GOSUB 110
60185 CLS
60190 LOCATE 7,27 : PRINT "African Adventure"
60200 LOCATE 9,1 : PRINT "There are several helpful commands to use during your adventure:"
60210 PRINT ""
60220 PRINT " 'hint'--not always available"
60230 PRINT " 'look'--describes your surroundings"
60240 PRINT " 'I' or 'inventory'--lists the items in your possession"
60260 PRINT " 'score'--shows total points earned"
60270 PRINT " 'save'--saves a game in progess"
60280 PRINT " 'load'--loads a previously saved game"
60290 PRINT " 'quit'--ends game and gives final score"
60295 PRINT ""
60300 PRINT "Your adventure will be filled with danger and excitement. Beasts and"
60320 PRINT "gems, puzzles and quicksand are all about. The jungle is ever changing."
60340 PRINT "Trails are here today and gone tomorrow."
60350 PRINT "Explore! Be persistent! But most of all be adventurous!"
60360 PRINT "" : PRINT ""
60370 GOSUB 110
60380 GOTO 1000

DATA 0,0,0,0,0,0
DATA 0,0,3,0,0,0
DATA 0,5,4,2,0,0
DATA 5,6,4,3,0,0
DATA 3,0,6,4,0,0
DATA -5,8,-4,-5,7,0
DATA 0,0,0,0,7,6
DATA 6,15,9,0,0,0
DATA 0,0,0,8,98,0
DATA 0,0,11,0,0
DATA 98,0,0,12,10,0
DATA 13,-36,-11,-11,-11,-36
DATA -11,11,0,14,15,0
DATA 0,0,0,0,13,0
DATA 28,0,0,16,8,0
DATA 0,15,19,17,19,0
DATA 0,16,18,0,0,0
DATA 0,17,0,0,0,0
DATA 0,16,22,20,21,0
DATA 0,0,26,26,19,0
DATA 0,21,23,22,21,21
DATA 21,21,22,19,23,22
DATA 22,98,22,98,21,23
DATA 23,24,98,25,98,24
DATA 24,-20,25,-20,24,25
DATA 25,20,27,30,20,0
DATA 0,-26,27,27,27,27
DATA 27,0,30,29,0,14
DATA 0,0,0,0,28,0
DATA 0,28,26,0,31,0
DATA 0,30,32,33,31,0
DATA 0,31,0,98,31,0
DATA 0,0,0,0,31,0
DATA 0,34,34,34,32,0
DATA 35,0,0,36,13,34,0
DATA 0,12,0,35,0,12
DATA 0,0,36,0,0,0
DATA GET,DROP,I,OPEN,CLOSE,DRIFT,SWAMI,LOOK,THROW,HINT
DATA READ,GO,INVEN,TRADE,KILL,FREE,CHARM,JUMP,SCORE,ROW
DATA ENTER,CATCH,EXIT,CLIMB,EAT,FEED,QUIT,BUILD,MAKE,LIGHT
DATA SAVE,LOAD,CHECK,CHANG,UNLOC,LOCK
DATA N,S,E,W,U,D,NORTH,SOUTH,EAST,WEST
DATA UP,DOWN,KNAPS,SPEAR,FLUTE,VIPER,TREE,MOUSE,SIGN,BOOK
DATA BOAT,CLOSE,BED,BOOTS,PASSA,"",LEOPA,DIAMO,VILLA,TRINK
DATA CANE,DOG,ALLIG,SQUIR,DAGGE,NOTE,CHAIN,LIVIN,CORN,GROUN
DATA PIT,BEANS,QUICK,NATIV,SAPPH,HUT,LION,WOOD,FIRE,CAGE
DATA TOOLK,MATCH,STUFF,KEYS,CHEST,ROM,ROMS,GOLD,POINT,NUTS
DATA A TIMEWORN BOOK,A FADED RED KNAPSACK,EARS OF CORN
DATA A BATCH OF GROUNDNUTS,A TINY GREY MOUSE,A POISON-TIPPED SPEAR
DATA A PAIR OF HIKING BOOTS,A VICIOUS VIPER,A SPARKLING DIAMOND
DATA A SACK OF COFFEE BEANS,A CRUMPLED NOTE,A SOLID SILVER CHAIN
DATA SEVERAL STALKS OF SUGAR CANE,A HUNGRY ALLIGATOR ,A WILD DOG
DATA A PEARL-HANDLED DAGGER,DR. LIVINGSTON,A LETHARGIC VIPER
DATA A GOLDEN NOSE RING,A CHARMING LITTLE FLUTE,A DEEP-BLUE SAPPHIRE
DATA A RARE ALBINO LION,A CAGED RARE ALBINO LION,A PILE OF WOOD
DATA A BLAZING FIRE,A STRONG WOODEN CAGE,A PROGRAMMER'S TOOLKIT
DATA A BOOK OF MATCHES,SOME FOUL-SMELLING STUFF,A BOOK OF BURNT MATCHES
DATA A RING OF RUSTY KEYS,A LOCKED CHEST,AN UNLOCKED CHEST
DATA AN EMPTY CHEST,KING SOLOMON'S GOLD
DATA 1,0,20
DATA 1,2,13
DATA 30,5,39
DATA 33,5,40
DATA 2,7,18
DATA 0,3,14
DATA 1,50,24
DATA 7,0,16
DATA 10,15,28
DATA 15,12,42
DATA 18,3,36
DATA 29,15,37
DATA 24,15,31
DATA 27,0,33
DATA 22,10,32
DATA 12,10,35
DATA 35,50,38
DATA 0,0,16
DATA 0,12,26
DATA 0,15,15
DATA 0,10,45
DATA 26,0,47
DATA 0,15,47
DATA 4,0,48
DATA 0,10,49
DATA 0,5,50
DATA 36,10,51
DATA 0,5,52
DATA 18,5,53
DATA 0,0,52
DATA 0,5,54
DATA 37,5,55
DATA 0,5,0
DATA 0,5,0
DATA 0,20,58

Posted on Nov 28, 2014, 10:19 AM

Respond to this message   

Return to Index


I tried running the programs in GWBASIC and in QB45

by Solitaire (no login)

Each one gave me all kinds of errors, so I just deleted them. No time to waste.

Posted on Nov 28, 2014, 10:16 AM

Respond to this message   

Return to Index


*yeah, there's spacing issues galore (i got bored with it too)

by mn (no login)

Posted on Nov 28, 2014, 10:20 AM

Respond to this message   

Return to Index


I've got the fix for SCREEN and SCREEN 12...

by SMcNeill (no login)

My solution was basically:

Use the current font set for the screen.
Read in an array of _FONTWIDTH x _FONTHEIGHT pixels.
If one color exists, return CHR$(32). It's a space.
If 2 colors exist, we have a foreground and background. Compare vs font in memory and return closest match.
If more than 2 colors exist, return CHR$(0), as we can't find a match.

Unfortunately I won't be pushing this "fix" into the source, for these reasons:

1) You guys don't want me pushing any changes, and are even willing to pay for me not to.
2) It breaks QB compatibility with existing code. There's no reason why old programs couldn't print a "T" on the screen, draw a colored box around it, and then paint the inside of that box to have a colored background. However, IF someone were to do such a simple thing in QBasic in SCREEN 12 to get a colored background, the SCREEN function never returned the character. It ONLY works with a black background, even if you manually color one in yourself.

So, for compatibilty's sake, and since you guys are so against altering anything except by Galleon, I'm not going to push anything into the source. If you really want the fix, just ask and I'll post you instructions and you can alter your source files yourself. Only tested in the latest GL dirty-build; I don't even keep SDL around anymore so I have no clue if the "fix" would work with it. As it's graphical in nature, probably not, but you could try and see I suppose.

**************************

One question though: When I added all the math commands into QB64, that was about 50 lines of code and you guys complained about major BLOAT. The string compare routine was about 30 lines of code, and major bloat... This change is larger than both of those put together. Would it be bloat, or something you'd endorse for the source without complaint since you want it??

Either way, as an act of good faith for the forthcoming payment from menn, it's not going into the repository. Sorry, if someone was hoping to make use of these alterations by just grabbing a build of QB64. And don't try and share any code that uses the changes; no one else will probably be able to make use of it if you share it....


******************************

Note:

This only works for the current font on the screen. If you changed it, it won't find a match. This only works for LOCATION coordinates. If you used _PRINTSTRING to print at a pixel coordinate, it won't find a match. If you use _PRINTMODE to print over a picture, it probably won't find a match. (You're very likely to have more than 2 colors in a case like that.) if you scale the text, it won't find a match...

Load the font you want to look for.
Assign it to the screen you're wanting to check.
And if there's a character at that spot that matches any of the 256 characters available, with ONLY a foreground and background, it'll return that code back to you...


Are you wanting the instructions, so you can alter your own version of QB64?

Posted on Nov 26, 2014, 5:05 AM

Respond to this message   

Return to Index


LMAO on anybody paying you ANYTHING to not do anything on QB64

by Clippy (Login burger2227)
R

Who do you think we are? The Government?

The Government should not even pay farmers who CHOOSE NOT to grow ginseng to make lots of money.

So why should we? happy.gif

Posted on Nov 26, 2014, 6:03 AM

Respond to this message   

Return to Index


Re: LMAO on anybody paying you ANYTHING to not do anything on QB64

by SMcNeill (no login)

To be honest, I have no idea. You'll have to ask Menn about why someone who doesn't use a product would pay people not to make changes to the product he's already not using...

I've got to admit, I imagine I'm probably LMAO more so than you are over the whole situation. ;)


And the government doesn't pay for NOT growing ginseng. I've got acres and acres and acres of it growing... It just takes 3-7 years to get ready to harvest again, so it's not being sold, and I'm not getting paid for NOT selling it.

But no worries! This year, my income was almost ZILCH. In fact, it might even be a NEGATIVE income once I factor in depreciation of things on the farm... You didn't get to support me this year, but next year your tax dollars will. It doesn't matter that I've got more land fenced off for my dog to run on than you do for your whole family to use; in the US we give handouts to those with low income and not low wealth...

All I have to do is NOTHING, and you guys send me all sorts of cash and such. I wonder if mn is a government bureaucrat? I don't understand the philosophy, but I certainly will enjoy all I can get from it. :P

After all, all I have to do is nothing, and I'm a master of that!

Posted on Nov 26, 2014, 6:19 AM

Respond to this message   

Return to Index


Have an idea for a program you don't want? Pay Steve not to code it!

by Pete (Login The-Universe)
Admin

Damn environmentalist. If I don't stop laughing soon, I'll run out o all the saved up paper bags I hoarded, in case of severe relapses of hyperventilation. Funny story from many Thanksgivings ago... I got my 12 year old niece laughing so hard, she did start hyperventilating; so I grabbed a large paper grocery bag, told everyone, "Stand back, I'm a trained professional!" and proceeded to put the entire bag over her head. I closed it by squeezing it around her throat. The results? Well, the bag inflated and deflated at a serious pace or about 30 seconds, so much so, you could actually see the outline of her face while deflated. The CO2 built up to high enough levels, and she stopped hyperventilating. As I stated, I was a trained professional, so yes, at that point I did remove the bag. The only problem was the visual to everyone watching was so entertaining, I had a back up of hyperventilation cases to treat. Like I have stated, I don't take vacation days.

Anyway, laughing aside... Steve, I'll leave it up to you and mennonite about posting it. I always like to see code, ideas, etc., but I don't want to rock the boat with so much money at stake. Just think i someone payed Bill Gates $10 a month not to steal code, we'd all be coding on a Mac.

For me personally, I would not make use of the "fix" and as you pointed out, it still isn't universal. This was an inconsistency I discovered while experimenting with text-graphics hybrid models, and I only need the workups o those models to convert them to Android, and since Android does not have the same features, I have to code my own PCOPY, color saving routines, cursor, etc., which I have already accomplished.

Wishing you and your family a Happy Thanksgiving, and thanks to menn, that extra can of cranberry sauce on the table isn't just a dream anymore!

Pete



Posted on Nov 26, 2014, 9:38 AM

Respond to this message   

Return to Index


alas it will probably be at least a couple days late for thanksgiving

by mn (no login)

though i find it hard to believe a farm doesn't have extra cranberries on hand. for much less than twice what steves getting, you can buy 50 pounds of apple drops perfect for pies (and a treat for the animals.) cranberries might be more, but i did say 50 pounds.

the weekend and thanksgiving really do complicate guessing, and i don't know how long it takes to reach va, but it should be in steve's hands by next week- probably in the middle.

thanksgiving is a stupid holiday, insulting both our intelligence and also people we violently overthrew and shoved into museums and whatever shreds of land we didn't much need. but it's a chance to see family and eat a lot, so i (begrudgingly) enjoy it. every year i care a little less about holidays and (begrudgingly) enjoy myself a little more, so a sincerely happy whatever to anyone that cares. :)

Posted on Nov 26, 2014, 10:21 AM

Respond to this message   

Return to Index


I thought Steve's farm, The Tinkerosa, extended clear down where you live.

by Pete (Login The-Universe)
Admin

Ponder that one, Steve...

Hey menn, just kick it across the fence, and let Steve find it!

Actually, I may just code and golf tomorrow. I like holidays, but I was never a big fan of Thanksgiving. I usually eat food I actually like most other days, instead o that traditional crap most families prepare, and I agree with you about how the holiday was founded, at least in part. It started out all innocent enough, all fun and games, until someone loses a scalp... Sad part of North American history, what followed. Anyway, I have always preferred to do what I want, rather than the herd.

I will just be thankful if I have this graphics layer map figured out by tomorrow...

Pete


Posted on Nov 26, 2014, 10:48 AM

Respond to this message   

Return to Index


Pete never was one to share...

by Clippy (Login burger2227)
R

So why would any holiday get in his way? happy.gif

Also there is news that EIC extensions are not going to be renewed after 2017 Steve...thank your GOP!

Posted on Nov 26, 2014, 11:00 AM

Respond to this message   

Return to Index


I'll share this with everyone..

by Pete (Login The-Universe)
Admin

Clippy had a hind brain
His hind brain had a cell
When Clippy tried to use it
His brain blew straight to...

Hello World programs
Please INPUT your name here
Virgina has a boardwalk
So please jump off the pier.

----------------

I really need to lighten up on the vodka to cranberry ratio this year.

- Pete :P




Posted on Nov 26, 2014, 11:32 AM

Respond to this message   

Return to Index


how's the next verse go?

by mn (no login)

menn is such a crazy
He won't make any sense
To just keep your last piece of mind
Will cost twelve thousand Pence!

Galleon is a sailboat
He calls it the G-Wan
It sailed into Bermuda
A year now he's been gone!

Pete is now retired
Ted still calls him quack
And now he pays to work here
But he still makes the cracks

Posted on Nov 26, 2014, 11:41 AM

Respond to this message   

Return to Index


like writing a basic language, it's harder to do it properly

by mn (no login)

...so jump off a pie...

erre is not a member,
But menn's one crazy B----
To just keep your last piece of mind
Will cost twelve thousand P...

ete is now retired
Ted still calls him quack
And now he pays to work here
But he still makes the cracks

in Galleon's sailboat
He calls it the G-Wan
It sailed into Bermuda
A year now he's been gone

Are days of BASIC
being so fun to learn
In its old age it's gotten "horse"
It's taken a dark...

Posted on Nov 26, 2014, 11:51 AM

Respond to this message   

Return to Index


Write in Arabic in QB64 IDE

by Shinobi (no login)

Hi..

How can I write in Arabic language in the QB64 IDE? I mean how can I use Arabic language inside the print statement to generate some Arabic text feed to the screen.

When I press ALT+SHIFT to change language from English to Arabic and then trying to write, all what I get is rubbish.

Thanks

Posted on Nov 25, 2014, 12:41 PM

Respond to this message   

Return to Index


_MAPUNICODE will display foreign characters

by Clippy (Login burger2227)
R

Posted on Nov 25, 2014, 2:58 PM

Respond to this message   

Return to Index


Arabic might be a special case.

by Michael Calkins (Login MCalkins)
Moderator

Not only is Arabic right-to-left, and can use combining diacritics, but it is cursive. Each Arabic letter can have up to 4 versions: an isolated form, a beginning form, a middle form, and an ending form. If I understand correctly, a text rendering system is supposed to automatically use the correct form, from a single unicode point. So, for example, an Arabic keyboard could have a single key for each letter.

I have noticed on some of the Arabic songs that I have downloaded, that Windows displays the filename using just the isolated forms, but Windows media player and wordpad display the same text using the correct cursive forms.

Regards,
Michael

Posted on Nov 28, 2014, 11:58 AM

Respond to this message   

Return to Index


cp864 version

by Michael Calkins (Login MCalkins)
Moderator

' http://www.qb64.net/wiki/index.php/MAPUNICODE
' http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP864.TXT

DEFSTR A-Z

CONST DEGREE_SIGN = &H80
CONST MIDDLE_DOT = &H81
CONST BULLET_OPERATOR = &H82
CONST SQUARE_ROOT = &H83
CONST MEDIUM_SHADE = &H84
CONST FORMS_LIGHT_HORIZONTAL = &H85
CONST FORMS_LIGHT_VERTICAL = &H86
CONST FORMS_LIGHT_VERTICAL_AND_HORIZONTAL = &H87
CONST FORMS_LIGHT_VERTICAL_AND_LEFT = &H88
CONST FORMS_LIGHT_DOWN_AND_HORIZONTAL = &H89
CONST FORMS_LIGHT_VERTICAL_AND_RIGHT = &H8A
CONST FORMS_LIGHT_UP_AND_HORIZONTAL = &H8B
CONST FORMS_LIGHT_DOWN_AND_LEFT = &H8C
CONST FORMS_LIGHT_DOWN_AND_RIGHT = &H8D
CONST FORMS_LIGHT_UP_AND_RIGHT = &H8E
CONST FORMS_LIGHT_UP_AND_LEFT = &H8F
CONST GREEK_SMALL_BETA = &H90
CONST INFINITY = &H91
CONST GREEK_SMALL_PHI = &H92
CONST PLUS_OR_MINUS_SIGN = &H93
CONST FRACTION_1_2 = &H94
CONST FRACTION_1_4 = &H95
CONST ALMOST_EQUAL_TO = &H96
CONST LEFT_POINTING_GUILLEMET = &H97
CONST RIGHT_POINTING_GUILLEMET = &H98
CONST LAM_WITH_ALEF_WITH_HAMZA_ABOVE_ISOLATED = &H99
CONST LAM_WITH_ALEF_WITH_HAMZA_ABOVE_FINAL = &H9A
CONST LAM_WITH_ALEF_ISOLATED = &H9D
CONST LAM_WITH_ALEF_FINAL = &H9E
CONST NON_BREAKING_SPACE = &HA0
CONST SOFT_HYPHEN = &HA1
CONST ALEF_WITH_MADDA_ABOVE_FINAL = &HA2
CONST POUND_SIGN = &HA3
CONST CURRENCY_SIGN = &HA4
CONST ALEF_WITH_HAMZA_ABOVE_FINAL = &HA5
CONST ALEF_FINAL = &HA8
CONST BEH_ISOLATED = &HA9
CONST TEH_ISOLATED = &HAA
CONST THEH_ISOLATED = &HAB
CONST COMMA = &HAC
CONST JEEM_ISOLATED = &HAD
CONST HAH_ISOLATED = &HAE
CONST KHAH_ISOLATED = &HAF
CONST ZERO = &HB0
CONST ONE = &HB1
CONST TWO = &HB2
CONST THREE = &HB3
CONST FOUR = &HB4
CONST FIVE = &HB5
CONST SIX = &HB6
CONST SEVEN = &HB7
CONST EIGHT = &HB8
CONST NINE = &HB9
CONST FEH_ISOLATED = &HBA
CONST SEMICOLON = &HBB
CONST SEEN_ISOLATED = &HBC
CONST SHEEN_ISOLATED = &HBD
CONST SAD_ISOLATED = &HBE
CONST QUESTION_MARK = &HBF
CONST CENT_SIGN = &HC0
CONST HAMZA_ISOLATED = &HC1
CONST ALEF_WITH_MADDA_ABOVE_ISOLATED = &HC2
CONST ALEF_WITH_HAMZA_ABOVE_ISOLATED = &HC3
CONST WAW_WITH_HAMZA_ABOVE_ISOLATED = &HC4
CONST AIN_FINAL = &HC5
CONST YEH_WITH_HAMZA_ABOVE_INITIAL = &HC6
CONST ALEF_ISOLATED = &HC7
CONST BEH_INITIAL = &HC8
CONST TEH_MARBUTA_ISOLATED = &HC9
CONST TEH_INITIAL = &HCA
CONST THEH_INITIAL = &HCB
CONST JEEM_INITIAL = &HCC
CONST HAH_INITIAL = &HCD
CONST KHAH_INITIAL = &HCE
CONST DAL_ISOLATED = &HCF
CONST THAL_ISOLATED = &HD0
CONST REH_ISOLATED = &HD1
CONST ZAIN_ISOLATED = &HD2
CONST SEEN_INITIAL = &HD3
CONST SHEEN_INITIAL = &HD4
CONST SAD_INITIAL = &HD5
CONST DAD_INITIAL = &HD6
CONST TAH_ISOLATED = &HD7
CONST ZAH_ISOLATED = &HD8
CONST AIN_INITIAL = &HD9
CONST GHAIN_INITIAL = &HDA
CONST BROKEN_VERTICAL_BAR = &HDB
CONST NOT_SIGN = &HDC
CONST DIVISION_SIGN = &HDD
CONST MULTIPLICATION_SIGN = &HDE
CONST AIN_ISOLATED = &HDF
CONST TATWEEL = &HE0
CONST FEH_INITIAL = &HE1
CONST QAF_INITIAL = &HE2
CONST KAF_INITIAL = &HE3
CONST LAM_INITIAL = &HE4
CONST MEEM_INITIAL = &HE5
CONST NOON_INITIAL = &HE6
CONST HEH_INITIAL = &HE7
CONST WAW_ISOLATED = &HE8
CONST ALEF_MAKSURA_ISOLATED = &HE9
CONST YEH_INITIAL = &HEA
CONST DAD_ISOLATED = &HEB
CONST AIN_MEDIAL = &HEC
CONST GHAIN_FINAL = &HED
CONST GHAIN_ISOLATED = &HEE
CONST MEEM_ISOLATED = &HEF
CONST SHADDA_MEDIAL = &HF0
CONST SHADDAH = &HF1
CONST NOON_ISOLATED = &HF2
CONST HEH_ISOLATED = &HF3
CONST HEH_MEDIAL = &HF4
CONST ALEF_MAKSURA_FINAL = &HF5
CONST YEH_FINAL = &HF6
CONST GHAIN_MEDIAL = &HF7
CONST QAF_ISOLATED = &HF8
CONST LAM_WITH_ALEF_WITH_MADDA_ABOVE_ISOLATED = &HF9
CONST LAM_WITH_ALEF_WITH_MADDA_ABOVE_FINAL = &HFA
CONST LAM_ISOLATED = &HFB
CONST KAF_ISOLATED = &HFC
CONST YEH_ISOLATED = &HFD
CONST BLACK_SQUARE = &HFE
CONST NED = &HFF


DIM font AS LONG
DIM unicode AS _UNSIGNED LONG
DIM ansi AS _UNSIGNED _BYTE
DIM t AS STRING

font = _LOADFONT("C:\windows\fonts\cour.ttf", 20, "MONOSPACE")
_FONT font

RESTORE cp864
FOR ansi = &H80 TO &HFF
 READ unicode
 _MAPUNICODE unicode TO ansi
NEXT

t = CHR$(SEEN_INITIAL) + t
t = CHR$(LAM_WITH_ALEF_FINAL) + t
t = CHR$(MEEM_ISOLATED) + t
t = " " + t
t = CHR$(AIN_INITIAL) + t
t = CHR$(LAM_INITIAL) + t
t = CHR$(YEH_INITIAL) + t
t = CHR$(KAF_INITIAL) + t
t = CHR$(MEEM_ISOLATED) + t
PRINT t

SLEEP: WHILE 0 = LEN(INKEY$): WEND

_FONT 16
_FREEFONT font
SYSTEM

cp864:
DATA &h00b0,&h00b7,&h2219,&h221a,&h2592,&h2500,&h2502,&h253c,&h2524,&h252c,&h251c,&h2534,&h2510,&h250c,&h2514,&h2518
DATA &h03b2,&h221e,&h03c6,&h00b1,&h00bd,&h00bc,&h2248,&h00ab,&h00bb,&hfef7,&hfef8,0,0,&hfefb,&hfefc,0
DATA &h00a0,&h00ad,&hfe82,&h00a3,&h00a4,&hfe84,0,0,&hfe8e,&hfe8f,&hfe95,&hfe99,&h060c,&hfe9d,&hfea1,&hfea5
DATA &h0660,&h0661,&h0662,&h0663,&h0664,&h0665,&h0666,&h0667,&h0668,&h0669,&hfed1,&h061b,&hfeb1,&hfeb5,&hfeb9,&h061f
DATA &h00a2,&hfe80,&hfe81,&hfe83,&hfe85,&hfeca,&hfe8b,&hfe8d,&hfe91,&hfe93,&hfe97,&hfe9b,&hfe9f,&hfea3,&hfea7,&hfea9
DATA &hfeab,&hfead,&hfeaf,&hfeb3,&hfeb7,&hfebb,&hfebf,&hfec1,&hfec5,&hfecb,&hfecf,&h00a6,&h00ac,&h00f7,&h00d7,&hfec9
DATA &h0640,&hfed3,&hfed7,&hfedb,&hfedf,&hfee3,&hfee7,&hfeeb,&hfeed,&hfeef,&hfef3,&hfebd,&hfecc,&hfece,&hfecd,&hfee1
DATA &hfe7d,&h0651,&hfee5,&hfee9,&hfeec,&hfef0,&hfef2,&hfed0,&hfed5,&hfef5,&hfef6,&hfedd,&hfed9,&hfef1,&h25a0,0

Posted on Nov 28, 2014, 5:42 PM

Respond to this message   

Return to Index


Helpy helpers helping coders

by (no login)

This is more about the general state of computing than it is about any particular developer (systemd after all has at least 2 developers, and Microsoft has "2" many.)

But this year has been (and will continue to be) a year where help gets in the way.

A lot of the energy going into coding right now (for users of Android, for former BASIC coders, and for hordes of GNU/Linux users,) is being spent "unhelping."

I don't mean all that energy is going into not helping, but rather helping people get *around* all the "helpful" things we've been "helped" with, by Google and systemd and so many "conveniences" that have made things so "convenient" that they have to be fixed.

Helpy helpers are so convinced they're really "helping," they joyfully bulloze TAILORED solutions, and replace them with "helpful," "simple," one-size/fits-almost-no-one solutions. They fit almost no one by comparison, but they do fit a nice combination of people who don't care what breaks, and just enough people that like anything "new" that combined, they look like a majority.

Of course they're not a majority. But they do succeed in making the people scrambling to clean and work around them LOOK like a minority, and "everyone" is happy.

What's this to do with BASIC? It's happened to every "fad basic" since QB, including Visual Basic (1.0 through today.) It's like when your kids decide to "make you breakfast," but all they really do is destroy the kitchen. If they're your kids, it might be cute. If it's someone else's kids and your kitchen, not quite so much fun.

There's a joke about this attitude in the Free Software community, that goes: "People welcome progress, as long as it doesn't change anything." That's a funny exaggeration, and there's a simple way to make it sound a lot less absurd, but... Yeah, *pretty much!* How about this: "Bathwater needs to be thrown out, and babies grow up, but if you try to swap the baby out for a different one, someone is really going to be miffed about it." It's very common sense, but of course common sense isn't very.

Posted on Nov 25, 2014, 12:23 PM

Respond to this message   

Return to Index


Making libraries. It's more about the journey than the _DEST.

by Pete (Login The-Universe)
Admin

_DEST is a QB64 keyword, btw. It's a good thing mennonite is paying Steve not to code, or after reading this post, we'd probably have a _JOUR statement pushed, but I digress...

Coding so various functions like popups, enlarging, screen memory, scrolling, area selection, etc. takes a lot of time and planning compared to my old favorite run and gun coding. I'm enjoying the process, but I keep focusing on improvements to universal usability of each function, so I can;t say I'm really working on any particular project, only developing the building blocks for the things I use most.

Pete

- Help make the world a better place. Pay Steve not to code! happy.gif

Posted on Nov 25, 2014, 11:33 AM

Respond to this message   

Return to Index


i'm not against him coding, i wouldn't even pay lennart poettering to not code

by mn (no login)

and poettering is doing much worse things to software all over the world than steve has ever been accused of; an ordor of magnitude isn't enough difference.

i wouldn't pay anyone not to code. i'm paying, if we're lucky, for qb64 to be developed more carefully and slowly. it won't stop steve from contributing, and it definitely won't stop him from writing code. i'm looking forward to seeing how fast a loophole is used, and whether it changes anything at all.

but like i said, i can't tell you about a year from now, but i'd consider paying him 5 a month next year just to stop shooting down bug reports and *cough* "feature requests" the moment he sees one. that doesn't require anything other than slowing down, either.

i'd be perfectly happy for him to ignore everything i ever say. but when actual users talk about bugs and "feature expansion" that really isn't, i'd like him to stick around and make things work before running off to make more half-implemented features. some people can do both (and far more think they can.) it's about design decisions too, not just debugging. what's more, it's about decisions that affect all users (and teachers) of the language.

that is of course, unless i've just got my head up my ascii and i'm imagining it completely. you don't seem to think so, but you "suffer" from the same lack of youthful fill-in-the-blank that i do, eh? if i'm going to be paying steve to do anything at all, it's really just to slow down and consider design and improvement. but the terms we already posted are sufficient, as far as i'll be able to tell until i see what happens after he gets his first $10. then we'll know (if anything) what it gets us. it's not like $120 is much; you can't buy real development for that, but if you're lucky you can nudge it.

Posted on Nov 25, 2014, 11:54 AM

Respond to this message   

Return to Index


*You clearly intended to say "An 'odor' of magnitude"

by Spelling Police (no login)

Posted on Nov 25, 2014, 11:56 AM

Respond to this message   

Return to Index


Working on layers.

by Pete (Login The-Universe)
Admin

I am going to try making a type of replacement PCOPY and SCREEN so I can use that matrix function to keep track of up to 3 screens. I think I will just use layer as a function to imply a copy of the current active screen to the next layer. That would be a bit less involved to apply, but not as versatile as PCOPY and SCREEN().

Pete

Posted on Nov 25, 2014, 7:36 PM

Respond to this message   

Return to Index


Mixing graphics with text is a pain in the ASCII.

by Pete (Login The-Universe)
Admin

Mapping the text and color of the text doesn't require too much memory, but throw a couple of 640 x 480 graphic overlays on top and I can see the out-of-memory message in Android like I was looking into a crystal ball. (I only use those or patient diagnostic purposes, Clippy.) Anyway, I think my solution will probably be to record the line statements used in each graphics overlay, and reproduce those when a layer is removed. That should make an interesting function, onto itself.

Pete

Posted on Nov 25, 2014, 11:05 PM

Respond to this message   

Return to Index


i would love to use a language with a text layer and graphics layer

by mn (no login)

i could probably do that with my favorite language, but i'd have to implement the text layer myself.

generally i choose text (which only does text, but then it actually works without "windows" or any similar thing running) or i choose what is essentially a thick wrapper around sdl (which is also what qb64 used to be.) in that case, there are no friendly text routines (unlike qb64) only "draw this text, here" like sdl usually does.

actually, this is the one thing javascript is good at. it takes a text-centric background, allows inline graphics, and allows boxes of text and boxes of graphics on top, all of which can be moved and edited using code.

everything else about it is tedious and less fun to code in, but the premise and the design (underneath the completely abysmal language syntax/conventions) are golden. you should have an awful lot of fun when you've setup anything remotely like that to your own specifications.

Posted on Nov 26, 2014, 11:19 AM

Respond to this message   

Return to Index


Well, this is the solution I came up with. Any better ideas?

by Pete (Login The-Universe)
Admin

COMMON SHARED gmap$
SCREEN 12
bl = 250
bt = 150
br = 380
bb = 280
gmap$ = fbox$(bl, bt, br, bb, 4, 1)
bl = 350
bt = 250
br = 480
bb = 380
gmap$ = fbox$(bl, bt, br, bb, 7, 0)
SLEEP 2
CLS
SLEEP 2
a = gshow
END

FUNCTION fbox$ (fbl, fbt, fbr, fbb, fbc, fbfill)
SELECT CASE fbfill
CASE 0
LINE (fbl, fbt)-(fbr, fbb), fbc, B
CASE ELSE
LINE (fbl, fbt)-(fbr, fbb), fbc, BF
END SELECT
x$ = LTRIM$(STR$(fbl))
x$ = STRING$(4 - LEN(x$), "0000") + x$
fbox$ = fbox$ + x$
x$ = LTRIM$(STR$(fbt))
x$ = STRING$(4 - LEN(x$), "0000") + x$
fbox$ = fbox$ + x$
x$ = LTRIM$(STR$(fbr))
x$ = STRING$(4 - LEN(x$), "0000") + x$
fbox$ = fbox$ + x$
x$ = LTRIM$(STR$(fbb))
x$ = STRING$(4 - LEN(x$), "0000") + x$
fbox$ = fbox$ + x$
x$ = LTRIM$(STR$(fbc))
x$ = STRING$(4 - LEN(x$), "0000") + x$
fbox$ = fbox$ + x$
x$ = LTRIM$(STR$(fbfill))
x$ = STRING$(4 - LEN(x$), "0000") + x$
fbox$ = gmap$ + fbox$ + x$
END FUNCTION

FUNCTION gshow
FOR i = 1 TO LEN(gmap$) STEP 24
SELECT CASE VAL(MID$(gmap$, i + 20, 4))
CASE 0
LINE (VAL(MID$(gmap$, i, 4)), VAL(MID$(gmap$, i + 4, 4)))-(VAL(MID$(gmap$, i + 8, 4)), VAL(MID$(gmap$, i + 12, 4))), VAL(MID$(gmap$, i + 16, 4)), B
CASE ELSE
LINE (VAL(MID$(gmap$, i, 4)), VAL(MID$(gmap$, i + 4, 4)))-(VAL(MID$(gmap$, i + 8, 4)), VAL(MID$(gmap$, i + 12, 4))), VAL(MID$(gmap$, i + 16, 4)), BF
END SELECT
NEXT
END FUNCTION

Posted on Nov 26, 2014, 11:53 AM

Respond to this message   

Return to Index


nope, i would have done pretty much exactly that

by mn (no login)

when it was easier to use mid$ than arrays, what you've got there looks like something like i'd write (or even wrote.)

now i'd just use something like gmap = [(n, n, n, n), (n, n, n, n), (n, n, n, n,)...] and call gmap[position][element] but in basic i used mid$ for almost everything, including mapping text positions and characters the way you're doing it.

Posted on Nov 26, 2014, 12:05 PM

Respond to this message   

Return to Index


And I'm using FUNCTIONS instead of SUBS, because...

by Pete (Login The-Universe)
Admin

Android-BASIC doesn't support subs. It actually assign line numbers. Thankfully, it allows labels, or I wouldn't have even bothered with it, and it assigns line numbers automatically when it compiles. Why the hell it does so is beyond me, but I suppose it is because it comes with an interpreter. When it converts to C it doesn't need the line numbers.

Pete

Posted on Nov 26, 2014, 12:17 PM

Respond to this message   

Return to Index


i don't know why they ever used subs

by mn (no login)

i guess it's nice to say "sub" when it's like gosub, and "function" when it's like "def fn."

ideally you'd just be able to use sub and "return variable" if you wanted it to be a function. but don't tell you-know-who.

Posted on Nov 26, 2014, 12:24 PM

Respond to this message   

Return to Index


Re: i don't know why they ever used subs

by QB Codeboy (no login)

The reason is simple. SUB is used to DO something. FUNCTION is used to RETURN something.

SUB COS(angle)
REM what the heck would we do here as a sub?
END SUB


FUNCTION CLS
REM do we need a return value when clearing the screen?
END SUB

SUB is a subroutine to perform an action. FUNCTION is a function that returns a value. It's that BASIC a difference.

Posted on Nov 26, 2014, 1:52 PM

Respond to this message   

Return to Index


darn it pete, you told him

by mn (no login)

SUB is a subroutine to perform an action. FUNCTION is a function that returns a value.

or in other words, FUNCTION is a SUB that returns a value. my point was that the "BASIC" difference was pretty superficial, and barely required two names. the reason i didn't want you to get wind of it is i didn't want you to turn it into some request to remove BASIC functionality.

it's a purely hypothetical critique of a decision made over 20 years ago. i definitely wouldn't change it now, just to break things that work just fine.

Posted on Nov 26, 2014, 2:09 PM

Respond to this message   

Return to Index


* SUB is a FUNCTION WITHOUT returning a value, and FUNCTION is a SUB WITH a VALUE *

by Department of Redundancy Department (no login)

Posted on Nov 26, 2014, 2:32 PM

Respond to this message   

Return to Index


Speaking of redundancy...

by TheBOB (Login qb432l)
Mod

SUB's return values, too (info for newbies, mostly). If you pass an argument to a sub by reference (default method) and that argument is altered by the SUB, then its value changes in the calling procedure. In that regard, you can in some cases use a SUB as a FUNCTION:

CLS

a = 9
PRINT
PRINT a
Rooter a
PRINT a

c = 10
PRINT
PRINT c
DontSquare (c)
PRINT c

END

SUB Rooter (b)
b = SQR(b)
END SUB

SUB DontSquare (d)
d = d ^ 2
END SUB

Placing parentheses around an argument passes it by value so that the SUB doesn't change it.

-Bob

Posted on Nov 26, 2014, 7:33 PM

Respond to this message   

Return to Index


That was one of the reasons I almost never used functions.

by Pete (Login The-Universe)
Admin

Subs were able to do both. Now I find I'm using a language where I have to trick a function into acting like a sub!

Pete

Posted on Nov 26, 2014, 7:48 PM

Respond to this message   

Return to Index


(info for newbies, mostly)

by SMcNeill (no login)

Just a small clarification here:

SUBs can pass variables by reference, AS LONG AS THE DATA TYPES MATCH.


x = 1
PRINT x
addone x
PRINT x
addoneinteger x
PRINT x

SUB addone (y)
y = y + 1
END SUB

SUB addoneinteger (y%)
y% = y% + 1
END SUB



The above will print 1, 2, 2.

In the main program X is a default SINGLE variable. In the SUB addone, y is a default SINGLE variable. These routines will pass values back and forth.

In the addoneinteger sub, y is an INTEGER variable. The values here will not pass by reference.

Variable types in parameters need to match before the values will pass back and forth.

Posted on Nov 26, 2014, 9:14 PM

Respond to this message   

Return to Index


if at first you don't succeed, apply wall to forehead until your question's answered

by mn (no login)

fantastic!

originally i asked a semi-rhetorical question (if you want to ask a fully rhetorical question, don't use an online forum) based on (common) syntax.

then i got an answer telling me nothing i didn't already know when i asked said question. kind of dull.

eventually, thanks to thebob, the discussion got interesting and finally (if inadvertently) shed some light on the original question.

why bother with SUB and FUNCTION? because although (truly) most uses aren't different enough to require two difference statements (as i implied) the two contain less-used features that are quite different.

i consider it a successful question if i a. made a point (oh well) or, b. actually learned something (hooray!)

also, i never used subs or functions much. but when i did, there wasn't much difference (other than the obvious one.) nice to know they had a good reason, because before i couldn't guess what it was.

also, thanks.

Posted on Nov 26, 2014, 10:30 PM

Respond to this message   

Return to Index


*Good point, Steve!

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 26, 2014, 10:33 PM

Respond to this message   

Return to Index


But did you know 15 minutes could save you up to 15% on car insurance?

by Pete (Login The-Universe)
Admin

In other words, everybody knows that.

It's bad enough menn has to pay you not to code. Don't make me pay you not to post, too! (Just kidding.)

Passing by reference was an ingenious idea by whoever came up with the concept. It allows for mathematical computations to be made and passed as a single variable. As an example, my line function...

gmap$(layer) = fbox$(marginleft * hpixels - hpixels + 6, margintop * vpixels - vpixels + 6, (marginleft - 1 + pagewidtxh) * hpixels - 6, (margintop + pageheight) * vpixels - 6, 15, 0)

FUNCTION fbox$ (fbl, fbt, fbr, fbb, fbc, fbfill)
END FUNCTION


- Pete

Posted on Nov 26, 2014, 10:33 PM

Respond to this message   

Return to Index


Everybody knows that, but did you know...

by Clippy (Login burger2227)
R

that the Indians want their land back?

[linked image]

Posted on Nov 27, 2014, 6:02 AM

Respond to this message   

Return to Index


ROFL - And I'll let it stay for the holiday!

by Pete (Login The-Universe)
Admin

But don't get used to posting non-qb pics in the main forum.

That's the funniest way yet I've seen to explain why we need to be serious about immigration laws.

Pete

Posted on Nov 27, 2014, 8:53 AM

Respond to this message   

Return to Index


The line numbers come up in the errors, that's why

by Clippy (Login burger2227)
R

You can also use GOSUBs like you did in my program.

Posted on Nov 26, 2014, 2:13 PM

Respond to this message   

Return to Index


*How come the author's name is no longer listed in some posts?

by Solitaire (no login)

Posted on Nov 23, 2014, 9:02 AM

Respond to this message   

Return to Index


That's not a bug, it's a feature

by Not Bill Gates (no login)

It only happens when people do it on purpose.

It's one of the various stupid forum tricks that have become a tradition here (with years of history.)

It rarely causes significant confusion among forum regulars, but naturally it is capable of doing so. At the point that it does, it's at least wise for people to ease up on it.

I'm not the only person that does it sometimes, but it has become just a little too much, hence the "wise for people to ease up on it" bit. I already have, so that should do it.

Posted on Nov 23, 2014, 9:25 AM

Respond to this message   

Return to Index


working on a few new projects. in the meantime, why can't CHAIN do...

by mn (no login)

SKIP TO "CHAIN" ...i have tried to take a break from this place, which i must really be "enjoying" (that's a trickier concept than people give it credit for) because [the obvious.]

throughout a few attempts i've made a variety of tools to look over all my files, but always in basic. now i'm doing one in python. if i did it in basic, i'd have to expect the project i'm spending all this time on would have to change or workaround whatever basic fads are going on. i wish basic was a stable, fun platform to work on anymore. the last time it was, i was happy using it in dosbox.

i've also started another book. i've writen 90% of a book on one subject, but it's got a little bit to go, the only one i ever finished was the one on qbasic (spend many months on that, and a few enjoyable days on the fairly useless version i made for qb64. fairly useless because i did it for the project qb64 used to be... but hey, who cares about what it used to be?) and most of the others i've started are half done or less.


CHAIN:
why can't CHAIN be simple? i'm not talking about ditching compatibility (is it compatible with anything? it seems a little meaningless in a compiler, but i seem to recall galleon (if not the fb devs) doing some lovely work on a limited "do the best possible" implementation of it. no gnu/linux support, right?

by "simple" i mean "does one thing, does the expected thing, does the thing consistently regardless of platform."

by my own "laws," CHAIN should be as close to the original as possible. but i wouldn't use CHAIN unless it did the simplest thing... which it should be able to do on some platforms.

i can shell to another program, i can shell to another program and exit, or i can shell to a compiler to run uncompiled programs, run the output, and then exit.

i can do those cross platform if i want, and it would probably be more reliable than CHAIN.

and i'm happy to do so. CHAIN may implement some or all of these, in a very simple way, but i thought i read it's not cross platform (yet.)

if something that simple isn't cross platform, i can only imagine that a gl version is slowing it down. just a guess.


by the way, if you can't stop writing about something, write more. while i often waste this on the forum, i've been looking at alternatives and amusing myself with those. but i'm sure i'll post some or all of it here, too.

Posted on Nov 23, 2014, 2:09 AM

Respond to this message   

Return to Index


bah, i do remember a couple things

by mn (no login)

chain can pass some/all variables, right?

and (according to something i read) current screen mode (once upon a time?)

ok, so that sort of answers my question. passing variables... i'd be fascinated to know how that's done on ANY platform. but don't go to the trouble of explaining it unless it just sounds like the best time ever.

withdrawing question, but feel free to answer it however.

Posted on Nov 23, 2014, 2:14 AM

Respond to this message   

Return to Index


Luke sure has some crazy ASCII ideas...

by Pete (Login The-Universe)
Admin

Like one I was reading in his response to menn, about just printing a duplicate of everything printed to screen 12 on an inactive SCREEN 0 page. That would be a neat trick, since changing screens is problematic. It would erase everything on SCREEN 12 each time you pulled that screen switch. You could use those memblocks to restore it, but it doesn't sound as easy as what I would do for this BUG in QB64...

DIM SHARED matrix$(25)
COMMON SHARED fcoloxr, bcoloxr
FOR i = 1 TO 25
matrix$(i) = STRING$(512, 0)
NEXT
pcoloxr = 0: fcoloxr = 7: bcoloxr = 0
CLS
LOCATE 1, 17
txt$ = "Pete"
p = pri(txt$)
LOCATE 6, 56
fcoloxr = 14
txt$ = "Re-Pete"
p = pri(txt$)
LOCATE 25, 30
fcoloxr = 15: bcoloxr = 4
txt$ = "3-Pete!"
p = pri(txt$)
SLEEP
COLOR fcoloxr, pcoloxr
CLS
SLEEP 1
FOR i = 1 TO 25
LOCATE i, 1
FOR j = 1 TO 80
k = ASC(MID$(matrix$(i), j + 256, 1))
IF k <> 0 THEN
COLOR INT(k / 16), k MOD 16
ELSE
COLOR 7, 0
END IF
PRINT MID$(matrix$(i), j, 1);
NEXT j
IF i = 25 THEN EXIT FOR
LOCATE CSRLIN + 1, 1
NEXT i
SLEEP
COLOR fcoloxr, pcoloxr
CLS
END

FUNCTION pri (txt$)
MID$(matrix$(CSRLIN), POS(1), LEN(txt$)) = txt$
MID$(matrix$(CSRLIN), POS(1) + 256, LEN(txt$)) = STRING$(LEN(txt$), CHR$(fcoloxr * 16 + bcoloxr))
COLOR fcoloxr, bcoloxr
PRINT txt$;
END FUNCTION

--------------------------------------
With the above routine, you don't need the SCREEN() function to read a character, or the color. The matrix$() array holds it for you.

I only bother, because I will need what I just created for my Android routines, as Android-BASIC reads only characters from the screen, not the color attributes. So it solves the Android color problem, and QB64's lack of character,,, in SCREEN 12 with any text character background color other than black.

Now Luke, if you have a way to do what I did by switching screens, it may be a QB64 feature over what QBasic could do, and you are welcome to post it as a comparison to my example.

Pete

Posted on Nov 23, 2014, 12:28 AM

Respond to this message   

Return to Index


Re: Luke sure has some crazy ASCII ideas...

by (no login)

It's not hard to do. Try this as a quick test code:

DIM SHARED ns AS LONG
ns = _NEWIMAGE(80, 40, 0)
SCREEN 12

LINE (100, 100)-(200, 200), 4, BF 'To show we're in a graphic mode
DualColor 12, 15 'To change the color
DualPrint 10, 15, "Pete" 'To print at our location
FOR i = 15 TO 18
PRINT CHR$(ReturnScreenChar(10, i))
NEXT


SUB DualPrint (x, y, text$)
d = _DEST
_DEST 0
LOCATE x, y: PRINT text$
_DEST ns
LOCATE x, y
PRINT text$
_DEST d
END SUB

SUB DualColor (fg, bg)
d = _DEST
_DEST 0
COLOR fg, bg
_DEST ns
COLOR fg, bg
_DEST d
END SUB

FUNCTION ReturnScreenChar (x, y)
s = _SOURCE
_SOURCE ns
ReturnScreenChar = SCREEN(x, y)
_SOURCE 0
END FUNCTION

Posted on Nov 23, 2014, 1:21 AM

Respond to this message   

Return to Index


and if it's not hard to do, why not just do it already?

by (no login)

we can toss the ball back and forth and say "you do it! no YOU do it!" "why should i do it?" "what are you talking about? i did do it!" and this is the pattern for an ego-driven project that wants to blame users for wanting things to work, and not give them any credit when an honest critique turns out to be right/useful/made use of.

it's a common problem which has very little to do with tone.

-> it behooves a project to maintain a more, not less civil tone than its critics, although no one can make them.

-> "circling the wagons" looks less like pioneering these days, and more like cult mentality

-> if i use a poor tone, and someone else uses a poor tone in response, aren't we "even?" why is it that integrity becomes irrelevant and no one has to admit i was right?

-> i don't care much if people don't want to admit i was right. what irks me far more is that the original critique/report/feedback i'm siding with, which was reasonable, technical and polite, is dismissed just as much as i am dismissed (which really limits the liklihood that it was really about my tone in the first place, but about some developer's ego.)

and yet, if this were just about the tone of my critique, i'd be much happier being taken to task for that, instead of the farcical and passionate insistence that i never knew what i was talking about in the first place.

if that's true, why did anything get fixed? if i was wrong, there wasn't anything TO fix.

but hey, what- ever. people think their smart, and they're right. but i care more about whether they're honest, especially since they're going to smear me.

if all of steve's mistakes were honest, i would forgive them all when he followed through.

that's not how it goes with groupthink. critics are enemies and dispatched accordingly.

acgh! ooh, ya got me, pardner...

but i'm used to this phenomenon. it existed in freebasic, it exists in systemd and ubuntu, microsoft did it way before these open source guys, and it's basically "NIH" but for bugs instead of features.

it's more of the same old amateur hour, but i like amatuers when they don't get too full of themselves. i still can't understand how galleon fits into that, unless it's apathy and some loyalty to fellow devs.

as for mixing up wagon circlers with leaders, i'm sorry about that. it's just a chicken and egg thing. so if i'm suddenly talking about someone else and don't mention it, that's why.

as i was saying, if it's so easy for a user to fix a non-working feature, why not just freaking fix it and stop pouring heart and soul into lame excuses? i really do understand the volunteer thing. i also understand that good projects have design.

when you offer your user extraneous specialized nonsense they don't need, but subtract the basics because they can "fix it themselves," you've put the back of the design in the front.

just fix the useful features that are easy to fix (and in fact, already implemented in a similar mode) and next time you're going to "do the user's work for them" with some stupid, pointless function, "do the dev's work for them" and throw that "so easy a user could code it" functionality that FIXES THE BROKEN COMMAND.

it's simply astonishing that any developer (amateur or otherwise) cannot be appealed to with such simple, solid logic. but that's the power of ego to limit the senses.

:P :P :P :P

hey, at least you're in good company: gnome, red hat, microsoft, even kde and debian these days. :(

i'm in good company too, but when i come HERE the only fellow voice of reason on this matter is pete. (thebob doesn't say anything, but if he did i imagine it would be sensible.)

oh well, never send a developer to do a proctologist's job.

Posted on Nov 23, 2014, 1:43 AM

Respond to this message   

Return to Index


*their/they're. at least i realize it's a typo, i'm not pretending it's "by design."

by (no login)

Posted on Nov 23, 2014, 1:46 AM

Respond to this message   

Return to Index


Re: and if it's not hard to do, why not just do it already?

by (no login)

"and if it's not hard to do, why not just do it already?"

WHY?

As you can see with the demo, if someone needs such a feature it's simple enough to implement for themselves.

The thing is, this is something that no one has needed for the last 10 years of QB64 history, and no one has ever used. It's unnecessary for 99.99987% of all users.

And yet, because one user seems to want this capability; and they don't want to make use of an alternative system that's been demonstrated to them; they expect things to change so that those other 99.99987% of the users of the project are required to create programs which use more memory and have higher end-use requirements.

Basically you can go Pete's route, which requires an array to hold the information you send to the screen; or you can use a separate screen to store that information; but either way you're going to have a higher memory requirement than just using a basic SCREEN 12 screen.

There's also a simple 3rd method of doing what you're wanting: use the hardware images for the graphical portion of your program and only work in SCREEN 0.

The truth is simple:

1) This is a fringe case BUG, if you want to call it that, that affects almost nobody and no code. It took years and years before someone finally noticed it didn't work and reported it.

2) An user can work around this easily enough if they need to, as they can code a solution which works in the limited scope of their own specific program. (I'm ONLY going to print at LOCATION coordinates, with the default _FONT 16, and never going to use the transparent text options with _PRINTMODE -- the solution to this specific instance to the problem is as simple as the examples posted earlier in this thread.)

3) To correct the issue for QB64 would require other more serious issues be ignored which affect the user base as a whole. Also, any sort of real correction which would work with variable fonts, font sizes, background modes, and transparent text would require MASSIVE amounts of coding to be done. To fix this so that it'd work with all the options QB64 has would take a lot of time and effort to do properly, and would increase the size and memory requires of QB64 and EVERY program written with QB64; whether they use SCREEN or not.

So, keeping those simple truths in mind, I don't think anyone is going to bother to work on fixing this bug anytime soon.

And another truth:

The project is open source. If you're so passionate about this one bug, feel free to take the time to code the solution yourself. I'm certain the QB64 developers would be grateful for your assassistance.

But of course, that means you'd be doing something constructive and you don't want to do that. All you're interested in is bitching and moaning about how anything being developed by anyone, anywhere, who isn't YOU, is doing it wrong...

YAWN!

Same ole, same ole. We've heard it all before. The devs won't fix this. The program is broke. You'll never use it now...

But wait!!

Didn't you never use it before? And haven't you stopped using it a long time ago?

All you want is to bitch and whine and moan and cry and try to insult people who aren't even here anymore.

YAWN!!

In the words of the great Clippy: WGAS!! and GFYS!!

Posted on Nov 23, 2014, 2:42 AM

Respond to this message   

Return to Index


well, WGAS and GFYS are why i stopped using it in the first place

by mn (no login)

so much cooler than "I GAS" or "WeGAS" or my favorite:

"we implemented a fix for screen 0 but instead of using it to fix a bug in screen 12, we'll just tell people to GF themselves and pretend they're the ONLY PERSON THAT CARED ABOUT IT."

WRONG!

i have yet to bring up one single complaint about qb64 that wasn't brought up by someone else still using it or interested. so remember, you're (however inadvertantly) telling them to "GF" themselves too.

too bad NGAS.. or is it NGAS64? GF**Y**S luke. you're a worthless POS and when you get a clue, you can have all the credit to yourself just like every other idiot that taints your compiler.

way to go, galleon. you made something that is better than freebasic in every way

it even has bigger losers "promoting" it.

so far from what it promised. so redundant, i might as well use freebasic again. (and however rarely, indeed i do.)

enjoy your art project.

Posted on Nov 23, 2014, 2:58 AM

Respond to this message   

Return to Index


Re: well, WGAS and GFYS are why i stopped using it in the first place

by Not Luke! (no login)

"we implemented a fix for screen 0 but instead of using it to fix a bug in screen 12, we'll just tell people to GF themselves and pretend they're the ONLY PERSON THAT CARED ABOUT IT."


First, let's clarify some things here:

1) QB45 ONLY allows a black backgound and 16 colors in SCREEN 12.

2) QB64's SCREEN command works in SCREEN 12 with a black background, thus it's 100% QB45 compatible.

3) QB64 *EXPANDS* upon the limitations of QB45 and allows users to set a background color that wasn't possible in the past.

4) This expanded ability has NOT been expanded into use with the SCREEN function.

So, to sum this up:

It's NOT a bug. It works perfectly fine if you use the same black background QBASIC and QB45 used in the past. It's only by using those NEW, expanded features unique to QB64 that one can run into this issue.

You're not wanting a bug fixed.

You're wanting to expand the features of QB64. Install a "shiny new feature" that didn't exist in the past...

And yet you don't like anything shiny or new!!

MAKE UP YOUR MIND!!

What you're looking for isn't a bug fix; it's a feature request. And with the way you act when you ask for one, I can completely understand why your request just gets sent straight to the crapper. It's basically the same place you belong.

Posted on Nov 23, 2014, 3:12 AM

Respond to this message   

Return to Index


how anyone takes you seriously is a freaking miracle

by mn (no login)

you're like tommy from the who song. except they don't say "that deaf dumb and f***ing impossibly stupid old farmer."

forget about how i talk to you, just see how long it takes you to learn from any of your users. then you can really go "flush" yourself, now that you've wiped with galleon's compiler. have a nice one.

Posted on Nov 23, 2014, 3:15 AM

Respond to this message   

Return to Index


A reminder

by Luke (Login flukiluke)
R

Rob wrote the SCREEN() function, and nooone's touched it since. I suggest you go yell at him.

Also, implementing your feature set would break QB compatibility, and we can't have that now, can we?

Posted on Nov 23, 2014, 3:55 AM

Respond to this message   

Return to Index


don't play dumb

by mn (no login)

steve says i'm requestiong a feature, not a bugfix. wrong.

a qb64 feature broke a standard qb function. the fix is easy. i'm recommending a bugfix.

just don't try it in qb64.

by the way, i implemented this very fix seven years ago when using fb in gnu/linux. fb i believe works in screen 12, but not 0 (two of a kind, you guys.) fix took 15 minutes. and it's not for me, it's for your users. but go ahead and crap on them, and call it qb64. steve is impossible, galleon is as good as retired, and you're almost as difficult to reach as they are. which is too bad because you're smarter than them when you want to be.

but thanks for the reminder, even if it's wrong. at least you can't be as wrong as steve.

Posted on Nov 23, 2014, 8:06 AM

Respond to this message   

Return to Index


Re: don't play dumb

by (no login)

"a qb64 feature broke a standard qb function. the fix is easy. i'm recommending a bugfix."

REALLY??


HOW??


SCREEN works 100% like it used to with QB. Exactly what broke??

The fix is SUPER EASY: In SCREEN 12, only use the black background that is allowable in QB.


It's only when you're trying to do something INCOMPATIBLE with QB that you have issues. Background colors in SCREEN 12 *IS NOT* something QB supports, therefore it CANNOT be a bug for not supporting them in the old commands.

Now, if you're going to use the new extended features of QB64, you CAN set background colors -- but the SCREEN command won't work with them. At least not anymore than it'd work in QB; it's COMPATIBLE that way.....

And we all know that you want things to stay compatible, and not to add any "new shiny features"....

Using SCREEN function with a colored background would indeed be a "new shiny feature". If you don't believe it, try to use it in QB...

And I think you've ranted enough about there not needing to be any "new shiny features" added anymore......




IF there's a BUG here as everyone likes to call it, it's in the fact that SCREEN 12 allows background colors at all. That really should end, for compatibilities sake after all....

Posted on Nov 23, 2014, 8:54 AM

Respond to this message   

Return to Index


have it your way...

by mn (no login)

> SCREEN works 100% like it used to with QB. Exactly what broke??

not the impression i was under. if indeed screen works 100% like it used to, and i'm only asking for it to still work when the background color has changed, (which i was not aware of,) then we have our wires crossed.

fantastic. it has nothing to do with what i was asking for, but you're saying what i'm talking about is not broken anyway. that's possible, but with your listening skills i'm wary of trusting your interpretation of anything anyone says. still, let's pretend you're right. in which case, problem solved! woo!

> And I think you've ranted enough about there not needing to be any "new shiny features" added anymore

no, i honestly don't care if you add background colors to screen 12 qb64. it would be ideal if they didn't break screen, but that would be beyond the usual scope of screen. let's be clear about this: i don't actually expect you to expand screen to fit your new screen 12. it would be ideal (since it must work in screen 0 already) and i don't think it would be an unreasonable request from a user, but i wouldn't demand it.

i wouldn't demand it, but please don't think i will complain if you do at some point expand screen function to work with new "expanded" screen 12.

that's not feature hysteria, it's just consistency. i wouldn't ask you to make the language consistent, either. it would be nearly impossible (for anyone) not to break it in the process. but i don't think such a "feature request" would need to break anything.

if screen actually does everything it does in qb with qb features, no, i'm not asking you to go beyond that. (certainly not intentionally.)

Posted on Nov 23, 2014, 9:12 AM

Respond to this message   

Return to Index


Good luck stuffing the genie back in the bottle.

by Pete (Login The-Universe)
Admin

Rob made the background color for text available in SCREEN 12. That's a new feature, so quit whining about it and deal with it, but oh wait, you can't, because you don't know what the hell you are doing most of the time. I liked the project when someone (Rob) actually knew how to do the things he was actively working on. Now we are stuck with Metatron and his spinning stories. No thanks.

There is no breaking QB compatibility, because this is essentially a new feature Rob added. You couldn't set background or text in QB in graphic screens, but you can in QB64. Anyway, you wanted a SCREEN 0 with graphics, well, guess what meat-head-tron, that is exactly what using the SCREEN() function with background colors would be all about. I really like what mennonite stated, let's pay you NOT to work on QB64. We can call it a forum subsidIDE.

Pete

Posted on Nov 23, 2014, 5:27 PM

Respond to this message   

Return to Index


it's worth $100 a year to me, there are 3 problems that make it an unlikely transaction

by mn (no login)

1. i doubt $100 a year would really entice steve to stop.

2. getting the money to steve would be an issue that's easy to resolve with someone i trust, but not someone who could easily pocket $100 and make me look like a fraud (no, i don't think steve is dishonest enough to steal. but someone who's sense of humor relies almost entirely on twisting around what other people say doesn't make me feel great about giving him the opportunity to call me a liar and "lose" the money.

"easily" resolved by sending pete cash and having him cut steve a check. but whatever, see 1.

3. i can totally see it being worth $150 a year (because they might donate that anyway) just to trump my "donation." that, as much as #1 makes the whole thing moot.


why is it worth $100? people pay more than that to treat headaches. to be honest, i doubt steve would pay me that to stop posting, and i wouldn't take that either. but it's on galleon to keep someone on who it's even worth $100 (a year) for me to have him stop.

i wouldn't have paid that to stop fb, but then fb had never reached the state qb64 had.

i've had to deal with pete (sorry, "other" pete) and v1c and the entire fb community in the past. for whatever reason, this just seems worse. again, maybe that's because qb64 has had more to lose. but that's not what i think it is.

Posted on Nov 23, 2014, 6:51 PM

Respond to this message   

Return to Index


Deal

by SMcNeill (no login)

Put your money where your mouth is.

For $100, I won't make any changes or push anything into the repo for the next 12 months.

To keep it honest:

Write me a check for $100. Sign it to Steve McNeill
Mail to: 230 McNeil Hill Rd NE, Pilot VA, 24138

Take a photo of the check, and that'll prove you wrote it.

I'll then post a photo of it when I get it.

Then when the bank cashes it, you can take a photo of the returned check as proof to the world that you completed your end of the deal. If there's a single change pushed by me over the course of the next 12 months, I'll return your money AND $1,000 extra for a breach of contract fee.

You can use the post here as the contract we'd both abide by, and the signature upon the check, and pictures from both parties, will count as us signing and agreeing to the terms above.

Put your money where your mouth is.

I'll leave the project alone for a measly $10 per month, or $100 per year. You like to talk a good game, now follow through with it.

Posted on Nov 23, 2014, 7:20 PM

Respond to this message   

Return to Index


$10 per month is perfect. plus the "last 10" you can have free

by mn (no login)

it will be cash. i've never had problems sending it before, so unless they're unusually dishonest at the federal p.o. your way, it will show up.

-> for 10 a month, there's no risk:

-> you get it, you honor it.

-> you break agreement, payment ends.

-> p.o. screws up, no hard feelings, you go back to development because at that point it's too much trouble for either of us to bother really.

i could care less about what happens to the "last 10." it's not like i'm going to track the days. i also don't care how you track the days: if it takes an extra week to get there and you get bored and start pushing to the repo, you're welcome to terminate at anytime.

i'm not looking for refunds on anything, so technically you could just pocket $10 and have me for a sucker.

i'm surprised you're accepting, and i'd throw 10 out just to see what happens. but now that you have, i'll put my money down.

*

perhaps after a year break (assuming that's actually how it works out,) i can pay you 5 a month just to find a more thoughtful response to people's feedback than the usual knee jerk "i don't think that's a bug."

that's getting ahead of things, but you wouldn't have to actually DO anything, other than learn how to listen to users. (being only 5, you could still pretend pete and i never have a point. i'm not a cheapskate and i wouldn't pay you just to be honest.)

*

so let's see how this 10 to NOT develop goes. if your community hates it so much that they outbid me or you just feel a need to reneg, it saves me money, so no biggie, no fuss. but i intend to keep my side of the bargain.

for me, $10/mo is a better deal than $100/yr. if it ends as anything but a joke, of course.

Posted on Nov 23, 2014, 7:52 PM

Respond to this message   

Return to Index


update: have the actual bill...

by mn (no login)

it's a busy week of course, and there's more to do the first month than the others, but i got change from a $20 and now it's almost ready to go.

still need some stationary supplies, have to print labels (sort of,) and it should be in the mail this week. feel free to push all the code into repos until you receive the first installment.

next update should be that it's actually mailed. when you get it, a "receipt" in the form of a forum post will suffice. this is more like a "gentleman's bet" than anything else imo, regardless of the fact that it's you and me. but it will get mailed shortly.

Posted on Nov 24, 2014, 6:43 PM

Respond to this message   

Return to Index


What's the difference between a hooker and a QB60-whore?

by , D Central (Login The-Universe)
Admin

Apparently, a QB60-whore gets paid to not put out.

This episode of QB or not QB will go down in history as one of funniest of all times.

Oops, I meant deal or no deal, of course.

Pete

Posted on Nov 23, 2014, 8:12 PM

Respond to this message   

Return to Index


Re: What's the difference between a hooker and a QB60-whore?

by AlGoreIthm (no login)

$80 an hour ???? I give up !!!!!!!!!!!!

Posted on Nov 23, 2014, 9:06 PM

Respond to this message   

Return to Index


I'm honoured...

by Luke (Login flukiluke)
R

...that you should think that it's me. Unfortunately, I've not written any essays recently. However, since I've got this soapbox, here's a program for you to ponder over:

SCREEN 12
PRINT "Hello"
LINE (0, 10)-(50,50), 10, BF
PRINT SCREEN(1, 1)

As for fixing the bug in QB64, the fix is in fact quite simple - change the currently-returned 219 to 32. QB compatibility: check.

Posted on Nov 23, 2014, 2:41 AM

Respond to this message   

Return to Index


guess i owe you an apology of sorts

by mn (no login)

so here's a sort of apology.

i was sure that was you, and unfortunately, it led me to believe that the a-holish rant that followed up was you also.

i don't think we're pals or anything, but you normally treat people with at least a little more thinking things through than the other qb64r's. i was surprised when i got "your" most recent reply.

then i saw this one.

that must have been steve. so me telling you to GFY was a mistake. i intended to address whoever wrote it.

doesn't it make sense to fold such bugfixes into the compiler, rather than expect the user to constantly code around them?

of course i'm not talking about steve64, just as a general rule of sane design.

Posted on Nov 23, 2014, 3:03 AM

Respond to this message   

Return to Index


Hey Luke and Metatron

by Sam and Dean Winchester (Login The-Universe)
Admin

For any fans of Supernatural...

So Steve has the crazy ASCII ideas then? Crazy-ASCII Steve!

Well, for the SCREEN 12 issue, QBasic didn't allow background colors, but QB6 does, so, it should support all of them, not just the default off the screen color. It's an unfinished feature as is.

I'm experimenting with text and graphics for more timely BASIC languages, that run on Android. Some of those already mix text and graphics. For the features they lack in comparison to QB, I make my own functions as a work-around. So although it is interesting to see the _DEST and all the other underscore keywords in the example of mixing SCREENs that was posted, those statements won't fly in Android. If it works, I won't need it in QB, so I haven't tested it yet, it is nice to have another work-around posted for anyone else who encounters this problem in the next decade to find.

Oh, and you guys should realize, I encountered this inconsistency after only experimenting with text/graphic in QB64 for about a week. In contrast to QB64.net, One of the things I loved about these forums was when people came with a problem, the coders here put a lot of effort into finding some pretty creative solutions that would work in QB, instead of just telling the poster to GFSOL - go find some other language. In comparison, if this was a development project forum, that would mean we would be putting effort into making the project do the task, not telling the poster to go code around it.

As for the last code snippet, you have to print text to the screen after a graphics is drawn, or the previous text gets lost somewhere in the mix, as far as the ability to read it with the SCREEN function is concerned. That was true with QB, also.

Pete



Posted on Nov 23, 2014, 10:03 AM

Respond to this message   

Return to Index


Hmmm GFSOL means what? LMAO!

by Clippy (Login burger2227)
R

Very creative happy.gif

Posted on Nov 23, 2014, 10:16 AM

Respond to this message   

Return to Index


QB64 and "Shiny object syndrome"

by (no login)

Shiny object syndrome isn't "new features," it isn't "Cool new features," it's more like feature hysteria. Features are like cells, in that new ones are generally expected as part of life, but if they start to reproduce abnoramally, they can lead to death. Getting so into features that nothing else seems to matter is the first sign of death of an Open Source project, and examples abound.

Consider this 2010 article: "Microsoft: Stop the shiny object syndrome":

This is how Microsoft markets its products daily ranging from websites, applications through to random programs that are meant to simplify your world into a few bullet points or less.

The reality is this, it gets to a point where you simply just roll your eyes at every new announcement and essentially approach it with an element of contempt or cynicism. To be fair, you’re suffering from the old “fool me once, shame on you; fool me twice shame on me” effect.

http://www.riagenic.com/archives/358

With Microsoft, it's as much about features that are vaporware, but Microsoft can drop products anytime if they're half-implemented. Like Microsoft, QB64 half-implements features and moves on, dismissing any shortcomings as a reasonable aspect of the intended design.

In this sense, QB64 isn't vaporware because parts of it work. It is vaporware because the features often don't work completely, and instead of fixing them, they are ignored or "fixed" in the same half-assed way they were implemented in the first place.

Quality control is broken, developer attitudes suck, and excuses are a bigger part of the product than bugfixes or even features.

Why bother developing if all you get is flack? Also, why bother being part of "quality control" (outside the world of open source, people get paid for doing QC; any donations going to reporters of bugfixes?) if you only get dismissed for half-thought-out reasons?

QB64 for example, has a broken POINT statement. Since that worked in QB, it makes more sense to replace it with a half-implemented version. QB64's screen 0 has the same limitation as Screen 12: it's really graphical, so you have to track the color and character information. Problem solved!

But instead of adding that already-implemented working to Screen 12 to unbreak a half-implemented feature, someone makes a thoughtless excuse saying screen 12 can't because it would need to track... well, exactly what screen 0 tracks.

Thoughtless. Sucky. Attitudes.

What's next for QB64? Lots more shiny. Lots less thoughtful design. Lots more features, but fewer and fewer and fewer implemented in anything but a half-assed way.

Quality Below 64? Once 64+64, now more like QB-64. Either way, it gets an F for forgetting its design goals. Or perhaps a half-assed fad was the idea all along. With so much history being rewritten to justify laziness, who will ever know what the point of QB64 was?

Only those who remember the earlier versions.

The problem is that the new excuses aren't just lazy and unnecessary, they're also dishonest. They insult the intelligence of anyone who actually knows what QB is supposed to do, and the intelligence of anyone who remembers QB64's goals. They ask you to forget all about that, which is a disappointment to any but those who weren't paying attention in the first place; and worse, they ask you to pretend you don't know what you were told originally.

So lie against your own knowledge and disappointment, and look forward to more shiny. With the current dev attitudes, all the new shiny will be broken soon, but that's ok! For every old not-so-shiny they break, you get two BRAND NEW shinies that won't work either.

In other words, QB64 should be good enough for anyone. All you have to do is pretend it works like it's supposed to: Steve will show us how that's done!

Please don't accuse anyone of being cheap because QB64 is "free," so is FreeBASIC. There are people who would pay Steve just to *stop* development. Then he could get paid for not farming *and* not coding! (Hey, how cushy is that?)

Posted on Nov 22, 2014, 4:40 PM

Respond to this message   

Return to Index


* What's wrong with the POINT function?

by Luke (Login flukiluke)
R

Posted on Nov 22, 2014, 6:27 PM

Respond to this message   

Return to Index


Typo, SCREEN function. Or statement. Whichever returns character information. *

by (no login)

Posted on Nov 22, 2014, 6:56 PM

Respond to this message   

Return to Index


Re: QB64 and "Shiny object syndrome"

by (no login)

"QB64 for example, has a broken POINT statement. Since that worked in QB, it makes more sense to replace it with a half-implemented version. QB64's screen 0 has the same limitation as Screen 12: it's really graphical, so you have to track the color and character information. Problem solved!"

And this shows why no one can bother to take you seriously. SCREEN 0 is fundamentally different than SCREEN 12. Just get a _MEMIMAGE of them sometime and compare. SCREEN 0 stores each character on the screen in 2 bytes -- ASCII code and color code. SCREEN 12 stores information in a single byte; but for each PIXEL not each CHARACTER.

Here's 2 very simple solutions to your problem:

1) Write information to 2 screens. Make SCREEN 12 the visible screen, print to it, but also print to a hidden SCREEN 0 screen. Get your character information from there.

2) Write your own custom font reading routine. Make an array, draw the font you have loaded in memory, and scan it in using POINT. Then scan each LOCATION at X/Y position for _FONTWIDTH x _FONTHEIGHT dimensions and find the closest match and return those values.

*YOU* don't seem to like the way the developers are going with QB64, just because they aren't rushing to do things for you. One works in an efficient string compare routine and you deride it as not being needed. A TRUE programmer does that on their own.... And yet, a feature that is such low priority that that it's only taken what? 10 years? for someone to notice it's not 100% compatible suddenly needs to jump to the top of the development list!

Don't be absurb!

Show us how a *TRUE* programmer works around a limitation. QB64 has never full compatibility with QB45. No one expects every PEEK or POKE address to be emulated. DEFN has never been added. CALL ABSOLUTE doesn't work. CHAIN isn't 100% compatible. It can't load or save BAS tokenized files. It doesn't work with .MAK modules properly...

The list goes on and on for what it can't do.

And yet, these are all "fringe" cases of the core of the language, and each feature is rarely used. Every so often someone pops up on the forums with a question about "Why doesn't this work with DEFN?" Or "What's wrong with this PEEK/POKE?" Or "How do I get my MAK file to load?"

And all these folks are answered with: It's not implemented...

And instead of complaining the language is broken vapor ware, they simply find a way to work around the limitations. Seems like they might be *TRUE* programmers and you should take a page from their book.

Or else you can simply join the development team and add in the fringe features you think it's missing yourself. The language *IS* open source after all.

Either way seems like it'd be more productive for you than just whining over whatever the developers are currently working on. (What "new shiny" are they working on now?) Steve has went on break until the New Year. Galleon is as quiet as ever. I really don't know of ANY development going on over at the project currently.

And just out of curiosity, how much are you going to pay Steve not to code? Seems like you owe him some back pay as he hasn't coded or pushed a change into the repo for quite a while now.

Funny though: Steve has been the one fixing QB compatibility with things here lately, and yet you don't want him coding in the project. He completely redid the string compare routines so they'd behave more as BASIC expects and less like C, but yet you don't want him to change anything...

"Hey, somebody should fix this, but that guy fixes things? We don't want that guy to do anything! We'll pay him not to!" Anyone else see the irony in this??

Posted on Nov 22, 2014, 9:18 PM

Respond to this message   

Return to Index


Backpedaling is great, being honest in the first place is better

by (no login)

"Funny though: Steve has been the one fixing QB compatibility with things here lately"

"He completely redid the string compare routines so they'd behave more as BASIC"

The posturing is where the misunderstanding comes in, if there is a misunderstanding.

What posturing? Saying "I don't think this is really a bug" to every single bug, as if it's unreasonable to point out compatibility in the first place.

Talking about how it's all about the future, not about old things (like all the programs QB64 was created specifically to support.) This is a change of tone for the project, and a change of direction. But a change back to compatibility first (or even in a reasonable period of time) is welcome.

Pretending that anyone who cares about compatibility has some kind of problem. If that's the case, it must be spreading, since these things are allegedly being fixed. Great to see that old and unnecessary arguments are being won, but they didn't have to be arguments in the first place. Only Steve's arrogance makes everything like that uphill.

Galleon has changed with the project, acting bitter, dismissive, and unlike himself.

It's all about people being unable to admit mistakes, and putting them on the user. Sure, the user doesn't have to burden themselves with the project, and that appears to be the common response: apathy. But to make it about anyone's attitude other than Steve's is just one more instance (there's the OOP in QB64, a Sarcasm Generator named .STEVE) of putting the dev's shortcomings on the user.

Shall we treat bugs like bugs, and bug reports (with accurate details collected over years of experience) as valable? Or shall we respond with apathy and derision and sarcasm, attacks on the community, and nonsense about the "future" direction (which doesn't exist.) It's exactly that attitude out of FreeBASIC that required QB64 to be created in the first place, but half a decade later, they've finally fixed a lot of things without any acknowledgement that anyone outside the herd mentality had a point.

That kind of dishonesty is the one bug that won't ever get fixed. But deny that there are any now, and fix them later, and sidestep the fact that the swath of the community that wanted compatibility (even more of it) probably wanted it because it made the language better, not because they're old curmudgeons stubbornly holding onto the past.

Half a decade later, the past may find its way to QB64 the way it eventually found its way to FreeBASIC. But by then, someone will have created a third version that keeps SDL, the QB64 project will be all but forgotten, and DarthWho will be talking about the things QB64 got wrong. It will be a decade before DarthWho has moved on, and left it in the hands of some other person who makes every incompatibility report uphill, before taking all the credit for fixing it when he couldn't even admit it was a bug in the first place.

At least if the pattern continues like this, that's what will happen. No idea why Steve can't just admit that "critics" (people who complain when goals are abandoned and credit isn't shared with people that helped make him useful*) are as important to the project as the decisions that really need to be criticised.

* Not me, rather the people who reported the incompatibilities in the first place. Although it would save him an awful lot of time if he bothered listening to anyone on this side, rather than trying to rediscover compatibility all by himself, after it was explained over here.

The best part is, Steve gets to split the community in two, and give the non-sycophants all the blame for it. Exactly what happened with FreeBASIC. But you keep lapping it up. To each his own, after all. Bon Appetit.

Posted on Nov 22, 2014, 9:47 PM

Respond to this message   

Return to Index


How the SCREEN function really works (in QBasic)

by (no login)

From the Peanut Gallery: "To be honest, I'm surprised this just doesn't toss an error code for graphical modes."

Once upon a time, QB64 was about compatibility, so here's what real QB does (fire up your DOS machine and see for yourself.)

Screen returns codes for color and character. The are separated into high and low nibbles. QB help may include code for getting them apart. (If this is not character information from color, it's FG vs. BG.)

In Screens 12 and 13, SCREEN works reliably, but: not if you pset over a character in a way that changes the visual pattern. Print an "O" in screen 12 and SCREEN will still tell you it's an "O". PSET into the middle of that "O," and SCREEN won't work properly on that character. CIRCLE in a way that crosses the "O", and SCREEN won't work on that character.

Don't be surprised that QB doesn't return an error code! Unlike recent versions of QB64, QBasic was extremely well (carefully, thoughtfully, thoroughly) designed. But however they designed it, it still had a limitation if you drew over a character.

Posted on Nov 22, 2014, 1:05 PM

Respond to this message   

Return to Index


Re: How the SCREEN function really works (in QBasic)

by Peanut Gallery (no login)

The reason it doesn't work in QB64 is from the advanced options QB64 offers.

Does QB45 allow _PRINTMODE _KEEPBACKGROUND? _PRINTMODE _ONLYBACKGOUND? You seem to realize that something PSET in the center of an "O" will skew the character recognition, but you don't seem to accept the way things would interact with these new options.

How about with a non-fixed width font? Or on a screen with different sized fonts? Or different style fonts? None of which was available in QB45, and thus not something the command would ever need to check for.

In QB64 we have multiple fonts built in. _FONT 7, 8, 15, 16. In a graphic mode you can use any, or all, of those at any time. When you use the SCREEN command, which of those fonts does it compare against?

By adding clear foregrounds, clear backgrounds, different font styles, and different font sizes, SCREEN has honestly became a function which honestly should only be used in SCREEN 0. In QB45, your character was a recognizable character unless something printed over it (like the PSET or CIRCLE you describe). In QB64, you can't even guarantee that much.

For instance try something like:

SCREEN 12
FOR X = 1 TO 100
FOR Y = 1 TO 100
PSET (x,y), RND * 40
NEXT
NEXT
_PRINTMODE _ONLYBACKGROUND
LOCATE 2, 2
PRINT "P"
PRINT SCREEN(2, 2)


Now, do you really think your randomly pixelated "P" is going to be reported back to you properly, if a simple PSET inside it will give false results?

Posted on Nov 22, 2014, 2:05 PM

Respond to this message   

Return to Index


Features > Compatibility = ...

by (no login)

Fad language.

Thing is, when you see something you don't recognize, which lots of people do (because they wrote programs that use those features,) you say: "Doesn't seem like a bug to me."

When bug reporting is useless, a project can't be saved by features. When features > compatibility, bug reporting is useless.

The rest is just technobabble. Cold hard facts vs. *Your Opinion.* On the practical side, perhaps write a guide when there's time on what kind of bugs you would actually consider being bugs, since incompatibility isn't a problem anymore, because [ whatever bogus nonsense you said in http://www.network54.com/Forum/648955/post?messageid=1416693954 ]. Enjoy Steve64.

Posted on Nov 22, 2014, 3:47 PM

Respond to this message   

Return to Index


Screen 0 is more about text than color

by Not Bill Gates (no login)

SCREEN 0 is not synonymous with "can do background colors." You can do screen 0 on a monochrome monitor: it's the default screen mode. There were also other screen modes for monochrome monitors, but those allowed graphics. It may be possible, or it may be impossible to do background colors on a monochrome monitor. Technically they had a range of two colors, but some had a "high-intensity" level.

The distinguishing feature of screen 0 is that it can't do graphics, except using ASCII art or characters as "pixels." While someone might feel clever pointing out that computers and software aren't so limited anymore, they're wrong. There are still modes and environments where graphics cannot be added. Those are the modes screen 0 works in. That sometimes screen 0 is emulated (or imitated) in an SDL or GL window is moot.

Talking about "Mixing screen 0 with graphics" to mean "graphics and background colors" is not only confusing because it's impossible on real "screen 0 hardware," but because it's not the only mode that allows background colors. Screen 9 allows graphics at near-screen-12 resolution, and at least one more background color than screen 12 allows, without using the PALETTE command.

Graphics are impossible in real screen 0, which still exists, and it is easier to simulate screen 0's background colors in screen 12 in real QBasic, in real DOS (using the POINT command and PSET) than it is to do graphics on a simulated screen 0 (which can't be done in DOS or real QBasic at all.) The only reason screen 12 can't address more than one background color is memory limitations of VGA. If you find a way around that, it probably isn't "screen 12" anymore, because "screen 12" isn't a software convention or an arbitrary name or number for a list of capabilities: like screen 0, screen 12 is a hardware specification that QB64 cannot ever use in an SDL window, only simulate. Screen 0 isn't a relic of DOS, it isn't a relic at all, your computer can still do it. But when it does do it, there won't be any graphics. If there are, that's "pretend" screen 0. Might as well call it "screen 14."

Posted on Nov 22, 2014, 10:25 AM

Respond to this message   

Return to Index


Except

by Michael Calkins (Login MCalkins)
Moderator

that you can load custom bitmap fonts in SCREEN 0, and could use them for limited graphics.

Screen 0 doesn't correspond to one actual screen mode, but to several hardware VGA modes. For example, width 40 and width 80 are different modes, but which QBASIC combines into "SCREEN 0".

Regards,
Michael

Posted on Nov 28, 2014, 11:42 AM

Respond to this message   

Return to Index


Great stuff! Thanks very much *

by (no login)

Posted on Nov 28, 2014, 11:46 AM

Respond to this message   

Return to Index


I'd love to see a demo.

by Pete (Login The-Universe)
Admin

Smallest possible, just to demo the mechanics, and results. Only if you have the time, of course, and I'm being presumptuous that such a demo would be less than 50 lines of code, which maybe is an underestimation.

Pete

Posted on Nov 28, 2014, 11:57 AM

Respond to this message   

Return to Index


Re: I'd love to see a demo.

by Michael Calkins (Login MCalkins)
Moderator

Changes lowercase "a" to a box. Tested in QBASIC 1.1 in DosBox. Should work on actual VGA in MS-DOS, but I haven't tested it.

Leave the restore line commented to see the "a"s affected in the QBASIC editor.

Public domain, 2014 November.

--------------------------------

DIM i AS INTEGER
TYPE codetype
 loadfont AS STRING * 32
 fontbitmap AS STRING * 16
 restorefont AS STRING * 10
END TYPE
DIM code AS codetype
DIM t AS STRING

t = "0655538cc88ec0b80011bb0010b90100ba6100e800005d83c50acd105b5d07cb"
FOR i = 0 TO 31
 MID$(code.loadfont, i + 1, 1) = CHR$(VAL("&h" + MID$(t, i + i + 1, 2)))
NEXT
t = "53b8041130dbcd105bcb"
FOR i = 0 TO 9
 MID$(code.restorefont, i + 1, 1) = CHR$(VAL("&h" + MID$(t, i + i + 1, 2)))
NEXT
t = "ff8181818181818181818181818181ff"
FOR i = 0 TO 15
 MID$(code.fontbitmap, i + 1, 1) = CHR$(VAL("&h" + MID$(t, i + i + 1, 2)))
NEXT

PRINT "abc"
SLEEP 1

defseg = VARSEG(code)
CALL absolute(VARPTR(code.loadfont))

' comment following line to see effects in qbasic editor:
' SLEEP 1: CALL absolute(VARPTR(code.restorefont))

END

--------------------------------

source code:

--------------------------------

_loadfont:
push es
push bp
push bx
mov ax,cs
mov es,ax
mov ax,0x1100
mov bx,0x1000
mov cx,1                       ; change 1 character
mov dx,0x61                    ; starting at chr 0x61 lowercase 'a'
call _nextline
_nextline:
pop bp
add bp,(_fontbitmap - _nextline)
int 0x10
pop bx
pop bp
pop es
retf

_fontbitmap:
db 0xff,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xff

_restorefont:
push bx
mov ax,0x1104
xor bl,bl
int 0x10
pop bx
retf

--------------------------------

Posted on Nov 28, 2014, 2:51 PM

Respond to this message   

Return to Index


Looks interesting, but I can't run it. Maybe TheBOB or Solitaire?

by Pete (Login The-Universe)
Admin

I will have to wait and get a copy o it to my 98 sometime. I still have QBasic on it. QB6 o course never did support CALL ABSOLUTE. Thanks for posting it, and I will run it when I backup some stu and make a disk for my 98.

Pete

Posted on Nov 28, 2014, 3:12 PM

Respond to this message   

Return to Index


This actually shows one more way that SCREEN 0 is different

by (no login)

Even "graphics," however limited, work differently in SCREEN 0.

But this is pretty cool.

Posted on Nov 28, 2014, 4:03 PM

Respond to this message   

Return to Index


Re: This actually shows one more way that SCREEN 0 is different

by Michael Calkins (Login MCalkins)
Moderator

Thanks.

Yes, it would still be the same principle as ASCII art, but with custom fonts.

VGA allows up to 512 characters, but I believe that means using one of the foreground color bits to select between two 256 character sets.

Regards,
Michael

Posted on Nov 28, 2014, 5:46 PM

Respond to this message   

Return to Index


I tested the concept on MS-DOS 6.22.

by Michael Calkins (Login MCalkins)
Moderator

I typed similar asm code into Debug on my dad's MS-DOS 6.22 computer, as stand alone .com files, and it worked. I didn't test the QBASIC program on it, though.

Regards,
Michael

Posted on Nov 28, 2014, 7:07 PM

Respond to this message   

Return to Index


A bug in QB64 with SCREEN 12?

by Pete (Login The-Universe)
Admin

It might be only the SDL version, so let me know if it works because you are running GL, but...

SCREEN 12
COLOR 15, 0
PRINT "Pete"
x$ = CHR$(SCREEN(1, 1))
COLOR 7, 0
PRINT x$, ASC(x$)
END

OK, that works, however if we change the background color, which 64 supports in graphics, to anything else but zero as in...

SCREEN 12
COLOR 15, 1
PRINT "Pete"
x$ = CHR$(SCREEN(1, 1))
COLOR 7, 0
PRINT x$, ASC(x$)
END

it returns character 219, a block like 255, instead of character 80, the "P" in "Pete" so, a bug, and if so, was it fixed in GL?

- Pete

Posted on Nov 21, 2014, 10:47 AM

Respond to this message   

Return to Index


I have an older GL version, but it appears to be a bug.

by Clippy (Login burger2227)
R

SCREEN 12
COLOR 15, 1
PRINT "Pete"
x$ = CHR$(SCREEN(1, 1, 1))
COLOR 7, 0
PRINT x$, ASC(x$)
END

Returns the CHR$(1) smiley so the color option works

Posted on Nov 21, 2014, 12:07 PM

Respond to this message   

Return to Index


It works in FreeBASIC

by aoeu (no login)

More testing on the standard library might be an advantage of FreeBASIC. On the other hand, historically FreeBASIC has focused on pushing the fb dialect and ignored being BASIC-like, meaning less or no development on increasing compatibility "-lang qb" (or fblite)

Also FreeBASIC graphics programs run on the Linux framebuffer, without X11!

Posted on Nov 21, 2014, 3:41 PM

Respond to this message   

Return to Index


Almost no one here cares about the Linux framebuffer

by (no login)

Too bad, since it really is close to the experience of "BASIC" in "DOS" without Windows. Tough crowd. They say Linux isn't good enough software, then they use something that deliberately spies on them, constantly checks up on whether their hardware setup changes too much (and refueses to run,) can't get security right without piles of Band-Aids on top, and so on... But that's how "good enough" is measured.

Then again, the fb dialect is FreeBASIC's measure of "good enough," so everyone's in good company.

Posted on Nov 21, 2014, 7:48 PM

Respond to this message   

Return to Index


It must be the background color

by Clippy (Login burger2227)
R


SCREEN 12
row = 10: column = 10

COLOR 9: LOCATE row, column: PRINT "Hello"
code% = SCREEN(row, column, 0) ' character code return parameter 0
attrib% = SCREEN(row, column, 1) ' character color return parameter 1
COLOR 14: LOCATE 15, 10: PRINT "ASCII:"; code%, "COLOR:"; attrib%
END

Try using OUT to change the background color instead of COLOR with BG.

Posted on Nov 21, 2014, 6:59 PM

Respond to this message   

Return to Index


Exactly. It is a Henry Ford issue...

by Pete (Login The-Universe)
Admin

It will work with any background color, as long as it's black!

Change your color 9 to color 9, 1 and watch chr$(219) appear. make it color 9, 0 and it works as it should.

Try your OUT thing and see it that works.

Pete

Posted on Nov 21, 2014, 8:14 PM

Respond to this message   

Return to Index


Probably won't work on an Android or an Edsel

by Clippy (Login burger2227)
R

SCREEN 12
row = 10: column = 10
OUT &H3C8, 0: OUT &H3C9, 0: OUT &H3C9, 0: OUT &H3C9, 30 'blue background

COLOR 9: LOCATE row, column: PRINT "Hello"
code% = SCREEN(row, column, 0) ' character code return parameter 0
attrib% = SCREEN(row, column, 1) ' character color return parameter 1
COLOR 14: LOCATE 15, 10: PRINT "ASCII:"; code%, "COLOR:"; attrib%
END

Posted on Nov 21, 2014, 8:28 PM

Respond to this message   

Return to Index


That appears to be the work-around.

by Pete (Login The-Universe)
Admin

QB's very own RGB system.

Hopefully Rob will add character recognition for all the standard background colors.

Thanks,

Pete

Posted on Nov 21, 2014, 10:49 PM

Respond to this message   

Return to Index


Ah, but OUT only works to color the screen.

by Pete (Login The-Universe)
Admin

Setting the background color of the text still errors.

Pete

Posted on Nov 22, 2014, 10:00 AM

Respond to this message   

Return to Index


OUT can change the RGB intensities of any attribute to any color

by Clippy (Login burger2227)
R

Just so happens that the default background color is black. I'm used to not using COLOR for backgrounds in graphic screens.

I gather Rob never noticed that it affected the SCREEN function. It took how many years for us to find it!

Posted on Nov 22, 2014, 10:10 AM

Respond to this message   

Return to Index


Huh? It only took me a week to find it...

by Pete (Login The-Universe)
Admin

At least that is about the time I have been working modestly with graphics.

Anyway, so how would OUT be used as the background o a text character?

COLOR 15, 0 and change the 0 = black to blue?

Pete

Posted on Nov 22, 2014, 5:32 PM

Respond to this message   

Return to Index


Beginning work on graphics / text hybrid

by Pete (Login The-Universe)
Admin

I'll post the code in the code other forum, but or discussion purposes, it is neat to have Android-BASIC's ability to mix SCREEN 0 with graphics. I don;t know if the newer releases of QB64 will have that capability or not, but it allowed me a way around the lack off a background color for text in Android-BASIC.

Pete

Posted on Nov 19, 2014, 12:33 AM

Respond to this message   

Return to Index


The forum index last post is not working correctly.

by Kewbie (Login Kewbie)
R

The little pinned note icon is SUPPOSED to take you to the beginning of the thread that the last post link next to it is in. Instead, it just takes you to the same link as the last post link.

Pete, is this something you can fix, or will it have to be addressed by the Network54 staff? In either case, it'll probably never be fixed. :-D

Kew

Posted on Nov 17, 2014, 9:51 AM

Respond to this message   

Return to Index


Re: The forum index last post is not working correctly.

by Pete (Premier Login iorr5t)
Forum Owner

N54 is messing with database, getting ready or the release o their version "3". It is supposed to include sticky notes. Public testing may have messed up the note icon feature. So far, no mention of it on their public forum. I will give it a week or two, as these issues often get corrected internally.

Pete

Posted on Nov 17, 2014, 10:48 AM

Respond to this message   

Return to Index


* Thanks, Pete.

by Kewbie (Login Kewbie)
R

Posted on Nov 17, 2014, 9:12 PM

Respond to this message   

Return to Index


* And like magic, it's working correctly again.

by Pete (Login The-Universe)
Admin

Posted on Nov 18, 2014, 10:33 PM

Respond to this message   

Return to Index


Rob you ignorant GLUT!

by Weekend Update Team (Login The-Universe)
Admin

I can just hear another has-been, Chevy Chase, saying that from the old SNL series. Yep, there was only one SNL, but for us QB fans, there are two SDLs, and SDL2 would have been the right ticket to ride, but Rob don't care.

It's fun getting things to slowly run on mobile, but honestly, just QBasic statements on mobile, without much, if any, of the QB64 underscore stuff, would have rocked. Instead that project got mired down in a bed of dead petunias, oh well.

I would still love to see a finished slightly updated QBasic compatible version of that project, instead of this silly never to be finished art project it turned into. If I wanted an art project, I'd downloaded Paint.net.

Maybe in some quantum universe, an SDL2 version of QB64 will get pushed up Rob's Creek. I hope so, because I honestly believe that is the best shot at an eventual QB64 mobile option.

Currently I'm finishing up a couple of non-programming big projects, but I also have a new project on the horizon. With any luck, I should be getting the mobile BASIC sub-forum open pretty soon. The only irony that would please me more, is to see a mobile version of QB64, one that actually worked, beat that grand opening. Well,let's not hold our breath for that, because these days, Rob's Chevy Chase, and we're not.

Pete

Posted on Nov 14, 2014, 3:16 PM

Respond to this message   

Return to Index


*Dan Ackroyd, not Chevy Chase

by (no login)

Posted on Nov 14, 2014, 3:29 PM

Respond to this message   

Return to Index


Can we please just throw Chevy a bone!

by Pete (Login The-Universe)
Admin

Wow, it was Dan! Too many years ago or me I guess. I never watch reruns, just a few of the originals from the mid 1970s. Poor Chevy didn't even have that line, bummer! Another comedian beat by an addiction to co.. ah back pills.

Well, Chevy was in the best comedy about golf, Caddyshack, but also the worst comedy about golf ever, Caddyshack 2. I don;t think that is the case for SDL. SDL 2 looks like an even better version, better licensing, and I wouldn't be surprised if they will offer a stand-alone option for exe files.

Hey thanks for the trip down memory lane, even if I stumbled once along the way.

Pete



Posted on Nov 14, 2014, 3:54 PM

Respond to this message   

Return to Index


*...but nobody could fall like Chevy (frequently as Gerald Ford)!

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 14, 2014, 4:13 PM

Respond to this message   

Return to Index


* But at least Jerry always fell to the Right.

by GWB (Login The-Universe)
Admin

Posted on Nov 14, 2014, 4:27 PM

Respond to this message   

Return to Index


I just put up $1,000 for someone to cook QB64 up

by Clippy (Login burger2227)
R

For once I'd like to pay up...

Posted on Nov 14, 2014, 4:10 PM

Respond to this message   

Return to Index


* Slave wages. Probably 300+ hours of work. At least pay minimum wage.

by Liberal Media (Login The-Universe)
Admin

Posted on Nov 14, 2014, 4:32 PM

Respond to this message   

Return to Index


What Minimum wage? WAY MORE than you or the GOP would pay

by Clippy (Login burger2227)
R

Some in the GOP want to ABOLISH it totally! More people working for Walmart and McDonald wages and getting subsidized by the Government until the GOP CUTS that off too!

I WELCOME others to toss their money in the hat! Set it up and I'll put my money in an ESCROW account where others can contribute whatever they can afford. Maybe I'll do that myself, but I want to do something soon!

Posted on Nov 14, 2014, 4:50 PM

Respond to this message   

Return to Index


Hysterical!

by Pete (Login The-Universe)
Admin

So let's go with the 300 hours. Id; say a junior programmer makes what, about $50 an hour? Oh, and then there are benefits, meaning you should also kick into his pension, and maybe throw in some Obamacare while you're at it. So I'd say you are looking at paying out about $22,000.

See, living up to the hype isn't so easy when it's for real, is it?

Pete

Posted on Nov 14, 2014, 5:10 PM

Respond to this message   

Return to Index


The mission is not that hard!

by Clippy (Login burger2227)
R

QB64 already converts our code to C++ so it should not be too hard to go from there! Many programmers already convert C code to Android and soon Windows Phone.

I am currently looking at the latest FREE Visual Studio offering:

Visual Studio Community 2013
This FREE*, full-featured IDE is perfect for students, open source contributors, and developers building compelling apps – even for Windows, iOS, and Android devices.

With Galleon's blessing and a running start he could charge a reasonable price and pay the developer a percentage after that. Maybe even pay us back... not that I need it.



Posted on Nov 14, 2014, 6:00 PM

Respond to this message   

Return to Index


Rob is too busy practicing for his next shark jump.

by Pete (Login The-Universe)
Admin

My Android BASIC code is translated to C. I recall some crap at QB64 about needing to convert QB64 to JAVA, and it just isn't the case. Still, there is a lot of work that would need to be done to QB64 on things that are mobile specific such as touch screen gestures, etc. It would take awhile. That "Convert to Android" in the QB64 IDE was a shark jump onto itself. Rob should just changed it to "Convert to Islam." At least that will give you 40 virgins when your app dies on arrival.

Pete

Posted on Nov 14, 2014, 6:10 PM

Respond to this message   

Return to Index


*40 virgins!?! I thought it was 75!! (Damn, how do you disarm this stupid thing?)

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 14, 2014, 6:56 PM

Respond to this message   

Return to Index


Don't panic. Steve is busy adding more virgins as we speak!

by Pete (Login The-Universe)
Admin

And it's a good thing he doesn't live in California. They are pretty hard to ind out here.

Pete

Posted on Nov 14, 2014, 7:04 PM

Respond to this message   

Return to Index


* but unless he gets help from rob, he never will be able to call it virgin mobile.

by not really mennonite (Login The-Universe)
Admin

Posted on Nov 14, 2014, 7:07 PM

Respond to this message   

Return to Index


Once we get the process going bugs could be worked out

by Clippy (Login burger2227)
R

The mouse is the touch screen. Gestures would need to be added to enlarge etc.

I'd just like to be able to run my Calendos calendar program on it. All it needs is a year entry and a button press.

I think Rob would be a lot more willing to get er done if he had it started well. We've got a few people working under the hood so who knows...

Posted on Nov 14, 2014, 8:51 PM

Respond to this message   

Return to Index


* Do you have the code to that program posted anywhere?

by Pete (Login The-Universe)
Admin

Posted on Nov 14, 2014, 9:35 PM

Respond to this message   

Return to Index


I can post it or give a download link

by Clippy (Login burger2227)
R

I have to change a few things that I find annoying on it like the beeps and actual time readout perhaps.

The program basically creates a calendar of every month a press at a time of entered years or the current year if no year is entered. It also shows Federal Holidays and Easter.

Posted on Nov 15, 2014, 6:46 AM

Respond to this message   

Return to Index


As long as it is not a link to an exe download, sure.

by Pete (Login The-Universe)
Admin

Either post it in the big forum or link the download to the source in the code forum.

I have an appointment book. One o the sub functions is to produce a perpetual calendar. I don't care about holidays, as I never seem to take time off, anyway. Last vacation, 17 years ago. Anyway in terms o mobile conversion, my problem would be spacing issues, only about 25 lines across instead of 80, and unicode. I miss the ASCII borders you can make in QB. So if I wanted to convert mine, I would have to restructure it,and make use of a lateral scrolling algorithm.

Pete

Posted on Nov 15, 2014, 8:32 AM

Respond to this message   

Return to Index


Unicode has all the box characters Screen 0 did

by (no login)

found all over the Unicode set. Unless you get the font and height just right, there will be thin blank lines visible between each row.

Posted on Nov 15, 2014, 8:36 AM

Respond to this message   

Return to Index


Posted in Big Program Forum

by Clippy (Login burger2227)
R

Its not that huge. Uses a funky leap year and first day of year calculator based on the year 2000.

Gotta know when the year starts to set up the month blocks correctly.

Also finds holidays by date or week number for Thanksgiving and Monday holidays. Also has voting day and Easter.

Posted on Nov 15, 2014, 10:34 AM

Respond to this message   

Return to Index


I converted it to run in Android, and posted it in the Mobile BASIC Forum.

by Pete (Login The-Universe)
Admin

Requires Android setting changed to 16 pt font, and locate column row instead of row column, which is the default. Cannot get a nice border around it, as Android does not support extended ASCII characters, but other than that, it works.

Pete

Posted on Nov 15, 2014, 2:41 PM

Respond to this message   

Return to Index


Of course, you can fake extended characters...

by TheBOB (Login qb432l)
Mod

...by making designs or borders out of printable characters, such as "_", "#" or "|", etc. Do you have colors with Android?

Just a thought.

-Bob

Posted on Nov 16, 2014, 6:31 AM

Respond to this message   

Return to Index


Re: Of course, you can fake extended characters...

by Pete (Login The-Universe)
Admin

That's what I did, but it also looks fine without a border.

Android has colors, but so ar I cannot find a way to set the background color, only text color. It does allow rgb in text though, so all colors and hues can be used.

It ignores CHR$(0). 219 and 255 are extended, and not the same as QB, so no way to make a solid block.

Pete

Posted on Nov 16, 2014, 7:28 AM

Respond to this message   

Return to Index


*Sounds workable--plus a black background ain't so bad for most things.

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 16, 2014, 1:39 PM

Respond to this message   

Return to Index


Now all I gotta do is figure out how to load it...

by Clippy (Login burger2227)
R

I found Basic4android. Is that the one to use?

What is the WHILE -1 thing? While what's true? I see BREAK too. How does it progress, what do you have to use?

Can we use LINE graphics in it? I assume they use similar text blocks versus pixels.

Maybe even use image files for the the interface?

Posted on Nov 16, 2014, 7:30 AM

Respond to this message   

Return to Index


AndroidBASIC docs and download....

by Pete (Login The-Universe)
Admin

http://androidbasic.ninja-web.net/man/indexe.html

Google Play Download:https://play.google.com/store/apps/details?id=and.bas

I think it costs about $6, so you en up saving $994 over waiting for QB64.

Not hard to convert what I posted back to QB, either.

Color col() - just remove the col() part and leave the number.

ENDIF to END IF

BREAK to EXIT WHILE

PAUSE to SLEEP with the number divided by 1000.

DATE$ is written YEAR\MO\DAY so change to MO\DY\YEAR when converting.

WHILE is supported, DO is not. WHILE -1 WEND is the same as DO LOOP.

-----------------------

Pete





Posted on Nov 16, 2014, 7:47 AM

Respond to this message   

Return to Index


SCREEN [Text],[Graphic],[Sprite],[Bg]

by Clippy (Login burger2227)
R

SCREEN 1,1,0,0 is text and graphics

LINE(x1,y1)-(x2,y2) [,color] [,|b or bf|]

color rgb(255,0,0) 'red

Posted on Nov 16, 2014, 8:09 AM

Respond to this message   

Return to Index


$3.20 now how do I load the program from here?

by Clippy (Login burger2227)
R

I can't even find Copy or paste and have no idea where files are on my device.

I have BAS files on Dropbox, but my device asks to download a program that can open them. Don't see any way to LOAD anything but the example BAS files in storage...

What kind of editor is this? One that cannot copy code?

Posted on Nov 16, 2014, 9:27 AM

Respond to this message   

Return to Index


Re: $3.20 now how do I load the program from here?

by Pete (Login The-Universe)
Admin

Get the 920 text editor app. That one is free. You can send your drop box files to your phone, and copy and paste them to 920. Then just save it to your and.bas older.

What I do is make a USB connection from Android to my PC. I then open up the Android folder on Explorer in my PC. You can't access it directly, but... I write my code in notepad in my PC, save it to a folder in my PC, then I do a file copy/paste with the mouse from my PC older to the and.bas folder. That works. It beats typing code on the Android keyboard.

USB on Android should have an option to connect as "a media device" When you plug the USB cable into your PC, it should show up in your drive list.

Pete

Posted on Nov 16, 2014, 10:02 AM

Respond to this message   

Return to Index


The DropBox files are already on the tablet

by Clippy (Login burger2227)
R

I can't find a way to move anything anywhere. The editor is useless if I got to type everything in again.

What I need is something to organize the tablet's files so I can load them from that silly folder.

My tablet doesn't have USB either.

Posted on Nov 16, 2014, 10:15 AM

Respond to this message   

Return to Index


Try that 920 text editor.

by Pete (Login The-Universe)
Admin

LINE (80,40)-(460,264),hsv(160,25,80),b

I edited that into the Mobile Forum post. It draws a nice box around the calendar.

Your Android folder to run files in should be: storage/emulated/0/and.bas/

Android BASIC settings, accessible by touch on the three small squares icon top right, allows you to save / access files on internal storage or SD card. Mine is set to SD card.

Pete

Posted on Nov 16, 2014, 10:23 AM

Respond to this message   

Return to Index


Load gives me nothing but that storage/emulated/O/and.bas folder

by Clippy (Login burger2227)
R

Is that a 0 or an O even? Weird!

How would I transfer a BAS file from Dropbox to it? How would I Paste anything into that editor?

What's the LINE hsv values do?

Posted on Nov 16, 2014, 10:58 AM

Respond to this message   

Return to Index


Found another program for free called X11

by Clippy (Login burger2227)
R

At least it knows what a BAS file is and runs it automatically.

Unfortunately it seems to find more errors than good code too! Scrapped it already.

So I was gonna try to use your program on my PC, but it says it has already been installed...

I got a file browser, but I can't seem to get that working well either!

Posted on Nov 16, 2014, 12:39 PM

Respond to this message   

Return to Index


X11 would be great if it wasn't x-ridden with bugs.

by Pete (Login The-Universe)
Admin

Good documentation, but poor attention to detail. LOCATE is horribly messed up, that's why I dropped it. It was lacking some other important element, too, but I cannot recall what that was anymore. I would have to make a unction to adjust LOCATE before anything I have would run on it correctly.

Pete

Posted on Nov 16, 2014, 8:13 PM

Respond to this message   

Return to Index


Re: Load gives me nothing but that storage/emulated/O/and.bas folder

by Pete (Login The-Universe)
Admin

Get a text editor installed in your Android device. I recommend that free 929 text editor on Google Play. Visit the forum and copy and paste the Android conversion of your calendar to that text editor, and save it as a .bas file in your storage/emulated/O/and.bas folder. Then just open AndroidBASIC, load it, and run C to get a compiled exe.

Pete

Posted on Nov 16, 2014, 8:36 PM

Respond to this message   

Return to Index


I finally got SE File Manager to copy the files

by Clippy (Login burger2227)
R

I still couldn't get directly into the Drop Box folders, but I found that if I ZIP up a BAS file in my tablet's DropBox Public folder, it will put it into the SD Data area. A weird path to follow. Then I highlight the ZIP in SE and goto More and Extract into the same Public Folder I can find on my tablet. Then I use SE to copy to the and.bas folder.

Then the missing integer division backslashes got me so I had to edit the program some more. After abnout five times, I got it to run. All I saw was the day numbers go scrolling up the screen...

Posted on Nov 17, 2014, 7:42 AM

Respond to this message   

Return to Index


Re: I finally got SE File Manager to copy the files

by Pete (Login The-Universe)
Admin

I redid the mobile upload post using a different posting method. That corrected the backslash problem.

Try putting that one one your tablet and run it, but first...

Open Android-BASIC and find "Settings" on the same menu you open to load or run a program.

Change as follows:

Font size from 24 to 16.

coordinates from 0,0 y,x to 1,1 x,y, otherwise it will mess up all the LOCATE statements.

Android-BASIC scrolls automatically i you reach or pass the last printable column.

Pete


Posted on Nov 17, 2014, 8:27 AM

Respond to this message   

Return to Index


font 24 worked OK except for the box

by Clippy (Login burger2227)
R

It was set to 40 default. The red and purple colors aren't working. Instead of COL() you could try RGB(255,0,0).

The 0,0 y,x only messes up by one instead of having to swap them throughout existing basic programs.

Seems to me that whoever wrote this only knows a little about Basic. They got text and graphics confused!

Maybe we could help this guy? LOL

So how is the App made after editing?

Posted on Nov 17, 2014, 8:45 AM

Respond to this message   

Return to Index


Re: font 24 worked OK except for the box

by Pete (Login The-Universe)
Admin

At the top o the menu, touch Run C. That will translate it to c code. Runs a lot faster, too.

When I first ran a test program, it messed up LOCATE. That's when I notice it switched x and y from how QB handles text. I was happy to see I could swap that in SETTINGS.

If 24 works on your Android, it is probably because it has a wider screen than the phone-like type I am using. It centers almost perfectly on mine.

There is no support for this product that I can find. It has a weird forum that opened up in August, with only one post. The developer is oriental. Loved the part about translating "sauce" code.

Pete

Posted on Nov 17, 2014, 9:01 AM

Respond to this message   

Return to Index


Well where is the application. Don't see anything new.

by Clippy (Login burger2227)
R

Yeah my tablet is 7" tall and 4" wide. It was really hard to see when smaller. That's one reason I never got a smart phone too. I can't see and I can't thumb type well either.

Posted on Nov 17, 2014, 9:07 AM

Respond to this message   

Return to Index


Re: Well where is the application. Don't see anything new.

by Pete (Login The-Universe)
Admin

I do not believe the developer has made it to a stand-alone app phase, yet. I just run emulated in C. You can save your code as c code, by loading your program and instead o running it, type SAVE "myprogram.c" The .c extension converts it. I use 929 text to open and view, and yes, it is C code. You would then need to work that c into an exe, and load it to your Android device to have a stand-alone app.

Pete

Posted on Nov 17, 2014, 10:01 AM

Respond to this message   

Return to Index


ES file manager has a text mode too. Well we are closer anyhow.

by Clippy (Login burger2227)
R

I can wait to see how it goes. Can I use QB64's C?

Posted on Nov 17, 2014, 10:10 AM

Respond to this message   

Return to Index


Re: ES file manager has a text mode too. Well we are closer anyhow.

by Pete (Login The-Universe)
Admin

Well it would take some experimenting to see just what c code would run properly as an Android exe. maybe this developer had thought that through. I would try a smaller program, and grab a qb64 conversion and compare it to what Android c looked like or starters. O course what we don't know is i the developer put anything special into the interpreter to make the code run properly in an Android device. I don't pretend to know anything about this part o the field, so this would all be guess work or me. The developer does have a listed BASIC-C converter or a PC listed here:

http://androidbasic.ninja-web.net/man/bastoc.html

It looks like something he may have not finished, though.

Pete



Posted on Nov 17, 2014, 10:19 AM

Respond to this message   

Return to Index


* 72 houri

by Michael Calkins (Login MCalkins)
Moderator

Posted on Nov 15, 2014, 5:38 AM

Respond to this message   

Return to Index


LOL, don't you mean 71.86 hours Mr. Spock?

by Pete (Login The-Universe)
Admin

Michael, you must be non-union!

If your time estimate is closer than mine, I'm surprised Rob hasn't just pushed ahead with this. Spare time, a couple of months. I mean he put that tab to compile for Android in the IDE, but then totally bailed on debug, support, and needed development to get it to work.

I'm still pretty upset with the project, and upset with myself for maintaining faith in it over the past two years on the road to nowhere with GLUT. That's why I don't buy the 72 hours, either. Nothing associated with QB64 moves along in a timely fashion anymore.

I you wanted to tackle it, you should try and get an email to Rob and asked to be put on as the Android Project Manager. Get at least some formal organization over there in that house of cards. Hey, at least the joker put up some money, now all you have to do is get the king to go or it, and make sure the Jack o spades, rakes, and hoes doesn't plow through your field.

Pete

Posted on Nov 15, 2014, 8:46 AM

Respond to this message   

Return to Index


* no, not hours. (URL)

by Michael Calkins (Login MCalkins)
Moderator

http://en.wikipedia.org/wiki/Houri

Posted on Nov 15, 2014, 9:58 AM

Respond to this message   

Return to Index


ROFL - I thought that was a typo. But they charge by the hour, too.

by Pete (Login The-Universe)
Admin

So getting back to the original estimate of time, how close do you think my estimate of 300 hours to take QB6 from present to Android?

Pete

Posted on Nov 16, 2014, 8:17 AM

Respond to this message   

Return to Index


* I don't know.

by Michael Calkins (Login MCalkins)
Moderator

Posted on Nov 19, 2014, 12:35 AM

Respond to this message   

Return to Index

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement