Jump to content
IGNORED

just a quickie on CALL CLEAR


newTIboyRob

Recommended Posts

EA/TI BASIC...

       DEF  CONVRT
       REF  VMBW
W1     TEXT 'BANANAS'
W2     TEXT 'APPLES'
W3     TEXT 'GRAPES'
 
CONVRT LI   R3,W1
       LI   R4,19
       LI   R5,>6000
COUNT  AB   R5,*R3+
       DEC  R4
       JNE  COUNT
 
PRINT  CLR  R0
       LI   R1,W1
       LI   R2,7
       BLWP @VMBW
 
       LI   R0,32
       LI   R1,W2
       LI   R2,6
       BLWP @VMBW
 
       LI   R0,64
       LI   R1,W3
       LI   R2,6
       BLWP @VMBW
       JMP  $
       END

100 CALL LOAD("DSK1.BAGBO")
110 CALL LINK("CONVRT")

 

  • Like 3
Link to comment
Share on other sites

Wow, such fun stuff to play with here. @GDMike , that sounds kind of cool. I guess there are at least 2 possibilities with that: kind of like a block paste then move down next line, then block paste L--->R, almost as if there was a slight DELAY used between each word on each line going down. I have a draw poker game on an IBM floppy I tested recently that still works after over 40 years and does that. Or another idea is to print each letter of each word slowly, like a delay moving left to right until the word or entire line even is finished for a cool effect.

 

Last year on my Apple 2c, I learned a program using LEN to spell out a line character by character until the line was finished; exactly what you see in War Games:

 

Greetings Professor Falken  (remember how the line "spewed" out, moving L--->R, character by character?  I always thought that was so awesome in the movie, combined with that simultaneous 1980's ring tone sound!

Edited by newTIboyRob
  • Like 2
Link to comment
Share on other sites

19 hours ago, newTIboyRob said:

To pinpoint exact screen locations in either BASIC is similar to what I was trying to do here...

If that's what you really want to do, then Extended BASIC's DISPLAY AT is your quickest solution. You have total control of where your items show up and how they are formatted. You can do the same thing from TI BASIC with HCHAR/VCHAR or Editor/Assembler, but the first method is slow and cumbersome and the second quick to execute but takes a while to learn. And you don't get all other goodies from Extended BASIC that way.

But that's not the same thing as showing a list with a series of PRINT statements, where I still don't get in which way it matters if the list starts from the bottom or the top?

  • Like 2
Link to comment
Share on other sites

.... Wow, super impressive @HOME AUTOMATION , thank you!  I really like the way you posted the 2 mini videos showing the program list in the first and the methodology in the second. Nice touches there.  With constant pausing and good old fashioned note taking, I can go back and really study what you did in the latter.  What's also cool is that I can apply these to future programs and uses once I have a feel with what is really going on here with what you showed in the program listing. I just recently received the E/A cart, but never even have used it except for 5 RUN PROGRAM FILE with my Nanopeb.  Looks like a world of cool things await me though there!

 

That first video uses the same LEN I mentioned and you incorporated, also a nice touch on your part. In other basics, what I was familiar with was the simple delay concept: FOR D=1 to 1000:NEXT D.  What my brain is still having a not-so-easy-time grasping and thus applying is the GOSUB subroutine concept. But hopefully one day...

 

While both of these video clips were super wonderful, what should be my final question on this thread would be to see if now the 2 results above could somehow be combined and maybe bring in the little I currently do know about TI BASIC, (but what I do remember also seeing it had), the DELAY command, in lieu of using LEN and having to wait for the computer to produce the string in a bit by bit horizontal spewing out fashion for each character  L--->R.

 

In essence, could we still call on the GOSUB subroutine, but combine that with the DELAY command but which would first be preset to much shorter delay times closely spaced together.  E.g. not 1000, but say like 100 for the secs.

 

Thus the end result as I say, would be almost a combination of what you showed in the 2 videos; it being not exactly the LEN character spewing and not the lighting fast result produced by the list in Assembler... but just a quicker and steady paste listing of the fruits in TI BASIC, basically as if someone was "reviewing" their list while talking to someone in the supermarket in the following simulated conversation:

 

(E.G.)  "I seem to be on this fruit kick lately, so I wanna get  BANANAS,  APPLES, GRAPES....."  (almost as if nodding while marking off their checklist: BANANAS (nod, uh huh, got 'em), APPLES (uh huh)... etc...so you end up with what looks like a slower and pasted version of the E/A result, which was, ironically, displayed so quickly.

 

 

@apersson850  ... the best answer I can give you for my thoughts on your question is this:  while I agree that is great to have TI BASIC always positioning the user at the same location consistently and reliably at the bottom left of the screen upon start up, for other things, like the TI BASIC programs I intend to experiment with, upon program execution, I really don't want to see a list starting at that same aformentioned bottom left spot and then it calculator-rolling and scrolling that info upwards. Rather, I would prefer to see a list by first a screen clearing, a positioning at its upper most left location, and then the 4a either block listing downward flush at the margin or even the character line LEN spewing but then a vertically moving downward line by line motion.  In short... exactly what HOME AUTOMATION just marvelously showed in both of his video clips.   


 

Edited by newTIboyRob
  • Thanks 1
Link to comment
Share on other sites

59 minutes ago, newTIboyRob said:

Rather, I would prefer to see a list by first a screen clearing, a positioning at its upper most left location, and then the 4a either block listing downward flush at the margin...

OK, so it's mainly for aesthetic reasons, then. Do you envision the list to always fit on the screen? Since if you don't, after 24 lines you have the same issue again, and also with all the other computers you mentioned. The list will start scrolling upwards, with new data being inserted at the bottom.

If the list always fits on the screen I understand your desire. Then I recommend Extended BASIC and DISPLAY AT as the quickest way to victory.

  • Like 2
Link to comment
Share on other sites

6 minutes ago, newTIboyRob said:

@apersson850  ... the best answer I can give you for my thoughts on your question is this:  while I agree that is great to have TI BASIC always positioning the user at the same location consistently and reliably at the bottom left of the screen upon start up, for other things, like the TI BASIC programs I intend to experiment with, upon program execution, I really don't want to see a list starting at that same aformentioned bottom left spot and then it calculator-rolling and scrolling that info upwards. Rather, I would prefer to see a list by first a screen clearing, a positioning at its upper most left location, and then the 4a either block listing downward flush at the margin or even the character line LEN spewing but then a vertically moving downward line by line motion.  In short... exactly what HOME AUTOMATION just marvelously showed us in both of his video clips.   

 

I guess the problem some of us are having understanding your fixation on starting at the top and insisting that the cursor line move down is that, once the cursor gets to the bottom of the screen, precisely the same thing happens in both scenarios, the screen scrolls up with the cursor always on the new bottom line. If it is your wish to tweak XB and/or TI Basic so the command line operates like other Basic systems of your acquaintance, that cannot be done. If you want to treat the screen like a form on which everything fits with no scrolling, then using XB’s DISPLAY AT is, indeed, your friend. It is a bit more challenging with TI Basic, but doable, as @HOME AUTOMATION has shown.

 

Of course, you could dig into one of the TI-99/4A implementations of Forth: TI Forth, TurboForth, fbForth, CAMEL99 Forth (see the TI-99/4A development resources thread for these and a host of other options. You can clear the screen and place the command cursor wherever you like—but, of course, they are not Basic.

 

...lee

  • Like 5
Link to comment
Share on other sites

All valid points here, and of course @apersson850 you are all correct in that once 24 items is reached, then, indeed, the screen starts scrolling upwards anyway. It's true, yes, I was thinking more along the lines of things that were less than 24 items, which I didn't actually specify, so I can understand your being puzzled at why I was asking what I was asking. But I wouldn't exactly call it a fixation either... more of just a desire to start fresh at the top of a screen and print downwards from there, that's all... the same way when in actual life you have a bunch of stuff written on a sheet of paper and you just want to turn the page and start with a fresh sheet for the next ideas you may have if the lines on the list were quite long and detailed.

 

What I always liked to do in those other basics to get around this is use the INKEY$ command when using my IBM or the GET command in Applesoft Basic.  I just found, and still find those handy as you can position them at line 23 on the screen and insert an input command allowing the user, for example, to "PRESS ANY KEY TO CONTINUE"  (something we are all familiar with) and then, when the key is struck, the process of clearing the screen and listing can continue. Very handy when you have a disk containing more than 24 files, whose list, which when running a directory listing, goes whizzing by at warp speed. I still use those commands to this day and will likely use that in with the TI as well.

 

Speaking of which... I was reading about the PROMPT command and getKEY commands, but wasn't sure if you can achieve this same wait-for-a-keypress concept in either TI Basic or XB, or if you first have to be in the Program Editor? I found this confusing and was hoping to just use either TI Basic or XB Basic only. Perhaps someone can clear this up for me?

 

Nonetheless, great stuff here, so thank you everyone :) 

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

RXB 2001 had CALL KEY("",5,K,S) which would just do nothing till any key is pressed.

 

CALL KEY("123",5,K,S) would ignore all keys except keys 1 2 and 3

As you can see here this like a CALL KEY & IF key THEN exit ELSE loop

 

In RXB 2015 CALL ONKEY was added 

 

10 CALL ONKEY("1A2B3C",5,K,S) GOTO 100,200,300,400,500,600 :: GOTO 10 

Ignores any keys except 123 and ABC

KEY 1 GOES TO 100

KEY A GOES TO 200

KEY 2 GOES TO 300

KEY B GOES TO 400

KEY 3 GOES TO 500

KEY C GOES TO 600 

As you can see this one is like CALL KEY & IF key THEN CASE string character GOTO line number

 

I think these are pretty similar to INKEYS or GETKEY

Edited by RXB
Spelling
Link to comment
Share on other sites

If you use INPUT in TI BASIC (or Extended), then the program will stop and wait forever, if you don't press Enter to actually do that, enter something. The same goes for ACCEPT in Extended BASIC. The difference is that you can position your input field at any location, with ACCEPT AT, similar to DISPLAY AT for output.

But in BASIC (any version) there is a CALL KEY statement you can use. It will read the keyboard on the fly, without stopping program execution. So you could for example PRINT a list (those that start from the bottom, you know 🙂 ) and between each PRINT statement put a CALL KEY, which can be used to halt the printout and scrolling until you press once more.

 

Adding to all the Forth suggestions above, I'll go forth (pun intended) and state that also Pascal has the traditional habit to start executing writeln statements at the top of the screen. Takes more hardware on a real machine. If you emulate it doesn't matter.

Link to comment
Share on other sites

I am using the classic actual 1981 4a and just have the TI Extended Basic cartridge, not RXB 2001 or RXB2015, so no CALL ONKEY, but yes that was the same concept. Good to know info on CALL KEY, so I will look into that and try to put it in when I can resume experimenting next week.

 

When Gary mentioned the Personal Record Keeping, I think now I must have seen the 2 minute video on it and that was what subconsciously put the idea behind all this in my mind and must have gotten me thinking about this printing list quest I sent us all on in this thread!

 

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

On 1/21/2024 at 3:38 AM, HOME AUTOMATION said:

EA3...

       DEF  PRINT
       REF  VMBW
W1     TEXT 'BANANAS'
W2     TEXT 'APPLES'
W3     TEXT 'GRAPES'
 
PRINT  CLR  R0
       LI   R1,W1
       LI   R2,7
       BLWP @VMBW

 

I don't understand why you don't need the >60 offset for characters in VRAM in this version, as you did in the XB version below... ?

Link to comment
Share on other sites

4 hours ago, SteveB said:

I don't understand why you don't need the >60 offset for characters in VRAM in this version, as you did in the XB version below... ?

Because you run it with the E/A cartridge, which has a normal (unbiased) ASCII character set.

  • Like 1
Link to comment
Share on other sites

11 hours ago, newTIboyRob said:

Speaking of which... I was reading about the PROMPT command and getKEY commands, but wasn't sure if you can achieve this same wait-for-a-keypress concept in either TI Basic or XB, or if you first have to be in the Program Editor? I found this confusing and was hoping to just use either TI Basic or XB Basic only. Perhaps someone can clear this up for me?

 

Nonetheless, great stuff here, so thank you everyone :) 

In TI BASIC, you have 2 options.  You can use INPUT and just tell the user to press Enter (this will cause the screen to scroll however).

Otherwise you can use CALL KEY in a loop.

 

150 PRINT "PRESS ANY KEY TO CONTINUE"

160 CALL KEY(0,K,S)

170 IF S=0 THEN 160

 

This will keep the program "paused" until you hit a key.  It will throw the key away that you pressed (you can retrieve it if you wanted it by looking at K) but will move on if you press any key.  Doing it this way doesn't cause a scroll also.

 

As others have mentioned, the Personal Record Keeping and Statistics modules are actually TI BASIC programs in a cartridge.  TI added extra subprograms to allow for the equivalent of DISPLAY AT and ACCEPT AT to the module for the program itself to use, but they are callable to you if you put the module in and then select TI BASIC.  You can find some examples of how to use them on the whtech site.

 

Another good example of how to do things in TI BASIC - If you can find the "Oldies but Goodies Games I" cassette or disk - one of the games in this collection is "Word Scramble"  Word Scramble does some interesting data entry techniques within plain TI BASIC, by accepting screen input on certain lines on the screen, using CALL GCHAR and CALL HCHAR, and plotting the cursor (character code 30) on the input line.  It would be useful, if you wanted to study controlled input in TI BASIC.

 

TI BASIC and Extended BASIC, however, will never start text at the "home" position and print down the screen until hitting line 24.  It just doesn't have the ability to do that.

  • Like 2
Link to comment
Share on other sites

1 hour ago, Casey said:

In TI BASIC, you have 2 options.  You can use INPUT and just tell the user to press Enter (this will cause the screen to scroll however).

Otherwise you can use CALL KEY in a loop.

 

150 PRINT "PRESS ANY KEY TO CONTINUE"

160 CALL KEY(0,K,S)

170 IF S=0 THEN 160

 

This will keep the program "paused" until you hit a key.  It will throw the key away that you pressed (you can retrieve it if you wanted it by looking at K) but will move on if you press any key.  Doing it this way doesn't cause a scroll also.

 

As others have mentioned, the Personal Record Keeping and Statistics modules are actually TI BASIC programs in a cartridge.  TI added extra subprograms to allow for the equivalent of DISPLAY AT and ACCEPT AT to the module for the program itself to use, but they are callable to you if you put the module in and then select TI BASIC.  You can find some examples of how to use them on the whtech site.

 

Another good example of how to do things in TI BASIC - If you can find the "Oldies but Goodies Games I" cassette or disk - one of the games in this collection is "Word Scramble"  Word Scramble does some interesting data entry techniques within plain TI BASIC, by accepting screen input on certain lines on the screen, using CALL GCHAR and CALL HCHAR, and plotting the cursor (character code 30) on the input line.  It would be useful, if you wanted to study controlled input in TI BASIC.

 

TI BASIC and Extended BASIC, however, will never start text at the "home" position and print down the screen until hitting line 24.  It just doesn't have the ability to do that.

The screen location of the cursor is the same location as used by GCHAR, HCHAR, VCHAR, PRINT, DISPLAY, INPUT, and ACCEPT.

I have been writing GPL for XB for over 25 years now so I think I know how this works.

>837E and >837F are the ROW:COLUMN locations and >837D will contain what ever is at that location during each interrupt. 

So there is a HOME in GPL called YPT and XPT which are >837E and >837F on each interrupt.

Thus if you poke (CALL LOAD) and CALL PEEK >837D you will get what ever character is at that location.

You could use this method as a substitute for GCHAR, HCHAR and VCHAR if you wanted. (Single character at time)

 

Now commands like PRINT and DISPLY and INPUT will all be at bottom of screen at 3rd character over from left by default, thus TAB will offset it over to right.

 

You will find all this in RXB 2001 GPL source code. Same code you will find in XB and very close to same routines as used by TI Basic.

Link to comment
Share on other sites

Once again, and time and time again in fact... @Casey...  provides helpful, useful and simple to follow information. He always just hits a straight bullseye. Thanks!!!

 

Naturally now I'm wondering if anyone has a copy of this Oldies But Goodies Games I either on cassette (which, if possible, I could load into memory and save on my Nanopeb as I did with the TI CALC), or just straight usable with the Nanopeb?   That and even the Personal Records Keeping sound kind of cool.

Link to comment
Share on other sites

58 minutes ago, RXB said:

The screen location of the cursor is the same location as used by GCHAR, HCHAR, VCHAR, PRINT, DISPLAY, INPUT, and ACCEPT.

Bearing in mind that, outside of GPL, screen positions for G/H/VCHAR and PRINT/DISPLAY/INPUT/ACCEPT are off by two for the latter as the *CHAR subprograms deal in absolute screen coordinates, while the others deal in printable screen area, which cuts off two characters on each side of each row.

 

e.g. DISPLAY AT(1,1) cursor position is equivalent to CALL HCHAR(1,3,...)

  • Like 2
Link to comment
Share on other sites

4 hours ago, OLD CS1 said:

e.g. DISPLAY AT(1,1) cursor position is equivalent to CALL HCHAR(1,3,...)

In normal XB and Basic this is very true.  If the OP wants to use any other flavor , XB256 and RXB can display on the 32 character screen.
XB256:   CALL LINK("DISPLY",1,1,"This is the text")
RXB:     CALL HPUT(1,1,"This is the text")
 

Link to comment
Share on other sites

5 hours ago, newTIboyRob said:

Naturally now I'm wondering if anyone has a copy of this Oldies But Goodies Games

http://ftp.whtech.com/Cassettes/Oldies_But_Goodies/

 

5 hours ago, newTIboyRob said:

That and even the Personal Records Keeping sound kind of cool.

http://ftp.whtech.com/Cartridges/MAME/zip/perrec.zip

 

 

If you're a math nerd like myself you might like the Statistics cart as well, which is mostly compatible with Personal Record Keeping

 

http://ftp.whtech.com/Cartridges/MAME/zip/statistc.zip

Link to comment
Share on other sites

Those Directory entries for Oldies but Goodies, are truncated.

If you point at one, its full name/path should show in the status bar...

 

./Cassettes/Oldies_But_Goodies
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_II_Hidden_Pairs.wav
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_II_3D_Tic_Tac_Toe.wav
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_II_Peg_Jump.wav
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_II_3D_Hammurabi.wav
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_1_Factor_Foe.wav
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_1_Number.wav
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_1_Biorhythm.wav
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_II_Word_Safari.wav
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_1_Tic_Tac_Toe.wav
./Cassettes/Oldies_But_Goodies/Oldies_But_Goodies_Games_1_Word.wav
 

Texas Instruments TI-99 4A [TOSEC]/Command Modules/Personal Record Keeping (1979)(Texas Instruments)[PHM 3013].zip

 

Texas Instruments TI-99 4A [TOSEC]/Command Modules/Statistics (1979)(Texas Instruments)[PHM 3014].zip

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