This is a BASLOAD project that lets you quickly list the contents of a file.
It auto detects if that file is BINARY or TEXT FILE, and will show a small portion automatically (sort of like a TOP command). You pass the filename on the command line. If you want to see more of the file, add a second command line argument for the amount you want to see (uses bytes for binary files, or screen line numbers for text files).
There are also additional command line parameters to change to using another device number, or forcing the display to binary or text (such as if you want to force it to show the binary version of a text file).
And the output scales to your screen size, using the full available current columns. The default text file stops after one screen height worth (or stops earlier if ESC pressed or end of file is reached).
NOTE: CMDLINE.BAS is a "minimal" example of the setup, as a reference starting point.
Here is a video demonstrating the usage:
https://www.youtube.com/watch?v=l7chJ1AHluk
CAT/TYPE command (with command line arguments)
CAT/TYPE command (with command line arguments)
- Attachments
-
- CMDLINE.BAS
- (5.67 KiB) Downloaded 280 times
-
- CAT.BAS
- (7.77 KiB) Downloaded 310 times
-
- CAT.PRG
- (3.01 KiB) Downloaded 272 times
Re: CAT/TYPE command (with command line arguments)
Updated such that REM is no longer needed. Can just do:
RUN:<arg1> <arg2> <arg3> ... <arg9>
RUN:<arg1> <arg2> <arg3> ... <arg9>