Jump to content
IGNORED

Text viewer for TI99


fablug

Recommended Posts

Hello there,

I am looking for a simple text viewer (possibily in 40 cols) to open text files on my real console (not emulator).
As far as I know, text files on disks are usually plain text readable from TI-WRITER (a sort of standard for the TI99).
Sometimes you can find instructions, tips or notes coming in the very same disk where program or utility are stored.
So I would like to have a quick viewer I could run from BASIC (probabily XB) so I can open files, read and flip through pages very quickly and (possibily) look for a word/text, then exit and return to BASIC or XB. 
I know I can write a simple BASIC program where OPEN #/INPUT # function could read the file but it's too slow and most of files are 40 cols formatted. So I assume should be in assembler and run with a CALL LOAD (?)
Is there any program like that? Thank you.

 

Link to comment
Share on other sites

The Stevie text editor allows you to go back and forth between TI BASIC (not XB) and the editor, but it does require the Finalgrom 99 cartridge and the F18A VGA upgrade for 80 columns. This is as close as you will get to what you are asking for. You cannot use assembly routines with TI BASIC, at least not without some advanced contortions.

 

Link to comment
Share on other sites

26 minutes ago, Vorticon said:

The Stevie text editor allows you to go back and forth between TI BASIC (not XB) and the editor, but it does require the Finalgrom 99 cartridge and the F18A VGA upgrade for 80 columns. This is as close as you will get to what you are asking for. You cannot use assembly routines with TI BASIC, at least not without some advanced contortions.

 

Thank you Vorticon. Unfortunately I don't have a F18A VGA so I don't think I could run it.
And yes I assume if any program exists I could only run it through XB, no problem for that.
Thank you anyway for your reply. I'll keep on searching. Fabrizio

Edited by fablug
Link to comment
Share on other sites

I have a utility like that in my Forth system. 

It requires the Editor/Assembler cartridge.

I could roll it up as a standalone program with syntax like:

 

VIEW DSK1.MYFILE

 

Would that work for you?

 

Oops missed the part that you need it to run from BASIC.

  • Like 1
Link to comment
Share on other sites

1 hour ago, TheBF said:

I have a utility like that in my Forth system. 

It requires the Editor/Assembler cartridge.

I could roll it up as a standalone program with syntax like:

 

VIEW DSK1.MYFILE

 

Would that work for you?

 

Oops missed the part that you need it to run from BASIC.

Sure! That'll be great!! 
Thank you very much!
Would it be possibile to run it from a EA5loader in XB ?

Edited by fablug
Link to comment
Share on other sites

7 hours ago, fablug said:

I am looking for a simple text viewer (possibily in 40 cols) to open text files on my real console (not emulator).

Are you using the standard (Version 110) Extended BASIC cartridge?

Do you have a way to use the newer XB's such as RXB or XB 2.9 G.E.M.?

This can be done from XB with the display in 40 columns, with a return to the normal XB editor.

  • Like 2
Link to comment
Share on other sites

1 hour ago, fablug said:

Sure! That'll be great!! 
Thank you very much!
Would it be possibile to run it from a EA5loader in XB ?

I have tried Tursi's loader and it didn't work with my program image.

I don't know the details why. 

With some extra research I am sure we get it to work but it's an unknown timeline.

 

I will send you something later today. I am out for the afternoon.

And of course the alternative XB environments have a lot more features than standard XB so that might be a better way to go. 

But we can get you something to try.

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, senior_falcon said:

Are you using the standard (Version 110) Extended BASIC cartridge?

Do you have a way to use the newer XB's such as RXB or XB 2.9 G.E.M.?

This can be done from XB with the display in 40 columns, with a return to the normal XB editor.

Hi, yes I got them all on my FG99.
I know they have commands to switch to 40 cols, then I assume I must write the XB program to load the file but I think it would be quite slow. So if you have to visit page #10 for instance it would take a lot of time, wouldn't it? 
I was looking for a "universal" reader which could work on Version 110 also because I have a real TI Extended Basic cartridge I use quite often.
If it's not possibile, never mind 😊 I'll learn how to write one (maybe in a couple of years 😁)

 

Thank you! 

Link to comment
Share on other sites

1 hour ago, TheBF said:

I have tried Tursi's loader and it didn't work with my program image.

I don't know the details why. 

With some extra research I am sure we get it to work but it's an unknown timeline.

 

I will send you something later today. I am out for the afternoon.

And of course the alternative XB environments have a lot more features than standard XB so that might be a better way to go. 

But we can get you something to try.

 

No hurries! Thank you very much. I thought I made a very simple question but apparently it's a bit tricky to find a viewer 😅

Link to comment
Share on other sites

1 hour ago, senior_falcon said:

This is not exactly what you want, but it is a compact 1 line program. It might work for you until something better comes along:

 


10 INPUT A$ :: OPEN #1:A$ :: ON ERROR 10 :: FOR I=1 TO 10000 :: LINPUT #1:A$ :: I=I+EOF(1)*10000 :: PRINT A$ :: NEXT I :: CLOSE #1

 

Thank you! 😊 

Link to comment
Share on other sites

1 hour ago, senior_falcon said:

This is not exactly what you want, but it is a compact 1 line program. It might work for you until something better comes along:

 


10 INPUT A$ :: OPEN #1:A$ :: ON ERROR 10 :: FOR I=1 TO 10000 :: LINPUT #1:A$ :: I=I+EOF(1)*10000 :: PRINT A$ :: NEXT I :: CLOSE #1

 

Thank you Senior Falcon, very compact. It's faster than the one I wrote in XB! 

10 minutes ago, TheBF said:

Might want to add a test for space-bar that stops the screen and waits for another space-bar. ?

 

Thank you for your help TheBF. Don't worry, I think I know how to test for space-bar. I really appreciate your help.
BASIC/XB programs are ok if you have only few lines, otherwise you have to wait too much if the file is long and you have to reach the end.
That's why I think the ultimate solution would be a E/A program which loads instantaneously every page after you push a button. 

Edited by fablug
Link to comment
Share on other sites

46 minutes ago, TheBF said:

Might want to add a test for space-bar that stops the screen and waits for another space-bar. ?

 

Hold down any key to pause the listing and release to resume. This is still just 1 line. I know it isn't exactly what the OP wants, but it sure is fun to see how much utility you can pack into a single line. I am using FOR/NEXT loops instead of GOTO, with some trickery to kick out of the loop.

My favorite one line program is still the disk cataloger.

 


10 INPUT A$ :: OPEN #1:A$ :: ON ERROR 10 :: FOR I=1 TO 10000 :: LINPUT #1:A$ :: I=I+EOF(1)*10000 :: PRINT A$: :: FOR J=1 TO 1 :: CALL KEY(0,K,S):: J=J-ABS(S):: NEXT J :: NEXT I :: CLOSE #1

 

  • Like 3
Link to comment
Share on other sites

2 hours ago, fablug said:

That's why I think the ultimate solution would be a E/A program which loads instantaneously every page after you push a button. 

Reading from a floppy disk would never be instantaneous. 

We could read the records into a buffer and the blast them onto the screen real fast, but the read would still be delayed each time.

  • Like 1
Link to comment
Share on other sites

7 hours ago, TheBF said:

I have tried Tursi's loader and it didn't work with my program image.

I don't know the details why. 

With some extra research I am sure we get it to work but it's an unknown timeline.

The most likely reason is uninitialized data in your application. Do you have any variables that you just assume to start at 0 rather than explicitly setting it to 0?

 

Otherwise, it /should/ work. It doesn't use any of the 32k RAM space once loading begins, all faults we've seen are programs that assume a memory address (especially in scratchpad) would have some specific setting before the program starts.

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Here is a simple viewer with space bar stop/start that is an E/A5 Program.

It needs both files. 

It starts up on Turis's loader but doesn't run.

That's my homework.

 

Edit: I realized you might also want a DIR to see which files to view so I added that to this version. (It only added 208 bytes) 

 

 

 

 

VIEWES VIEWER

  • Like 2
Link to comment
Share on other sites

2 minutes ago, Tursi said:

The most likely reason is uninitialized data in your application. Do you have any variables that you just assume to start at 0 rather than explicitly setting it to 0?

 

Otherwise, it /should/ work. It doesn't use any of the 32k RAM space once loading begins, all faults we've seen are programs that assume a memory address (especially in scratchpad) would have some specific setting before the program starts.

 

Thanks.  I need to stare at the debugger for a bit. ;)

 

Link to comment
Share on other sites

I tried this in Editor/Assembler and it worked fine.

With XB 2.7 and XB 2.9 G.E.M., you can do CALL MLOAD("DSK2.VIEWER",1)

The program loads and the program starts up, showing

DV80 File Viewer

Usage:

etc.

But then it hangs and the cursor never appears. appears briefly, then disappears.

 

If you could send me the object code then I should be able to make an XB loader for the program that would be universal for any XB. This assumes you are using relocatable object code.

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

1 hour ago, senior_falcon said:

For what it's worth, VIEWER loads and runs fine in Extended BASIC using the Funnelweb EA5 loader.

Thanks for doing the research.

I would like a copy of that loader. Where can I find it?

  • Like 1
Link to comment
Share on other sites

>It starts up on Turis's loader but doesn't run.

 


I don't fully make sense of it, but the last sequence is part of this scratchpad code, the execution loop? 

8388: MOV *R7+,R9
838A: MOV *R9+,R8
838C: MOV *R8+,R5
838E: B *R5

The loop seems to run fine for a bit, but in the final loop (post increment) R7 is >FF40, R9 is >DC0B, and R8 is >0002 (implying R8 got 0). This loads R5 with >83E0, which is the boot vector workspace, and it jumps there to crash. You can get the crash quickly in Classic99 by setting Debug->Break on Illegal Opcode in the debugger... but it'll probably take working backwards from there to see why it did that.

Remember you can log writes to a memory location, so you could get a pseudo trace by logging your registers... maybe it'll help. Looks like it's not in the manual but it is in the '?' box - use L0000=# -> 0000 is the address you want to log all writes to, and # is a number from 1-9 that will be used to name the disk file. (In testing, this seems to log only bytes, it might not be as useful, I meant it mostly for capturing speech data ;) )

 


 

 

Edited by Tursi
Link to comment
Share on other sites

9 hours ago, senior_falcon said:

For what it's worth, VIEWER loads and runs fine in Extended BASIC using the Funnelweb EA5 loader.

Where can I find Funnelweb EA5 loader?  I knew only Tursi's loader.
 

11 hours ago, TheBF said:

Here is a simple viewer with space bar stop/start that is an E/A5 Program.

It needs both files. 

It starts up on Turis's loader but doesn't run.

That's my homework.

 

Edit: I realized you might also want a DIR to see which files to view so I added that to this version. (It only added 208 bytes) 

 

 

 

 

VIEWES 2.13 kB · 5 downloads VIEWER 8.13 kB · 5 downloads

Thank you, unfortunately cannot make it work. In XB version 110 loads up (using Tursi's loader) but then hangs up.
I tried on XB 2.7 and XB 2.9 GEM (CALL MLOAD) but it doesn't work either.

 

 

EDIT: I RUN IT IN Editor Assembler and works fine!! Thank you. I was just wondering how to exit from the program (which key?) as FCTN-QUIT is disabled.

Edited by fablug
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...