;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; KosMon - A Machine Language Monitor for C64 and PET. ;; ;; (C) 1986-1996 by Olaf Seibert. All Rights Reserved. ;; May be distributed under the GNU General Public License. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; A short manual for Kosmon. ------------------------- Kosmon comes in several varieties. Among those are C-64 and PET versions, having some different set of features depending on assembly options. There is built-in autorepeat available in the 3032 version, because you really need it. The cursor is not visible very well, it seems, even though on the 8032 this is a lot better. Perhaps this is fixable. Almost all commands consist of 1 letter followed by arguments. All numbers are in hex unless noted. Addresses are 4 digits, bytes are 2 digits. In general spaces between command arguments can be left out. .? Shows all existing commands. .? Calculates the value of . Possible operators are + (add), - (subtract), ! (or), & (and) and % (eor). Numbers are decimal unless prefixed with a $. There are no parentheses but you can give multiple operations: .? 1 + 2 - 3 % 4 ! 6, which are evaluated left-to-right. The result is printed in both hex and decimal. .A Simple assembler that accepts the same syntax as the disassembler produces. Prompts for the next address. .B Bank selector (only when appropriate to machine and assembly options) For the 64: a single hex digit, of which the low 3 bits are placed in $01 for memory operations. For the PET with 64K expansion: a byte to be placed in $FFF0. For the meaning see "PetIO.doc". In all cases bank F (or 0F) means Floppy. The current device is presumed to be a 2040-compatible drive (accepting M-R and M-W commands). Addresses below 4800 or above C000 are accessed in the drive, those between are in the computer in bank 6 (64) or 0 (PET) (they are not interesting in the drive) to allow transfer of memory contents. .B Prints currently set bank number. Bug: On the PET, prints 00 even when set to 0F, because the "floppy" bank is really remembered separate from the internal bank number. .C Compare memory ranges, including the end address. Prints all addresses that differ. .D () Disassemble memory. You can scroll and modify the bytes. A line of dashes may be printed below unconditional jumps (JMP, RTS, RTI, BRK) if this is assembled in. ., (scrollable) Modify the bytes of the disassembly (not the disassembly itself). As a special feature, hitting STOP on a line with a jump or branch, or a JSR or RTS, the target address will be disassembled. If it is a JSR, the "return" address will be put on a stack, and you can go back (before reaching the RTS) with shift-STOP. .EC .[ <8 bits> (scrollable) Edit Character .ES .] <24 bits> (scrollable) Edit Sprite These commands are 64 only. A bitmap representation with . for 0 and * for 1 is printed and can be edited. .F Memory from up to and including is filled with . .G Go: jump to . A RTS will return to the invoker of the monitor, a BRK returns to the monitor itself. .GF Go: in the disk drive. A memory execute (M-E) command is sent. .H .H ' Hunt memory for the bytes or string. All matching addresses are printed. .I Initialise I/O chips. Mostly useful on the 64. .J Jsr to the . RTS returns to the monitor. .K () Ascii (petscii) dump of memory. .> " (scrollable) Edit ascii (petscii) dump of memory. .< " (not scrollable) Edit screen code dump of memory. .L "" () Load the file from the current device (at the given address, if specified). On the PET, the original load address is printed and the actual end address (+1). .M () Hex and ascii (petscii) dump of memory. .: (scrollable) Edit hexdump of memory. .P Prefix to print the output of the command to device 4. .R Register dump: PC IRQ PP DR AC XR YR SP NV#BDIZC .; 1234 5678 01 02 03 04 05 06 .**..**. PC: the Program Counter on entry. AC: the Accumulator XR: the X register YR: the Y register SP: the Stack Pointer NV#BDIZC: the individual bits of the Status Register: Negative, oVerflow, unused, Break, Decimal mode, Interrupts disabled, Zero, Carry. * is set, . is clear. IRQ: The IRQ vector PP: the processor port (bank) register as used when not using the setting from the .B command. DR: the current drive device number. Set to 8 if not already at least 8. .; Modify saved register dump. .S "" Save the file to the current device, starting at , up to and not including . .T Transfer (copy) memory ranges, including the end address. .V "" () Verify the file on the current device. Same syntax as .L. .X eXit. .Y Hunt though memory, disassembling and trying to find the bytes in the arguments. .@ Disk commands. .@$ displays a directory (with usual arguments: @$0:?ile*=seq : * and ? wildcards, =seq file type matching), just .@ reads the error channel. If F1-F8 are available, they are mapped as follows: F1 " :",cr F3 "M0000",cl,cl,cl,cl F5 "B0",cr F7 "@$0",cr F2 cu,cr+128,".A ",cri,cri,cri,cri," " Convenient to change a line from .D to edit the assembly code. F4 "B7",cr F6 "BF",cr F8 "@$1",cr -Olaf. -- ___ Olaf 'Rhialto' Seibert rhialto@mbfys.kun.nl What's the use of \X/ racism if you can't even see if a person belongs to your abhorred kind? vi:tw=72