Originally Published by: Fred Dart (The Chief) Port Commodore BBS, 1988.
Part 2: Lt Kernal Commands and Functions
The Lt. Kernal DOS includes a complete set of commands and functions to make life easy for the user. All are fully described in the owners manual. This is an attempt to clarify or simplify some of the language in the manual.
The L command is a great way to load a program into memory. L followed by the filename with no quotes and no other parameters:
L GAME
Will load the program called ‘game’ into memory. This command operates much like the regular LOAD”GAME”,8,1 as it loads the program into the same memory location it was saved from. This can have some unpleasant effects in some cases. For example. I have a C128 connected to my hard drive. I will frequently make changes to programs and save them back to the drive where others can download them. If they are downloaded directly to another hard drive and then loaded into memory on a C64 using the L command the program will be un-listable since it will be loaded into the C128’s BASIC memory location. The solution? Simply load the program normally: LOAD”GAME”,8 and then erase it from your disk: ERA GAME then save it back: S GAME and it will be in the right condition to be L(oaded and LISTed. Another very handy feature of the L command is that it has a companion command, the S command. If a program is loaded into memory using L and then it is modified in some way, simply typing S (with no file name or other parameters) will save it and replace it just as if you had used SAVE”@:GAME”,8 only it is MUCH easier to type and it is SAFE!
As mentioned, the ERA command can be used to erase a file from the disk. If there are a lot of files to erase use AUTODEL.
QUERY NAME will tell you all about the file called NAME. It tells you what kind of program it is (BASIC or ML), what size it is, where it loads in memory and other pertinent information.
TYPE NAME will display the file NAME to the screen. (with 7.1 DOS it will give and option of Screen or Printer). This is a great command, you can examine RELative files, SEQential files or event ML files, just type them to the screen to see what they consist of. It is very handy for REL and SEQ files.
FIND /GOSUB1006/ This command will find all occurrences of the search object that is between two limits, you can use any two de-limiters as long as they are not part of the search string. This is great for modifying programs or finding some particular bit of code you are looking for. Just load your program in and use the FIND command.
RENUMBER can be used to renumber a BASIC program. Another great aid for BASIC programming.
DELETE enables you to delete a range of lines. You can delete from 100- for example, or delete 100-200. The parameters work much like the LIST parameters.
DIR is the simple command to get a directory from your drive but it can be so MUCH more than merely getting a directory. Here are some variations:
DIR +.
Would get a directory of all files beginning +.
DIR 😛
Would direct a PRINT OUT of the directory to your printer.
DIR :PS
Would send a SORTED directory to the printer.
DIR PRO
Would find all programs starting with PRO…such as:
PROTO 0
PROTO 1
PROOF
Etc.
DIR :G L
Would search ALL directories on all LUS and all USERS for any file beginning with L
Another often overlooked but very simple command for C128 users is the command to go into 128 mode: GO128 and the counterpart GO64. It is also possible with a 128 to GOCPM if you have designated an LU as a CPM type.
There are many more commands and features, all described in the manual. When in doubt check it out, you can usually do just about anything you can think of with your drive.
There is a new DOS available, it is 7.1 and is NOT distributed free as the previous versions have been. The reason is that you do NOT NEED 7.1. It has some nice enhancements but it is not NEEDED, the earlier versions have been needed. In my opinion it is well worth the price they are asking for it ($30.00) and if you have not gotten yours yet you should contact Xetec about getting it. Basically, here are the enhancements:
The TYPE command now prints to Screen or Printer
There is a VALIDATE command. It is POSSIBLE (but still not a good idea) to change the size of an LU that has data in it.
There is a RECOVER command that can recover a damaged LU. This in itself is worth the price, if you have ever spent a day or two trying to recover from a damaged LU you will know what I mean. An added note here, RECOVER does work and works well!
LKOFF is a very handy little bit of code that can be invoked to effectively DISCONNECT the hard drive. If you have an application that will not run with the hard drive connected, typing LKOFF will now disable the drive. You will have to perform a RESET to gain access to the drive again. This handy feature is far superior to unhooking the host adapter, or unplugging the host, or turning off the hard drive, now none of those steps are necessary. NOTE: this program (1 block long) is available for downloading from the Fiscal BBS (or Port Commodore) if you do not have DOS 7.1 and are not getting it soon. We use this all the time as we have a terminal program that will not run with the LK attached.
Another really handy command is EXEC. Difficult to describe in detail but just imagine this: We have been running a beta test and have been getting new updated files every couple of days. There are a few minor changes I like to make to a couple of the files to ‘personalize’ them for my BBS. I create a SEQ file with the lines that I want to change as listed from the modified programs I am using, then when I get a new file I just EXEC the mod file and it puts the new lines in just as if I had typed them in from the keyboard.
MERGE would do the same thing, just put the lines together that you want to add to your files, call them MODS or something then MERGE them with the new file, the lines in your MODS program will overwrite the lines in your new file.
And finally there are some real speed enhancements in 7.1–here again, this is worth the price of the whole package so they did not overcharge.
Oh, yeah, the SYSGEN process has been simplified tremendously over the 7.0 SYSGEN as well…..
Speaking of SYSGEN, if you have never performed one the procedure is fairly simple. If you are doing a SYSGEN with any version, 7.0 or earlier, just follow these steps:
1. Shut down the system completely.
2. Disconnect the hard drive from the computer. Either end of the 25 pin connector. Leave the host adapter plugged into the computer.
3. Turn on the computer, wait about one minute for the normal Commodore start-up screen.
4. Plug in the 25 pin cable, thus re-connecting the hard drive to the computer.
5. Turn the hard drive on.
6. Using your BACK-UP disk, type LOAD”0:*”,8,1
7. The procedure should be pretty much self documenting from here on.
NOTE: If you are using a C128 and/or a 1571. Your must follow the first three steps, then type GO64. Once in 64 mode (if using a 1571) type OPEN15,8,15,”U0>M0″:CLOSE15 The remaining steps are the same.
One additional note, if you have put any files on LU 10 you should move them before you begin the SYSGEN process or they will be lost, SYSGEN overwrites all of LU 10.
Following a SYSGEN you MUST go into CONFIG and make sure your LU parameters have not changed. Reset them if necessary from the sheet you wrote them down on when you first configured the system.
If doing a SYSGEN to 7.1 there is an excellent README.TXT file on the distribution disk. It has complete instructions. Follow them closely. Be SURE to VALIDATE each LU after doing the SYSGEN.
These notes are based on our experience with this equipment over the past 18 months. If we can assist you in any way we will be more than happy to try.
A couple of minor additions have come to light since we wrote the files originally. The first involves the #random file that shows up on the drive on occasion. This file is created when any software attempts to directly access a track and sector on the hard drive. Best illustration is when a 128 goes through a software reset and tries to autoboot or load from track 1 sector zero, it will create a #random File. Other software that will create it would be a track and sector editor trying to read a track and sector on the drive. It is perfectly safe to ERA the #random file (it may be created again though). If you have a program that seems to create this file all the time it may be easier to leave it on the drive–it will grow though.
An additional bit of information concerns the C64-C. This computer is not covered well in the owners manual for the Lt. Kernal and you may encounter some difficulty if trying to connect to a 64C. The connections can be made to the 6510. The HIRAM lead should be connected to pin 28, the CAEC lead to pin 5.
An additional thought on SIZING your LUs as well. It is advisable to have one LU set aside as a ‘scratch’ LU, as the manual describes. This LU SHOULD be as large as your largest, just in case you need to copy all the files from your largest LU into it some time, short of that, you SHOULD NOT have one HUGE LU, as it is almost impossible to recover when you have a corrupted LU. You have no place to copy TO!! A safety net is always a good thing to have.
Lt. Kernal is a registered trademark of Fiscal Information, Inc.