Supermon Instructions If you want to call your routine from BASIC with SYS, then make sure you put an RTS (ReTURN from Subroutine) at the end. If you want to jump straight back to the monitor, use BRK (BReaK) instead. Learn to think in hexadecimal (base 16, which is 0123456789ABCDEF, and is represented with a $ in front of the number). Hex numbers should always be two or four digits long, e.g., a number 0-255 is represented as $EA for example, while an address is four digits ($C000 is $C*4096 + $0*256 + $0*16 + $0 = 49152). Commands -------- Most monitors use a command prompt, either a "." or a ">" to show you are using the monitor instead of BASIC. From this prompt you can then enter single-letter codes followed by memory addresses or numbers. A (Assemble) The assemble command converts mnemonics (like BRK, RTS) into numbers in memory. You use it like this: A C000 LDA #00 (then press Return) A C002 (Supermon will print up the next address automatically; press Return on a blank address to stop assembly.) D (Disassemble) This is the reverse process - you can tell it to look at a single location or between two like this: D C000 C200 F (Fill memory) Specify a start address, an end address, and the value to fill with: F 033C 03FF 00 G (Go) This starts a machine language program. Execution continues until BRK (return to the monitor) or RTS (return to BASIC) is encountered. G C000 H (Hunt memory) Searches memory from the specified start to end address, for a series of values or ASCII text. For example: H E000 FFFF 90 (looks for $90) H E000 FFFF "BASIC (looks for the word BASIC) L (Load) Simply tell the monitor the filename and which device number. (Supermon cannot relocate a file, but see the transfer command.) L"FILE",08 (or 01 for tape) M (Memory display) This displays ASCII characters for an area of memory. You can edit using the CRSR keys, and then press RETURN to store the new values in memory. M A09E A0EE (shows commands in memory) R (Register display) The register display shows the setting of important locations and "flags" inside the computer. The registers displayed are as follows: PC - Program Counter (where the last instruction was taken from) A,X,Y - Accumulator, X register, Y register (used for manipulating numbers) SR - Status Register (contains the various flags, laid out like this: NV-BDIZC N=negative V=overflow B=break D=decimal mode (do not alter!) I=interrupt disable Z=zero C=carry) S (Save) Saves a block of memory, but remember--the last byte is not saved! Always increase the end address you need to save by one. S"NAME",08,C000,C200 saves a file called NAME to device 08 (disk). It will contain the contents of memory fro $C000-$C1FF inclusive. T (Transfer) Moves a block of memory to a new location. Care must be take to ensure all the information is included, e.g., you may be able to move memory by one byte backwards or forwards. T C000 C200 C300 Transferring a block of memory does NOT change all the references in the code. You will need to check that it still works. Branches such as BNE (Branch Not Equal) will be O.K.; other instructions like STA and JMP will need to be changed. X (eXit to BASIC) This returns you to BASIC.