Quick docs for JamaicaMON SLJ 1/31/97 sjudd@ffd2.com ------------------------- Last update: 3/13/01 version 4.1: 4.1 just fixes a few minor things, and works correctly with Sirius v2.0. version v4.0: Version 4.0 fixes a few bugs and makes a number of internal changes, the most important of which is a vastly reduced zero-page usage. Jammon now uses just two 24-bit pointers, at $A3 and $A6 or thereabouts. Version 4.0 also includes a new display mode, which is very useful for debugging. In this mode, accessed using "!d", the screen is split into three windows: one displays code, one displays memory, and the third displays the registers. Using this mode, it is possible to visually single-step through code. See the "toggle" section below for more details. v3.2 has, in addition to some bug fixes, full-featured single-stepping, i.e. it follows JMPs and branches and RTS and things like that. v3.0 incorporates PeekPokePatch, making 24-bit load/save possible. PPP also adds hex numbers to BASIC along with 24-bit addresses for PEEK, POKE, SYS, and WAIT. Thus you can do things like SYS $8000 POKE $123456,255 LOAD"BLAH",8,$020000 SAVE"DATA",12,$040000,$093800 from the BASIC prompt. For more info on PPP, visit the page in the Fridge; note that jammon v3.0 uses a special version of PPP that can be relocated. Format: byte two characters -- use 09 instead of 9. Exception is load and save, where the device number may be 1 or 2 chars (and is in _decimal_ i.e. not hex). addr 16 or 24 bits -- two or three bytes. If a 16-bit address is used, the current value of PBR is prepended to form a 24-bit address (e.g. d c000 will disassemble at $01C000 if PBR=01). Notes: If E=1 then X=M=1 Requires a SuperCPU! Toggles ------- !e Toggle emulation bit !j Toggle jsr following during single stepping !m Clear memory display window (in alternate display mode) !d Toggle alternate display mode The alternate display mode is designed primarily for single stepping. Pretty much all commands work the same in this mode, except for the "m"emory display command. In the alternate mode, "m address" will add address to the memory display window; a total of 16 memory locations can be added to the window, and the window is cleared using !m. Note also that displayed memory can be changed as usual, by cursoring up to the location and entering new bytes. Commands -------- a a addr command Assemble. Numbers/addresses are in hex and prefixed by a $. are valid in absolute addressing to force 8/16/24 bit addresses. The flags (see r) determine whether immediate mode is be assembled as 8 or 16 bits. !x and !m may be used to flip the X and M bits during assembly (!! will flip both; note that X=M=1 when e=1). d d addr Disassemble one screen. <- <- Disassemble one screen backwards from current address. {lira} {lira} Toggle whether disassembler follows REP and SEP. Note that if E=1 then X=M=1 always. (I felt the lira key was growing lonely from neglect, so he gets the toggle honor). , , addr byte1 [byte2 ...] Re-disassemble. The bytes following the address are read in and stored, and the screen is re-disassembled. p p addr1 addr2 Disassemble range. # #number Number conversion. Argument "number" may be hex ($), binary (%), decimal (no prefix), or character ('). r/e no args Display regs/alternate regs. Note that value of flags, PBR, and $01 can alter certain commands: flags determine 8/16 bit #immediate mode assembly and disassembly, PBR changes default address locations, and $01 affects any memory read (disassembly, memory display, etc.) m m [addr1 [addr2]] Display memory. If a second address is specified, display memory range. If no address is specified, then continuously display memory from the current address. i i [addr1 [addr2]] Display memory+text. Memory can't be modified like m command (not enough room on the screen line!). i* i* [addr1 [addr2]] Display memory as screen codes. h h addr1 addr2 byte1 [byte2 ...] or h addr1 addr2 "string" Hunt. f f addr1 addr2 byte Fill range of memory with specified byte. t t addr1 addr2 dest Transfer memory. n n addr1 addr2 addr3 dest Relocate code. addr1=start of code, addr2=start of variables, and addr3=end of variables. Transfers memory and updates addresses between addr1 and addr2. This way, programs (like JamaicaMON!) that have code followed by variables and tables can be relocated in one swell foop (use w to get jamaicamon addresses). Yep, you're SOL if you just want to relocate a table -- maybe a future update? To relocate jammon, use w, set the dest address, relocate the code, and g dest. w no args Where am I? Prints addresses of jammon code, vars, and end. ;^: various Alter regs/alternate regs/memory (printed by r and e) l l "filename",dev[,addr] Load file (to addr if specified), where addr can be 24-bits. s s "filename",dev,addr1,addr2 Save file, addr1 and 2 can be up to 24-bits. @ @ @$ @#dev @command Send disk command. @ reads the error channel. @$ displays the directory. @#dev changes the current device to dev. @command sends "command" to the drive. b b addr Set breakpoint. The address and previous contents are remembered; if the monitor is then re-entered from this point, the previous contents are restored. Only one breakpoint may be set at a time. g g [addr] Restore registers and go. If no address is specified, it will go to PC. z z [addr] Zingle ztep. Zame az go, but zets a breakpoint at ze next inztruction. All commands except JSR/JSL are followed. Why not follow JSR? Because code like LDA DATA,X JSR routine DEX BNE *-9 would be extremely annoying to step through, especially if "routine" is in the kernal, or calls a million other routines. x no args Exit to basic. ? no args List available command keys This program is in the public domain.