Text file viewer
Posted: Mon Nov 07, 2016 7:28 pm
I am wondering if there an existing text file viewer which works with SD2IEC drives?
The SD card I use with my VIC has a mirror of the zimmers.net site on it, including text files. It would be nice to be able to read the text files on the VIC ...
I started out with a simple BASIC prototype that can open a SEQ file and print it to the screen - either directly (for PETSCII files) or with uppercase and lowercase swapped (for ASCII files from the net.) It works nicely but is as slow as you would imagine. Actually it would work nicely as a Tel-e-Prompt machine - it prints at about human reading speed!
So I did a quickie assembly language version calling the KERNAL routines SETNAM, SETLFS, OPEN, CHKIN, CHRIN, READST, CLOSE etc. It is, of course, much faster, especially if I pre-load SJLOAD! It is also nice in that it doesn't care about file length - I can display files of any length I believe (have tried a 170KB ASCII file anyhow.)
A couple of questions sprint to mind. Is there any way to seek into an existing text file to allow jumping around in the file, or do I have to read it sequentially? I guess if we can seek then we can no longer handle super-long files!
Also, any easy way to integrate with SJLOAD so I don't have to manually pre-load it, reset and then SYS45056 ... ?
The SD card I use with my VIC has a mirror of the zimmers.net site on it, including text files. It would be nice to be able to read the text files on the VIC ...
I started out with a simple BASIC prototype that can open a SEQ file and print it to the screen - either directly (for PETSCII files) or with uppercase and lowercase swapped (for ASCII files from the net.) It works nicely but is as slow as you would imagine. Actually it would work nicely as a Tel-e-Prompt machine - it prints at about human reading speed!
So I did a quickie assembly language version calling the KERNAL routines SETNAM, SETLFS, OPEN, CHKIN, CHRIN, READST, CLOSE etc. It is, of course, much faster, especially if I pre-load SJLOAD! It is also nice in that it doesn't care about file length - I can display files of any length I believe (have tried a 170KB ASCII file anyhow.)
A couple of questions sprint to mind. Is there any way to seek into an existing text file to allow jumping around in the file, or do I have to read it sequentially? I guess if we can seek then we can no longer handle super-long files!
Also, any easy way to integrate with SJLOAD so I don't have to manually pre-load it, reset and then SYS45056 ... ?