
The OPEN statement opens a file to the printer (device 4) and the CMD statement diverts to the printer all output that would normally go to the screen. After loading Micromon and performing a NEW, you could enter these commands and press RETURN: OPEN 4, 4 : CMD 4 To illustrate say that you are using Micromon, which starts at location 49152, and you want a printed disassembly of the first 32 bytes of the program, in locations $C000–$C020. Supermon and Micromon don't support printer output or general diversion, but there's still a way to accomplish the job. The printout lets you see more than one screenful of information at a time and can also be annotated with comments.Ī few monitors provide a separate command for printer output (typically, P) or one for generally diverting output (typically, O). If you're examining a long program, for instance, it's much easier to deal with a printed disassembly rather than a disassembly on the screen.
Commodore sidplay how to#
Note that all loads from a monitor are nonrelocating: The data goes into the same memory area it was originally saved from.Īnother useful trick is knowing how to divert the monitor's output to a disk file or to a printer. L "TEST", 08Īgain, some monitors may expect to see the device number in front of the filename, or they may insist on a space where the comma appears. To load a file, you need only specify the filename and device number. Other monitors may use a slightly different syntax. Whereas Supermon 64 insists that the last four parameters be separated by commas, Micromon expects them to be separated by spaces. S C000 C021 "TEST" 08Īll the same parameters are present, simply in different order. Here's the syntax for saving the same program using "Micromon," another popular Commodore 64 monitor. If you are using the Commodore 128's built-in machine language monitor, the syntax of the save command is the same, except that commas are not needed and you need not put a leading zero in front of the 8. This peculiarity is common to most Commodore monitors. Notice that the ending address is actually one byte beyond the last byte that you want to save. After the filename come three parameters: the device number (use 08 for disk, 01 for tape), the starting address, and the ending address. The S command stands for Save, and the name inside quotation marks can be any legal Commodore filename. Of course, you would substitute your filename for TEST. (The monitor program supplies the period at the beginning of the command you type the rest.) Here is the syntax to use from "Supermon 64:".

Say that you want to save a program that occupies memory locations $C000–$C020. I am using a program called "Supermon 64."Īll Commodore machine language monitor programs use similar commands for saving, but the syntax differs slightly from one monitor to the next. I have been trying to teach myself to program in machine language, but I haven't been able to figure out how to get my monitor to save the programs I write.
