Documentation for M.COM/M.MAC Purpose: Calling Apple monitor routines from PCPI CP/M Created: 07/17/83 (Fred Meyer) M.COM is intended to be used in conjunction with MONCALL.DVR in the PCPI Appli-card environment. Installation consists of merely installing MONCALL.DVR into the DRIVERS file of the boot disc. Do not change the device number of MONCALL (currently #29) unless you also change the MONDEVICE equate in the M.MAC file. The monitor calling sytem was designed so that most of the code resides in the 6502. Only trivial routines are needed in the Z80. This allows the monitor calling routine to be included in other Z80 debuggers and utility programs with little programming. If 0 i sen t th outpu subroutin o devic #29 the th monito i entered unconditionally Whe i th monitor B006 wil re-ente CP/ whereve you left it. No warm boot takes place. To call a the monitor function directly, simply send the monitor string you want executed to the output subroutine of device #29, and set the hi-bit on the last character sent. The 6502 will handle setting of the hi-bits, linefeed supression and return to the Z80. If an erroneous string is sent to the Apple, you will unconditionally enter the monitor. However, entering B006G will return you to wherever you were in the Z80. Look at the M.MAC file to see how it works. All character input and output is through the current console I/O device. So if you have an external terminal, 80 column card or 70 column SOFTVIDEO driver as the current console device, all monitor input and output will occurr through it. Otherwise, the normal Apple screen output is used. Normally, one would type "M " at the CP/M command level to execute in the Apple monitor. After displaying the results (if any) of the command, control is returned to the CCP. If ZCPR2 or another similiar CCP replacement is installed you may have a "GO" command. This command normally executes the program residing at 100h and passes any parameters to it which are typed after GO. Thus after running M.COM once, subsequent calls to the Apple monitor will be much faster if GO is used, since no disk access is necessary. Multiple commands can be executed on one command line by separating them with an "N". For example "M 8E00.8E20 N 9E00.9E20 N AE00.AE20" would display on the current console 3 groups of 20h bytes. However, "M 5000:35 36 37 38 39" would display nothing since there is no outpu expecte fro thi monito command (Nevertheless 35h-3h woul b store starting at 5000h) To enter the monitor unconditionally, type "M". Any normal monitor commands can then be entered, with control always returning to the monitor. To re-enter CP/M type "B006G" at the "*" prompt. (Optionally B000G executes a cold boot and B01EG executes a warm boot) A short tutorial will be displayed on the console if "M" is entered. This may be useful occassionally as a syntax refresher. ...................................................................