MaxZ80 - Chapter 10 In Chapter 3 we talked about the command line SUBMIT CMD SUBMIT.COM is the original CP/M utility which launches a sequence of jobs that are specified in a text file, like CMD.SUB or SKUNK.SUB. SUBMIT.COM is not present here, so the above command will not work and will invoke an "Error Handler" with a message like 4:32 A7:MOTYL>>SUBMIT CMD Command Line Error: Command not found (even by ECP) [ESC - Cancel] [Error] A7:MOTYL>SUBMIT CMD Error Handlers are programs that get run by Z-System when all else fails. The one we have installed here tells you it can't find your command. Even the Extended Command Processor (ECP) couldn't find the command. We mentioned the ECP we are using here when we talked about why CMD.SUB works and does essentially what SUBMIT CMD does, or is supposed to do! This Error Handler gives you a second chance, by retyping the command for you at a new prompt, allowing you to edit your command. There is a program called SUB.COM here, and SUB is a Z-System version of SUBMIT.COM. So I added a line to ALIAS.CMD to equate SUBMIT with SUB. submit sub $* $* means "anything that follows command." The above definition would mean whenever SUBMIT FOO was requested, the command SUB FOO would run. There is a .SUB file in A4:BASIC which compiles and links BASIC programs. When I tried SUBMIT LEE LEE11H it didn't work. The reason was SUB.COM happened to be in A7:MOTYL and I was trying to run this in A4:BASIC. The solution was to put SUB.COM in A1:COMS. The reason this works is A1:COMS is an element in the Z-System "command search path." This is a sequence of up to five drive / user areas that the command processor will look in to find the command it's being asked to run. The PATH utility may be used to set or view the search path. 8:42 A4:BASIC>>PATH SETPATH, Version 1.1 (Type 4 at C100H) Symbolic DU DIR A1: A1: COMS: $$: A4: BASIC: A0: A0: MOUSE: 8:42 A4:BASIC>> $$ means "the currently logged" directory. Most of the .COM files that are requested have been put in A1:, which, as you can see, is on the path. So that's why I put SUB.COM in A1:. |