Jump to content
IGNORED

HELP - I AM STUCK! - TI BASIC


oddemann

Recommended Posts

Book: "Zappers: having fun programming and playing 23 games for TI -99/4A"


250 I cant get past! First test I deleted it and got problem in 260

Here is the program...

100 REM MORSE CODE
110 CALL CLEAR
120 PRINT "THIS IS A MORSE CODE        TRANSLATOR.":::::::::
130 CALL CHAR(46,"0000001818000000")
140 TL = 50
150 TONE = 2000
160 DIM CODE$(26)
170 FOR I=1 TO 26
180 READ CODE$(I)
190 NEXT I
200 INPUT "ENTER YOUR MESSAGE IN       ENGLISH:":MESSAGE$
210 PRINT ::
220 FOR I = 1 TO LEN(MESSAGE$)
230 X=ASC(SEG$(MESSAGE$,I,1))-64
240 LETTER_CODE$="   "
250 IF (X(I)+(X>26)) THEN 270
260 LETTER_CODE$=CODE$(X)
270 FOR J=1 TO LEN(LETTER_CODE$)
280 TEMP$=SEG$(LETTER_CODE$,J,1)
290 PRINT TEMP$
300 IF TEMP$-" " THEN 390
310 IF TEMP$="." THEN 420 ELSE 440
320 FOR T=1 TO TL*.5
330 NEXT T
340 NEXT J
350 PRINT " "
360 NEXT I
370 PRINT ::
380 END
390 FOR T=1 TO 25
400 NEXT T
410 GOTO 320
420 CALL SOUND(TL,TONE,0)
430 GOTO 320
440 CALL SOUND(TL*3,TONE,0)
450 GOTO 320
460 DATA ".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-"
470 DATA ".-.","...","-","..-","...-",".--","-..-","-.--","--.."

 

Edited by oddemann
Link to comment
Share on other sites

14 minutes ago, mizapf said:

What should that mean:

 

 


250 IF (X(I)+(X>26)) THEN 270

 

 

Either X(I) or X, but not both.

 

(Please always post the error message as well. Here it is NAME CONFLICT.)

Sorry, did not help. Tried different things on that line. So fare I am clueless to what it might be!

Link to comment
Share on other sites

33 minutes ago, oddemann said:

250 IF (X(I)+(X>26)) THEN 270

 

My guess is that “X(I)” should be a relational expression such as “X<I”, making the line

250 IF (X<I)+(X>26) THEN 270

[EDIT: The ‘I’ copied from the erroneous post should apparently be a ‘1’.  See @oddemann’s post below.]

 

...lee

Edited by Lee Stewart
correction
Link to comment
Share on other sites

Just now, Lee Stewart said:

 

My guess is that “X(I)” should be a relational expression such as “X<I)”.

 

...lee

And with that... Lee Stewart saved the day, THX! (seeing the fix, it is... "Ohhh yes, that was logical... in so many ways!")

Correct program:
 

100 REM MORSE CODE
110 CALL CLEAR
120 PRINT "THIS IS A MORSE CODE        TRANSLATOR.":::::::::
130 CALL CHAR(46,"0000001818000000")
140 TL = 50
150 TONE = 2000
160 DIM CODE$(26)
170 FOR I=1 TO 26
180 READ CODE$(I)
190 NEXT I
200 INPUT "ENTER YOUR MESSAGE IN       ENGLISH:":MESSAGE$
210 PRINT ::
220 FOR I = 1 TO LEN(MESSAGE$)
230 X=ASC(SEG$(MESSAGE$,I,1))-64
240 LETTER_CODE$="   "
250 IF (X<1)+(X>26) THEN 270
260 LETTER_CODE$=CODE$(X)
270 FOR J=1 TO LEN(LETTER_CODE$)
280 TEMP$=SEG$(LETTER_CODE$,J,1)
290 PRINT TEMP$
300 IF TEMP$=" " THEN 390
310 IF TEMP$="." THEN 420 ELSE 440
320 FOR T=1 TO TL*.5
330 NEXT T
340 NEXT J
350 PRINT " "
360 NEXT I
370 PRINT ::
380 END
390 FOR T=1 TO 25
400 NEXT T
410 GOTO 320
420 CALL SOUND(TL,TONE,0)
430 GOTO 320
440 CALL SOUND(TL*3,TONE,0)
450 GOTO 320
460 DATA ".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-"
470 DATA ".-.","...","-","..-","...-",".--","-..-","-.--","--.."

 

Link to comment
Share on other sites

13 minutes ago, oddemann said:

250 in book:
250 IF (X(1)+(X>2b)THEN 270 - pretty sure it is 1

 

Not my point. Sorry, I misread the “1”., but your post had it as ‘I’.  My point was there should be no array element, which is in line with @mizapf’s comment.

 

...lee

Edited by Lee Stewart
  • Like 1
Link to comment
Share on other sites

I got myself a real IRON 2 days ago! A TI that started its "costumers life" in Asia and ended up in Norway. Been looking for a real TI for over 2 years. Finally got it! The person who sold it used it to send Morse Code.

 

Was installing latest C99 and organising files. Fund this book and WITH Morse Code prog. Maybe this was the program it ran in the ship? And I was sorting stuff since I have another program I was debugging. Was looking for a program to display graphic code, I know some of the code is wrong.

Will be grateful for a pointing to a program to view graphic code. (Will put out the prog, here! There are some bad sounds(wrong values), need to look at the code. But first I want to graphics to look right.)

  • Like 1
Link to comment
Share on other sites

LOL today was working on a RXB program I wrote in 2000 to update and the issue was """ (3 quotes is used to make a single quote in XB)

Like say PRINT #1:"""&"test"&""" this would print a record of "test"

So anyway Classic99 has no issue with pass of text to do this, but XB would crash in my CALL USER as it would ERROR out with unmatched quotes.

 

Anyway it occurred to me last night just as falling to sleep E$=CHR$(34)&CHR$(34)&CHR$(34) is bettter then """ as 3 characters vs E$ is 2 characters.

It took 20 years for this to hit me.......WOW!

Edited by RXB
missing text
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Snazzle! A snake game. Think I got most bugs, but 580 is "bugging" me!
(Book: "Zappers: having fun programming and playing 23 games for TI -99/4A")

BAD VALUE IN 580

Any ideas?

Sometimes99er got the bug, and now it is correct! Have fun playing it!

100 REM SNAZZLE
110 RANDOMIZE
120 DIM S(100,2),TABLE(26)
130 TABLE(5)=1
140 TABLE(4)=2
150 TABLE(24)=3
160 TABLE(19)=4
170 FOR LEVEL=1 TO 3
180 CALL CLEAR
190 PRINT "   YOU ARE NOW ENTERING"::::::::::
200 PRINT "L    EEEE V  V  EEEE L"
210 PRINT "L    E    V  V  E    L"
220 PRINT "L    EEE  V  V  EEE  L"
230 PRINT "L    E     VV   E    L"
240 PRINT "LLLL EEEE  VV   EEEE LLLL"
250 PRINT :::TAB(11);"# ";LEVEL
260 FOR T=1 TO 1000
270 NEXT T
280 CALL CLEAR
290 SCORE=0
300 FOR I=1 TO L
310 S(I,1)=0
320 S(I,2)=0
330 NEXT I
340 ON LEVEL GOSUB 1150,1160,1200
350 X =INT(RND*26)+2
360 Y =INT(RND*22)+2
370 CALL GCHAR(Y,X,T)
380 IF T<>32 THEN 350
390 D=INT(RND*4)+1
400 RC=31
410 CALL CHAR(128,"FFFFFFFFFFFFFFFF")
420 CALL COLOR(13,5,1)
430 CALL CHAR(136,"FFFFFFFFFFFFFFFF")
440 CALL CHAR(144,"00FF7E4C4C7EFF00")
450 CALL COLOR(14,7,1)
460 CALL HCHAR(1,1,128,RC)
470 CALL HCHAR(24,1,128,RC)
480 CALL VCHAR(1,1,128,24)
490 CALL VCHAR(1,RC,128,24)
500 L=4
510 GOSUB 1090
520 REM
530 FOR I=0 TO L
540 IF S(I,2)=0 THEN 560
550 CALL HCHAR(S(I,2),S(I,1),32)
560 S(I,1)=X
570 S(I,2)=Y
580 CALL GCHAR(Y,X,T)
590 IF T<>32 THEN 790
600 CALL HCHAR(Y,X,136)
610 CALL KEY(3,KEY,STATUS)
620 IF STATUS THEN 740
630 ON D GOSUB 660,680,700,720
640 NEXT I
650 GOTO 530
660 Y=Y-1
670 RETURN
680 X=X+1
690 RETURN
700 Y=Y+1
710 RETURN
720 X=X-1
730 RETURN
740 IF (KEY<65)+(KEY>90) THEN 630
750 KEY=KEY-64
760 IF TABLE(KEY)=0 THEN 630
770 D=TABLE(KEY)
780 GOTO 630
790 REM
800 IF (T=128)+(T=136)THEN 1010
810 CALL SOUND(50,1700,0)
820 CALL SOUND(50,892,0)
830 L=L+3
840 SCORE=SCORE+1
850 IF SCORE=10 THEN 920
860 SCORE$=STR$(SCORE)
870 FOR J=1 TO LEN(SCORE$)
880 CALL HCHAR(1,J+10,ASC(SEG$(SCORE$,J,1)))
890 NEXT J
900 GOSUB 1090
910 GOTO 600
920 FOR I=1 TO 16
930 CALL SCREEN(I)
940 CALL SOUND(50,I*110,0)
950 NEXT I
960 NEXT LEVEL
970 CALL CLEAR
980 PRINT "CONGRATULATIONS!"
990 PRINT " YOU HAVE WON"::::::
1000 END
1010 FOR I=4 TO 1 STEP -.25
1020 CALL SOUND(50,I*110,0)
1030 CALL SCREEN(15)
1040 CALL SCREEN(2)
1050 NEXT I
1060 FOR T=1 TO 1000
1070 NEXT T
1080 END
1090 RX=INT(RND*(RC-2))+2
1100 RY =INT(RND*22)+2
1110 CALL GCHAR(RY,RX,T)
1120 IF T<>32 THEN 1090
1130 CALL HCHAR(RY,RX,144)
1140 REM
1150 RETURN
1160 CALL HCHAR(4,4,128,22)
1170 CALL HCHAR(12,12,128,6)
1180 CALL HCHAR(20,4,128,22)
1190 RETURN ^
1200 FOR I=5 TO 25 STEP 5
1210 CALL VCHAR(7,I,128,17)
1220 NEXT I
1230 CALL HCHAR(4,12,128,26)
1240 RETURN

 

Edited by oddemann
De bugging DONE!
Link to comment
Share on other sites

7 hours ago, sometimes99er said:

There's an error in your line 800. Should be ...
image.png.29dbaa45b09e110f44021e6dd9cbb8c9.png
 

And the King of Snazzle debugging is Sometimes99er!

Thx!
(Should have gotten that one, copying out from the PDF, I did a lot od debugging 6 to 8, in that OCR! BUT, you go "blind" looking at it for a long time!)

  • Like 1
Link to comment
Share on other sites

22 hours ago, mizapf said:

Isn't it four quotes? Two quotes to represent the quote as such, and the opening and closing quotes: "  ""   "

NOPE! NOPE! NOPE!

This is a RXB 2001 XB program called LOADER it asks for a disk to make a DV80 file (USER BATCH FILE) on and then for disks to use like BOOT does....

After you are done adding disks just hit enter and watch the magic create a LOAD program:

100 ! RUN this program to       create a load program       that loads and runs         EA5, EA3, BASIC, and        XB programs from DISK       or HARD DRIVE.
110 ! STEP ONE: Put in the      Path of the DV80 USER       file that creates           the LOAD program.
120 ! STEP TWO: Put in the      path where to catalog       and want the LOAD           program to be saved.
130 ! STEP THREE: If done       then press enter, if        you want to add more        directorys put in path.
140 ! STEP FOUR: When you       press ENTER then the        LOAD program is created     and saved to the disk.
150 CALL VERSION(V) :: IF V<2E3 THEN PRINT "VERSION TO OLD TO CONTINUE!" :: END
160 DISPLAY AT(1,3)ERASE ALL:"RXB CREATES A LOAD PROGRAM"
170 CALL HPUT(5,3,"EXAMPLE:",7,3,"PATHNAME:DSK1.",9,3,"PATHNAME:DSK.DISKNAME.",11,3,"PATHNAME:WDS1.DIR.")
180 CALL HPUT(13,3,"PATHNAME:WDS1.DIR.SUB-DIR.",15,3,"PATHNAME:WDS.VOL.DIR.")
190 CALL HPUT(17,3,"PATHNAME:WDS.VOL.DIR.SUB-DIR.",19,3,"(Where to save result.)",23,3,"PATHNAME:")
200 ACCEPT AT(23,10)BEEP:M$
210 CALL CLEAR :: PRINT "Creating USER file DV80-LOAD"
220 OPEN #1:M$&"DV80-LOAD",VARIABLE 80,DISPLAY,OUTPUT
230 PRINT #1:"NEW"&CHR$(13)
240 PRINT #1:"100 ! RXB LOAD PROGRAM"&CHR$(13)
250 PRINT #1:"110 DIM P$(48),Y$(48),T(48)"&CHR$(13)
260 PRINT #1:"120 @=1::CALL VERSION(V) :: IF V<2E3 THEN PRINT "&"""&"VERSION TO OLD TO CONTINUE!"&"""&" :: END"&CHR$(13)
270 PRINT #1:"130 CALL COLOR(ALL,16,2) :: CALL SCREEN(2) :: RESTORE"&CHR$(13)
280 PRINT #1:"140 DISPLAY AT(1,3)ERASE ALL:"&"""&"* RXB LOAD PROGRAM *"&"""&CHR$(13)
290 PRINT #1:"150 DISPLAY AT(6,1):"&"""&"ACTIVE KEYS ARE:"&"""&": :";
300 PRINT #1:"""&"E = UP CURSOR"&"""&":"&"""&"X = DOWN CURSOR"&"""&":";
310 PRINT #1:"""&"S = LEFT CURSOR"&"""&":"&"""&"D = RIGHT CURSOR"&"""&CHR$(13)
320 PRINT #1:"160 DISPLAY AT(14,1):"&"""&"SPACE BAR = NEXT PAGE"&"""&": :"&"""&"C = DIRECTORY"&"""&": :"&"""&"1-9 = CATALOG DISK"&""";
330 PRINT #1:" :: CALL HPUT(24,3,"&"""&"PLEASE WAIT..."&"""&")"&CHR$(13)
340 PRINT #1:"170 IF @ THEN CALL HPUT(24,3,"&"""&"PRESS ANY KEY TO CONTINUE!"&"""&")::CALL BEEP::CALL KEY("&"""&"""&",3,K,S)::@=0"&CHR$(13)
350 PRINT #1:"180 CALL CLEAR::N=1"&CHR$(13)
360 PRINT #1:"190 Y=1::Z=3::CALL CHAR(128,"&"""&"080C0EFFFF0E0C08"&"""&",129,"&"""&"103070FFFF703010"&"""&")"&CHR$(13)
370 PRINT #1:"200 FOR C=4 TO 16 STEP 12 :: FOR R=1 TO 24"&CHR$(13)
380 PRINT #1:"210 READ P$(N),Y$(N),T(N)"&CHR$(13)
390 PRINT #1:"220 IF T(N)=0 THEN 260"&CHR$(13)
400 PRINT #1:"230 CALL HPUT(R,C,Y$(N))::IF C=4 THEN CALL HPUT(R,1,CHR$(T(N))) ELSE CALL HPUT(R,32,CHR$(T(N)))"&CHR$(13)
410 PRINT #1:"240 N=N+1::IF N=49 THEN N=48::GOTO 260"&CHR$(13)
420 PRINT #1:"250 NEXT R::NEXT C"&CHR$(13)
430 PRINT #1:"260 CALL HCHAR(Y,Z,128,1,Y,Z+11,129)"&CHR$(13)
440 PRINT #1:"270 CALL KEY(3,K,S)::IF K=67 THEN CALL CLEAR::INPUT "&"""&"PATH:"&"""&":X$::CALL CAT(X$)::CALL KEY("&"""&"""&",3,K,S)::GOTO 130"&CHR$(13)
450 PRINT #1:"280 CALL HCHAR(Y,Z,32,1,Y,Z+11,32) :: IF K>48 AND K<58 THEN CALL CAT(K) :: CALL KEY("&"""&"""&",3,K,S)::GOTO 130"&CHR$(13)
460 PRINT #1:"290 IF K=69 OR K=11 THEN S=Y::Y=Y-1::GOSUB 390::IF G=32 THEN Y=S"&CHR$(13)
470 PRINT #1:"300 IF K=88 OR K=10 THEN S=Y::Y=Y+1::GOSUB 390::IF G=32 THEN Y=S"&CHR$(13)
480 PRINT #1:"310 IF K=83 OR K= 8 THEN Z=3"&CHR$(13)
490 PRINT #1:"320 IF K=68 OR K=9 THEN Z=15::CALL GCHAR(Y,Z+1,G)::IF G=32 THEN Z=3"&CHR$(13)
500 PRINT #1:"330 IF K=32 THEN 340 ELSE 360"&CHR$(13)
510 PRINT #1:"340 Y=1::IF POS(P$(N),"&"""&"!........!"&"""&",1) THEN 130"&CHR$(13)
520 PRINT #1:"350 GOTO 180"&CHR$(13)
530 PRINT #1:"360 IF K=13 THEN 420"&CHR$(13)
540 PRINT #1:"370 IF K=43 OR K=61 THEN N,X=0::GOTO 140"&CHR$(13)
550 PRINT #1:"380 GOTO 260"&CHR$(13)
560 PRINT #1:"390 IF Y<1 THEN Y=24"&CHR$(13)
570 PRINT #1:"400 IF Y>24 THEN Y=1"&CHR$(13)
580 PRINT #1:"410 CALL GCHAR(Y,Z+1,G)::RETURN"&CHR$(13)
590 PRINT #1:"420 IF Z=15 THEN T$=P$(24+Y)&Y$(24+Y)ELSE T$=P$(Y)&Y$(Y)"&CHR$(13)
600 PRINT #1:"430 IF Z=3 THEN CALL GCHAR(Y,1,S) ELSE CALL GCHAR(Y,32,S)"&CHR$(13)
610 PRINT #1:"440 IF S=1 THEN CALL EALR(T$) ELSE IF S=5 THEN CALL EAPGM(T$) ELSE IF S=4 THEN CALL XBPGM(T$)"&CHR$(13)
620 PRINT #1:"450 IF S=9 THEN CALL USER(T$)::END"&CHR$(13)
630 PRINT #1:"460 IF S<>2 THEN 130 ELSE CALL EAED(T$)"&CHR$(13)
640 CALL CLEAR :: ON ERROR 670
650 CALL PROTECT(M$,"LOAD",0)
660 DELETE M$&"LOAD"
670 DISPLAY AT(1,1)ERASE ALL:"* INPUT DIRECTORY FOR LIST *"
680 CALL HPUT(5,3,"EXAMPLE:",7,3,"PATHNAME:DSK1.",9,3,"PATHNAME:DSK.DISKNAME.",11,3,"PATHNAME:WDS1.DIR.")
690 CALL HPUT(13,3,"PATHNAME:WDS1.DIR.SUB-DIR.",15,3,"PATHNAME:WDS.VOL.DIR.")
700 CALL HPUT(17,3,"PATHNAME:WDS.VOL.DIR.SUB-DIR.",19,3,"PATHNAME:(ENTER TO EXIT)",23,3,"PATHNAME:")
710 ACCEPT AT(23,10)BEEP:_$
720 X=0 :: IF LEN(_$)=0 THEN 1120
730 DIM TYPE$(6),F$(128)
740 TYPE$(1)="DIS/FIX"
750 TYPE$(2)="DIS/VAR"
760 TYPE$(3)="INT/FIX"
770 TYPE$(4)="INT/VAR"
780 TYPE$(5)="PROGRAM"
790 TYPE$(6)="DIRECTORY"
800 OPEN #2:_$,INPUT,INTERNAL,FIXED 38
810 INPUT #2:A$,J,J,K
820 CALL CLEAR :: DISPLAY _$;" -  DISKNAME= ";A$:"AVAILABLE= ";K;" USED= ";J-K
830 DISPLAY:"FILENAME   SIZE    TYPE    P":"---------- ---- ---------- -";
840 INPUT #2:A$,I,J,K
850 T=ABS(I) :: IF LEN(A$)=0 THEN GOSUB 1030 :: GOTO 670
860 DISPLAY: :A$;TAB(12);J;TAB(17);TYPE$(ABS(I));
870 IF ABS(I)=5 THEN 910
880 IF ABS(I)=6 THEN 930
890 B$="  "&STR$(K)
900 DISPLAY SEG$(B$,LEN(B$)-2,3);
910 IF I>0 THEN 930
920 DISPLAY TAB(28);"Y";
930 IF T=4 AND K=254 THEN 950
940 IF T=5 THEN 950 ELSE 960
950 PRINT :: DISPLAY AT(24,1)BEEP:"XB or EA program? (X/E/ )  ?" :: GOSUB 1020 :: IF W=88 THEN T=4 :: GOTO 1010 ELSE IF W=69 THEN 1010 ELSE IF W=32 THEN 960 ELSE 950
960 IF T=2 AND K=80 THEN 970 ELSE 990
970 PRINT :: DISPLAY AT(24,1)BEEP:"VIEW/BATCH/  (V/B/ ) ?" :: GOSUB 1020 :: IF W=66 AND K=80 THEN T=9 :: GOTO 1010
980 IF W=86 AND K=80 THEN 1010 ELSE IF W=32 THEN 840 ELSE 970
990 IF T=1 AND K=80 THEN 1000 ELSE 840
1000 PRINT :: DISPLAY AT(24,1)BEEP:"EA OBJECT FILE? (Y/N) ?" :: GOSUB 1020 :: IF W=89 THEN 1010 ELSE IF W=78 THEN 840 ELSE 1000
1010 X=X+1 :: F$(X)=A$&","&STR$(T) :: GOTO 840
1020 CALL KEY("",3,W,S) :: RETURN
1030 PRINT: :"! Creating program list.": :"PLEASE WAIT..."
1040 IF X=0 THEN 1090
1050 FOR Y=1 TO X
1060 PRINT #1:STR$(1000+@)&" DATA "&_$&","&F$(Y)&CHR$(13)
1070 @=@+1
1080 NEXT Y
1090 PRINT #1:CHR$(13)
1100 CLOSE #2
1110 RETURN
1120 CALL CLEAR :: PRINT "PLEASE WAIT..."
1130 @=@+1
1140 PRINT #1:STR$(1000+@)&" DATA !........!,"&"""&"""&",0"&CHR$(13)
1150 PRINT #1:"SAVE "&M$&"LOAD"&CHR$(13)
1160 PRINT #1:"! New loader on disk and"&CHR$(13)
1170 PRINT #1:"! named LOAD, USER finished."&CHR$(13)
1180 PRINT #1:"! Please delete file:                                   "&M$&"DV80-LOAD"&CHR$(13)
1190 CALL CLSALL
1200 CALL USER(M$&"DV80-LOAD")

OMG I do not have a video us using my LOADER program then showing LOAD?

 

 

 

P.S. I discovered you have to LOAD a Program then type in the line using REDO as XB Editor hates the quotes not being matched but manually it works and you can save it and run it fine!

Ok it crashed due to Classic99 errors out in XB Editor loading it from text so RXB 2020 has a new version, but will not run in any previous version of RXB.

My new version changes puts S$=CHR$(34) as a single quote and R$=CHR$(34)&CHR$(34) this fixed the XB Editor crashing out.

Edited by RXB
comment added
Link to comment
Share on other sites

14 hours ago, oddemann said:

Snazzle! A snake game. Think I got most bugs, but 580 is "bugging" me!
(Book: "Zappers: having fun programming and playing 23 games for TI -99/4A")

BAD VALUE IN 580

Any ideas?

Sometimes99er got the bug, and now it is correct! Have fun playing it!


100 REM SNAZZLE
110 RANDOMIZE
120 DIM S(100,2),TABLE(26)
130 TABLE(5)=1
140 TABLE(4)=2
150 TABLE(24)=3
160 TABLE(19)=4
170 FOR LEVEL=1 TO 3
180 CALL CLEAR
190 PRINT "   YOU ARE NOW ENTERING"::::::::::
200 PRINT "L    EEEE V  V  EEEE L"
210 PRINT "L    E    V  V  E    L"
220 PRINT "L    EEE  V  V  EEE  L"
230 PRINT "L    E     VV   E    L"
240 PRINT "LLLL EEEE  VV   EEEE LLLL"
250 PRINT :::TAB(11);"# ";LEVEL
260 FOR T=1 TO 1000
270 NEXT T
280 CALL CLEAR
290 SCORE=0
300 FOR I=1 TO L
310 S(I,1)=0
320 S(I,2)=0
330 NEXT I
340 ON LEVEL GOSUB 1150,1160,1200
350 X =INT(RND*26)+2
360 Y =INT(RND*22)+2
370 CALL GCHAR(Y,X,T)
380 IF T<>32 THEN 350
390 D=INT(RND*4)+1
400 RC=31
410 CALL CHAR(128,"FFFFFFFFFFFFFFFF")
420 CALL COLOR(13,5,1)
430 CALL CHAR(136,"FFFFFFFFFFFFFFFF")
440 CALL CHAR(144,"00FF7E4C4C7EFF00")
450 CALL COLOR(14,7,1)
460 CALL HCHAR(1,1,128,RC)
470 CALL HCHAR(24,1,128,RC)
480 CALL VCHAR(1,1,128,24)
490 CALL VCHAR(1,RC,128,24)
500 L=4
510 GOSUB 1090
520 REM
530 FOR I=0 TO L
540 IF S(I,2)=0 THEN 560
550 CALL HCHAR(S(I,2),S(I,1),32)
560 S(I,1)=X
570 S(I,2)=Y
580 CALL GCHAR(Y,X,T)
590 IF T<>32 THEN 790
600 CALL HCHAR(Y,X,136)
610 CALL KEY(3,KEY,STATUS)
620 IF STATUS THEN 740
630 ON D GOSUB 660,680,700,720
640 NEXT I
650 GOTO 530
660 Y=Y-1
670 RETURN
680 X=X+1
690 RETURN
700 Y=Y+1
710 RETURN
720 X=X-1
730 RETURN
740 IF (KEY<65)+(KEY>90) THEN 630
750 KEY=KEY-64
760 IF TABLE(KEY)=0 THEN 630
770 D=TABLE(KEY)
780 GOTO 630
790 REM
800 IF (T=128)+(T=136)THEN 1010
810 CALL SOUND(50,1700,0)
820 CALL SOUND(50,892,0)
830 L=L+3
840 SCORE=SCORE+1
850 IF SCORE=10 THEN 920
860 SCORE$=STR$(SCORE)
870 FOR J=1 TO LEN(SCORE$)
880 CALL HCHAR(1,J+10,ASC(SEG$(SCORE$,J,1)))
890 NEXT J
900 GOSUB 1090
910 GOTO 600
920 FOR I=1 TO 16
930 CALL SCREEN(I)
940 CALL SOUND(50,I*110,0)
950 NEXT I
960 NEXT LEVEL
970 CALL CLEAR
980 PRINT "CONGRATULATIONS!"
990 PRINT " YOU HAVE WON"::::::
1000 END
1010 FOR I=4 TO 1 STEP -.25
1020 CALL SOUND(50,I*110,0)
1030 CALL SCREEN(15)
1040 CALL SCREEN(2)
1050 NEXT I
1060 FOR T=1 TO 1000
1070 NEXT T
1080 END
1090 RX=INT(RND*(RC-2))+2
1100 RY =INT(RND*22)+2
1110 CALL GCHAR(RY,RX,T)
1120 IF T<>32 THEN 1090
1130 CALL HCHAR(RY,RX,144)
1140 REM
1150 RETURN
1160 CALL HCHAR(4,4,128,22)
1170 CALL HCHAR(12,12,128,6)
1180 CALL HCHAR(20,4,128,22)
1190 RETURN ^
1200 FOR I=5 TO 25 STEP 5
1210 CALL VCHAR(7,I,128,17)
1220 NEXT I
1230 CALL HCHAR(4,12,128,26)
1240 RETURN

 

One more,   1190  RETURN ^

 

 

  • Like 1
Link to comment
Share on other sites

4 hours ago, mizapf said:

Seems to be so RXB.

 

But in TI BASIC and Extended Basic, three quotes don't work.

0131_2x.png

Hmmm RXB 1005 version first had LOADER and every version had it including if you look at RXB 2012 and RXB 2015 have LOADER there that creates the LOAD program?

So why the problem it worked on real iron and worked in 2015 version? 

Link to comment
Share on other sites

It seems to me that in the above listing, one of the four quotes is dropped each time, producing syntactically wrong BASIC code.

 

This is what I get when I have a look at LOADER in TIImageTool, and it is also the only way that RXB 2015 accepts the lines when you type them. I just tried it.

 


...

210 CALL CLEAR :: PRINT "Creating USER file DV80-LOAD"
220 OPEN #1:M$&"DV80-LOAD",VARIABLE 80,DISPLAY,OUTPUT
230 PRINT #1:"NEW"&CHR$(13)
240 PRINT #1:"100 ! RXB LOAD PROGRAM"&CHR$(13)
250 PRINT #1:"110 DIM P$(48),Y$(48),T(48)"&CHR$(13)
260 PRINT #1:"120 @=1::CALL VERSION(V) :: IF V<2E3 THEN PRINT "&""""&"VERSION TO OLD TO CONTINUE!"&""""&" :: END"&CHR$(13)
270 PRINT #1:"130 CALL COLOR(ALL,16,2) :: CALL SCREEN(2) :: RESTORE"&CHR$(13)
280 PRINT #1:"140 DISPLAY AT(1,3)ERASE ALL:"&""""&"* RXB LOAD PROGRAM *"&""""&CHR$(13)
290 PRINT #1:"150 DISPLAY AT(6,1):"&""""&"ACTIVE KEYS ARE:"&""""&": :";
300 PRINT #1:""""&"E = UP CURSOR"&""""&":"&""""&"X = DOWN CURSOR"&""""&":";
310 PRINT #1:""""&"S = LEFT CURSOR"&""""&":"&""""&"D = RIGHT CURSOR"&""""&CHR$(13)
320 PRINT #1:"160 DISPLAY AT(14,1):"&""""&"SPACE BAR = NEXT PAGE"&""""&": :"&""""&"C = DIRECTORY"&""""&": :"&""""&"1-9 = CATALOG DISK"&"""";

...

 

Of course, this should not be surprising for me as the TIMT author, since I explicitly output double quotes for each quote in a quoted string, because this is syntactically required by Basic. You won't be able to enter the line 260 from above as shown in your listing; it must be entered as shown here.

 

That is, yes, your LOADER is perfectly working, but it is not correctly listed in posting #15.

  • Thanks 1
Link to comment
Share on other sites

4 hours ago, mizapf said:

Rich, where can I get the latest release of RXB? I still have the 2015; I'd like to create a RPK for the current one.

Just finished a new RXB 2020 USER demo Batch file 147 sector DV80 file, and creates 129 sectors of XB programs.

A lot of the BATCH is comments so did have a 96 sector DV80 Batch file that created 129 sectors of XB programs, but needed more comments.

Currently working on coverting XB programs with RXB commands to show uses of RXB 2020

Documents are mostly done and debuged the GRAM so can not find a error anymore.

Edited by RXB
Link to comment
Share on other sites

  • 2 months later...

THE PITDEMONS
From the book: Time Lost!

OK... Struggling with 460... Printed out the values and P=5 U=0 and 112 is... 112 :p C1=0
So... the problem is that there is no value, I think... What's up with that?
 

10 CALL CLEAR
20 CALL SCREEN(11)
30 PRINT "PERIL OF THE PITDEMONS"
40 PRINT :::"PRESS S (LEFT) OR D (RIGHT) TO MOVE.
50 PRINT :::"PRESS THE SPACE BAR TO FIRE."
60 PRINT :::"PRESS ANY KEY TO BEGIN."
70 CALL KEY(0,K,S)
80 IF K<0 THEN 70
90 REM **PITDEMONS
100 CALL CLEAR
110 RANDOMIZE
120 LL=16
130 IF TA=2 THEN 580
140 CALL SCREEN(2)
150 REM **CHAR DESIGN
160 CALL CHAR(152,"1819FF3D3C3C2770")
170 CALL CHAR(153,"1819FFBC3C3C4280")
180 CALL CHAR(126,"183D7EBC3C3D4280")
190 CALL CHAR(127,"18BC7E3D3CBC4201")
200 CALL CHAR(104,"1818181818181818")
210 CALL CHAR(96,"FFFFFFFFFFFFFFFF")
220 REM **ASSIGN COLOR
230 CALL COLOR(2,2,2)
240 CALL COLOR(5,5,2)
250 CALL COLOR(6,8,2)
260 CALL COLOR(8,9,2)
270 CALL COLOR(3,7,2)
280 CALL COLOR(4,10,2)
290 CALL COLOR(10,16,2)
300 CALL COLOR(9,12,12)
310 CALL COLOR(11,12,12)
320 CALL COLOR(12,7,2)
330 CALL COLOR(13,11,4)
340 CALL COLOR(14,16,4)
350 CALL COLOR(15,5,4)
360 CALL COLOR(16,6,12)
370 CALL COLOR(7,4,2)
380 REM **ROCKS
390 FOR J=1 TO 4
400 CALL HCHAR(J,1,112,32)
410 NEXT J
420 REM **PIT
430 READ P
440 IF P=0 THEN 530
450 READ U,C1
460 CALL HCHAR(P,U,112,C1)
470 GOTO 430
480 DATA 5,1,10,5,22,10,6,1,10,6,22,10,7,1,9,7,24,8,8,1,9,8,24,8
490 DATA 9,1,7,9,26,6,10,1,7,10,26,6
500 DATA 11,1,5,11,27,5,12,1,5,12,28,4,13,1,3,13,30,2,14,1,3,14,30,2
510 DATA 15,1,2,15,30,2,16,1,2,16,30,2,17,1,4,17,30,2,18,1,4,18,30,2,19,1,6,19,28,4,20,1,6
520 DATA 20,28,4,21,1,8,21,25,7,22,1,9,22,25,7,23,1,10,23,24,8,24,1,32,0
530 REM **SCOREBOARD
540 X$="SCORE = "
550 FOR BB=1 TO LEN(X$)
560 CALL HCHAR(1,BB+3,ASC(SEG$(X$,BB,1)))
570 NEXT BB
580 CALL HCHAR(4,LL,152)
590 REM **SET DIM
600 DIM AA(7,2)
610 FOR J=1 TO 7
620 FOR I=1 TO 2
630 READ AA(J,I)
640 NEXT I
650 NEXT J
660 DATA 22,19,22,16,22,15,22,18,22,14,22,13,22,17
670 IF XX=0 THEN 680 ELSE 690
680 GOSUB 890
690 REM **DECISIONS
700 CALL KEY (0,K,S)
710 IF K=32 THEN 1120
720 IF K=83 THEN 770
730 IF K=68 THEN 820
740 GOSUB 890
750 GOTO 690
760 REM **HERO MOVE
770 CALL HCHAR(4,LL,96)
780 LL=LL-1
790 IF LL<11 THEN 830
800 CALL HCHAR(4,LL,153)
810 GOTO 860
820 CALL HCHAR(4,LL,96)
830 LL=LL+1
840 IF LL>21 THEN 780
850 CALL HCHAR(4,LL,153)
860 GOSUB 890
870 GOTO 690
880 REM **PITDEMON MOVE
890 IF XX=0 THEN 950 ELSE 900
900 M=INT(RND*7)+1
910 A=AA(M,1)
920 B=AA(M,2)
930 CALL HCHAR(A,B,32)
940 IF XX=1 THEN 960
950 FOR M=1 TO 7
960 AC=AA(M,1)
970 AB=INT(RND*3)+1
980 AC=AC-AB
990 B=AA(M,2)
1000 IF AC<7 THEN 1010 ELSE 1040
1010 CALL HCHAR(4,B,126)
1020 AA(M,1)=5
1030 GOTO 1370
1040 CALL HCHAR(AC,B,126)
1050 CALL SOUND(100,600-20*AC,AC)
1060 AA(M,1)=AC
1070 IF XX=1 THEN 1100
1080 NEXT M
1090 XX=1
1100 RETURN
1110 REM **POSITRON BLAST
1120 FOR J=1 TO 7
1130 IF LL=AA(J,2)THEN 1160
1140 NEXT J
1150 J=0
1160 FOR LK=5 TO 21
1170 CALL HCHAR(LK,LL,104)
1180 CALL HCHAR(LK,LL,32)
1190 IF J=0 THEN 1210
1200 IF LK=AA(J,1)THEN 1240
1210 NEXT LK
1220 GOSUB 890
1230 GOTO 690
1240 AA(J,1)=22
1250 GOSUB 1280
1260 GOTO 690
1270 REM **SOUND EFFECTS
1280 CALL HCHAR(LK,LL,32)
1290 CALL SOUND(100,-7,0)
1300 CALL SOUND(100,-7,5)
1310 REM **SCORE
1320 SCORE=SCORE+23-LK
1330 FOR BB=1 TO LEN(STR$(SCORE))
1340 CALL HCHAR(1 ,BB+11 ,ASC(SEG$(STR$(SCORE),BB,1)))
1350 NEXT BB
1360 RETURN
1370 REM **PLAY ANOTHER GAME?
1380 TA=2
1390 X$="ANOTHER GAME?"
1400 FOR BB=1 TO LEN(X$)
1410 CALL HCHAR(24,BB+3,ASC(SEG$(X$,BB,1)))
1420 NEXT BB
1430 CALL KEY(0,K,S)
1440 IF K=89 THEN 1470
1450 IF K=78 THEN 1460 ELSE 1430
1460 END
1470 CALL HCHAR(24,3,112,15)
1480 FOR J=1 TO 7
1490 RE=AA(J,1)
1500 CE=AA(J,2)
1510 CALL HCHAR(4,1,112,30)
1520 CALL HCHAR(RE,CE,32)
1530 CALL HCHAR(1,12,32,LEN(STR$(SCORE)))
1540 SCORE=0
1550 NEXT J
1560 XX=0
1570 RESTORE 660
1580 GOTO 120

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...