Jump to content

Recommended Posts

  • 2 weeks later...
  • 3 weeks later...

100 ! MILEAGE
110 ! IN TI EXTENDED BASIC
120 ! BY R.W. AUGUST
130 CALL CLEAR :: N=0
140 DIM D$(100),D(100),G(100),M(100)
150 DISPLAY AT(2,5)ERASE ALL:"<< M I L E A G E >>"
160 DISPLAY AT(6,2):"COMAND LIST":" ------------"
170 DISPLAY AT(9,2):"1) ENTER DATA FROM KEYBOARD": :TAB(2);"2) DISPLAY MILEAGE DATA": :TAB(2);"3) PRINT MILEAGE DATA"
180 DISPLAY AT(15,2):"4) READ DATA FROM DISK": :TAB(2);"5) WRITE DATA TO DISK": :TAB(2);"6) END PROGRAM"
190 DISPLAY AT(22,5):"YOUR CHOICE [1 - 6]"
200 CALL KEY(0,K,S) :: IF S=0 THEN 200 :: IF K<49 OR K>54 THEN 200
210 CALL CLEAR :: ON K-48 GOSUB 1000,2000,3000,4000,5000,6000
220 GOTO 150
1000 ! ENTER FROM KEYBOARD
1010 DISPLAY AT(2,3):"<< DATA ENTRY SECTION >>"
1020 N=N+1 :: DISPLAY AT(5,1):"ENTER END FOR MAIN MENU"
1030 DISPLAY AT(8,1):"DATA:": : :"ODOMETER READING:": : :"NO. GALLONS BOUGHT:"
1040 ACCEPT AT(9,1)SIZE(8):D$(N) :: IF D$(N)="END" OR D$(N)="end" THEN N=N-1 :: RETURN
1050 ACCEPT AT(12,1)SIZE(7):D(N) :: ACCEPT AT(15,1)SIZE(4):G(N)
1060 DISPLAY AT(12,1):" " :: DISPLAY AT(15,1):" " :: GOTO 1020
2000 !DISPLAY DATA TO SCREEN
2010 DISPLAY AT(2,2):"<< DISPLAY DATA SECTION >>": :"DATE";TAB(10);"ODOMETER";TAB(19);"GALS";TAB(25);"MPG"
2020 DISPLAY AT(5,1):"-------- -------- ---- -----" :: M(1)=0
2030 FOR J=2 TO N :: IF G(J)>0 THEN M(J)=(D(J)-D(J-1))/G(J)ELSE M(J)=0
2040 IF M(J)<0 THEN M(J)=0
2050 NEXT J
2060 K=-16 :: L=0
2070 K=K+17 :: L=L+17 :: IF K>N THEN L=N
2080 FOR J=K TO L :: DISPLAY AT(5+J,1):D$(J) :: DISPLAY AT(5+J,11):USING "#####.#":D(J)
2090 DISPLAY AT(5+J,19):USING "##.#":G(J) :: DISPLAY AT(5+J,24):USING "##.##":M(J) :: NEXT J
2100 IF L<N THEN 2120
2110 DISPLAY AT(24,1):"PRESS ANY KEY FOR MAIN MENU" :: GOSUB 2130 :: RETURN
2120 DISPLAY AT(24,1):"PRESS ANY KEY TO CONTINUE" :: GOSUB 2130 :: GOTO 2070
2130 CALL KEY(0,K,S) :: IF S=0 THEN 2130 :: RETURN
3000 ! SEND DATA TO PRINTER
3010 DISPLAY AT(2,3):"<< PRINT DATA SECTION >>" :: M(1)=0
3020 FOR J=2 TO N :: IF G(J)>0 THEN M(J)=(D(J)-D(J-1))/G(J)ELSE M(J)=0
3030 IF M(J)<0 THEN M(J)=0
3040 NEXT J
3050 DISPLAY AT(12,8):"PRINTING DATA" :: OPEN #2:"PIO",OUTPUT
3060 PRINT #2:"DATE";TAB(12);"ODOMETER";TAB(23);"GALLONS";TAB(33);"MPG"
3070 PRINT #2:"-------- --  ------ ------- -----"
3080 FOR J=1 TO N
3090 PRINT #2:D$(J);TAB(13);
3100 PRINT #2,USING "#####.#":D(J);
3110 PRINT #2:TAB(24);
3120 PRINT #2,USING "##.#":G(J)
3130 PRINT #2:TAB(32);
3140 PRINT #2,USING "##.##":M(J)
3150 NEXT J
3160 DISPLAY AT(16,9):"DATA PRINTED" :: FOR I=1 TO 200 :: NEXT I
3170 CLOSE #2 :: RETURN
4000 ! LOAD DATA FROM DISK
4010 DISPLAY AT(2,3):"<< READ DATA SECTION >>" :: N=0
4020 DISPLAY AT(12,4):"READING DATA FROM DISK"
4030 OPEN #1:"DSK1.MDATA",INPUT :: INPUT #1:N
4040 FOR I=1 TO N :: INPUT #1:D$(I),D(I),G(I) :: NEXT I
4050 CLOSE #1 :: DISPLAY AT(16,9):"DATA LOADED" :: FOR I=1 TO 200 :: NEXT I
4060 RETURN
5000 ! WRITE DATA TO DISK
5010 DISPLAY AT(2,3):"<< SAVE DATA SECTION >>"
5020 DISPLAY AT(12,9):"SAVING DATA"
5030 OPEN #1:"DSK1.MDATA",OUTPUT :: PRINT #1:N
5040 FOR I=1 TO N :: PRINT #1:D$(I):D(I):G(I) :: NEXT I
5050 CLOSE #1 :: DISPLAY AT(16,10):"DATA SAVED" :: FOR I=1 TO 200 :: NEXT I
5060 RETURN
6000 ! END PROGRAM
6010 DISPLAY AT(12,3):"HAVE YOU SAVED YOUR DATA": :TAB(10):"Yes or No"
6020 CALL KEY(0,K,S) :: IF S=0 THEN 6020 :: IF K=78 OR K=110 THEN 150
6030 IF K<>89 AND K<>121 THEN 6020 ELSE CALL CLEAR :: END
 

  • Like 2
  • 2 weeks later...
  • 3 weeks later...
  • 2 weeks later...
On 10/1/2019 at 3:57 AM, sparkdrummer said:

Ralph - Thank you for giving us this superb issue with lots of history on the TI-99/4. My favorite issue so far! Keep it up Sparkster. 

 

Ever wondered about the origins and demise of the TI-99/4? Download this issue.

  • Like 1

It would be cool to listen to an audio panel version of this newsletter. Maybe a round table type deal where TI AtariAgers get together to talk about these past stories and then branch off into the current TI scene. Wondering aloud if anyone here would be interested in trying to create such a program? 

 

Not trying to hijack the thread but Yesterday’s News seems the perfect conversation starter for some sort of TI podcast. 

 

Also noting we’re probably the last active retro community without a dedicated podcast.

 

 

  • Like 1
  • 3 weeks later...

Hi Ralph,

some months ago that I had the time to view your great work. But now finally downloaded all the missing ones.... ?

(you can see that from my Likes, that´s my indicator what I have and what I miss)

Many many things to read now, thanks for that massive work !

Ralf (me) ?

 

  • Like 2
  • 2 weeks later...

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...