Jump to content
IGNORED

Microadventures


orion1052003

Recommended Posts

What does line 290 mean? I thought it meant IF you typed R,L, and space then the program branches to line 210 but that does not happen? If I type R or L the program does not branch to line 290. Perhaps I should have tried typing just a space. Does it mean IF R AND L AND space THEN branch?



Notes :



In the book, the story has 4 team members trying to cross a gorge one at a time on a harness attached to a line or rope. The array ACT$ holds the names of the four team members.


Line 720 has a non-TI command that places the cursor at coordinates. I used Display At with coordinates, without printing anything. It appears the "rope" printing is done in lines 580 and 640. I don't know how you would modify this to PRINT what is intended or if there is a TI function just to place the cursor anywhere. The "Microadventure" books no longer support TI at this point, Book 7. The last Book is #10. The book came out in 1985, and I think the TI was discontinued in 1984.



300-320 seems to print a dropping off the person to there doom by PRINTing in the natural vertical fashion. I assume the rope crossing printing is supposed to be horizontal somehow like the bar in line 100. Maybe the "@" in line 580 and 640 is used to show the harness going left and right horizontally on the line.



I am not sure if Line 390 is correct syntax as it has SEG$ with an array name inside of it as a parameter.



The program is a mess of jumping and branching.



Y=2 in line 5, but changes to 10 in line 90 without being used for anything yet. Why change y=2 to y=10, when you can start off with y=10?



In line 70, If I don't change the value of CL$, the program never reaches line 210. I may be wrong, but I never got to line 210 that I know of until I changed CL$ to any string but "OFF" as mentioned in line 120.



Line 150 GOSUBs Line 560 which leads to GOSUB 720 with one return at the very last line 730. What happens if you GOSUB a GOSUB and then RETURN? Should the RETURN send control back to line 160 or line 570?



I am not sure why X needs to equal BX in line 570.



I added line 5, OPTION BASE 1.





BOOK 7 PROGRAM 4


5 OPTION BASE 1


10 ACT$(1)="BRONZE"


20 ACT$(2)="FRIEDA"


30 ACT$(3)="ARCH"


40 ACT$(4)="ORION"


50 J=1 :: B=1 :: Y=2


60 L$="B" :: Z$=" "


70 CL$="OFF"


80 CALL CLEAR


90 Y=10 :: GOSUB 710


100 PRINT"+--------------------+"


110 BX=2


120 IF CL$<>"OFF" THEN 210


130 BX=5


140 FOR I=1 TO 10


150 GOSUB 560


160 NEXT I :: GOSUB 680


170 FOR I=1 TO 10


180 GOSUB 620


190 NEXT I:: GOSUB 680


200 GOTO 140


210 GOSUB 700


220 IF BX<2 THEN BX=2 :: GOSUB 350


230 IF BX>20 THEN BX=20 :: GOSUB 420


240 Y=5 :: GOSUB 710


250 PRINT"ENTER L OR R"


260 INPUT M$


270 IF M$="R" THEN GOSUB 560


280 IF M$="L" THEN GOSUB 620


290 IF (M$="R")+(M$="L")+(L$=" ") THEN 210


300 FOR KK=1 TO 10


310 PRINT TAB(5);L$


320 NEXT KK


330 PRINT"YOU DROPPED",ACT$(J)


340 END


350 IF B=0 THEN 380


360 PRINT "AT STARTING POINT "


370 RETURN


380 PRINT"PICK UP",ACT$(J)


390 L$=SEG$(ACT$(J),1)!LEFT$(SEG$)IN BOOK


400 B=1


410 RETURN


420 IF B=1 THEN 450


430 PRINT"HARNESS IS EMPTY"


440 RETURN


450 Y=4 :: GOSUB 710


460 PRINT ACT$(J);" MADE IT"


470 Z$=Z$+L$!PROBABLY & NOT + IN TI XB


480 Y=10 :: X=20 :: GOSUB 720


490 PRINT Z$


500 J=J+1 :: B=0 :: L$=" "


510 IF J<5 THEN 540


520 PRINT "ALL ACT MEMBERS ON OTHER SIDE"


530 END


540 GOSUB 700 :: PRINT"FETCH NEXT MEMBER "


550 RETURN


560 BX=BX+1


570 Y=10 :: X=BX :: GOSUB 720


580 PRINT"-@"


590 Y=11 :: GOSUB 720


600 PRINT " ";L$


610 RETURN


620 Y=10::x=BX::GOSUB 720


630 BX=BX-1


640 PRINT"@-"


650 Y=11 :: GOSUB 720


660 PRINT L$;" "


670 RETURN


680 FOR K=1 TO 500 :: NEXT K


690 RETURN


700 Y=1


710 X=1


720 !LOCATE Y,X


730 RETURN


Link to comment
Share on other sites

390 L$=SEG$(ACT$(J),1)!LEFT$(SEG$)IN BOOK

This will throw an error. The format is SEG$(stringexpression,position,length) So if it is the leftmost byte of the string it should be:

L$=SEG$(ACT$(J),1,1)

 

470 Z$=Z$+L$!PROBABLY & NOT + IN TI XB

You are right, it should be an ampersand 470 Z$=Z$&L$

 

290 IF (M$="R")+(M$="L")+(L$=" ") THEN 210

the + sign is the same as an OR; the * sign is the same as an AND.

So here you have IF M$="R" OR M$="L" OR L$=" " THEN 210

 

What happens if you GOSUB a GOSUB and then RETURN? Should the RETURN send control back to line 160 or line 570?

RETURN goes back to the statement following the GOSUB that called it. But in your program the subroutine at 720 is a remark followed by RETURN, so it does nothing. Something must have been left out.

 

You can test the above easily:

100 PRINT "LINE 100"::GOSUB 200::PRINT "BACK TO LINE 100"::END

200 PRINT "LINE 200"::GOSUB 300::PRINT "BACK TO LINE 200"::RETURN

300 PRINT "LINE 300"::RETURN

Edited by senior_falcon
  • 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...