One From The Vault: Jammon 65816-aware Monitor From: Cameron Kaiser Reply to: Cameron Kaiser Date: 26 Oct 1998 08:53:09 PST Organization: Concentric Internet Services ** One from the Vault is a best-of compendium of useful, frequently requested or just plain interesting past postings to comp.binaries.cbm, selected by the moderation staff. If you have suggestions about One From the Vault, please mail the moderators. See the FAQ for contact information. *** comp.binaries.cbm is a moderated binaries- *** *** only newsgroup (no discussion or *** *** crossposting allowed) for Commodore 8-bits *** *** *** *** For information on comp.binaries.cbm visit *** *** http://www.concentric.net/~cdkaiser/cbc/ *** *** *** *** This file is also available via FTP from *** *** ftp://videocam.net.au/cbm/incoming *** *** (allow time for submission to be received) *** >From: Stephen Judd >Reply-to: Stephen Judd >Subject: jammon SCPU Monitor Program >Original-Posting-Date: Sat, 31 Jan 98 9:13:50 CST >Status: RO [ Moderator ] This is the updated version of JamaicaMON, Steve Judd's SCPU assembler. I don't have an SCPU, so I can't test, but I'm sure Steve has done more than adequate QA on it. :-) Docs lead; uucode follows. -- Cameron Kaiser -- Quick docs for JamaicaMON SLJ 1/31/97 sjudd@nwu.edu ------------------------- Format: byte two characters -- use 09 instead of 9. Exception is load and save, where the device number may be 1 or 2 chars (but is still in 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 24-bit load/save is supported via CMD load/save patch. Requires a SuperCPU! Latest source and binaries at http://stratus.esam.nwu.edu/~judd/fridge/ 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. , , 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. 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. i i addr1 [addr2] Display memory+text. Memory can't be modified like m command (not enough room on the screen line!). 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). s s "filename",dev,addr1,addr2 Save file 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. (Note that branches, JSRs, etc. will not be followed). x no args Exit to basic. ? no args List available command keys This program is in the public domain. begin 644 jammon M`0@-"&0,GC(P-C,ZH@```*``J&B-%@-B(0!HCYW\`8^=?`&I``!;XC"/G_P!CY]\`5BI@""0 M_P!Z^FA8&/O",`M(J0``6XPW`HXU`FB-,P)HC3L"XC!N/P*O`0``C2\""0*/ M`0``K;+0C0@"K;S0C7/0C0D"*4#P!HT@WXU_WXV_T(U_T(MHC3T":(T^`L(P M:#CI`@"-,0+B,*D`KC\",`%HC3`".XTY`NN-.@*M,0+-89W0(ZTR`NUBG=`; MK3`"[6.=T!,@C3("8*TP`H5?K3$"A5VM,@*%7F`@B)&`*JD(A2*@_R#7F<@@ MX9<@Y)3&(M#RA"1@J0B%(J#_R"#AER#'E,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"`@5DY-6$1)6D-%``T@1$)2("!$4"`@,#$` M+"E=#20A/CPH6R,-,0L_"T(+10NB"_X++PPI#`,&"0P/"Q10`C$"4`()*4\" M#QM/`B$@!CLW.P8[!P$&.T$7!CL]62%Q5$%1L<*!4;!4`J&T(X(1LO3391,$P^3BY5-5=81EI;*0$: M`$4B$T````8&```)"0,/!@<```D*"0P&!@``"0D##P<'```*"@`&`@8```D) M`P\"!P``#`H`!`8&```."0,/!P<``!$*`P0&!@``"0D##P<(```)"@$!!@8` M``D)`P\'"```"@L!`08&```)"0,/#P<```X*`0$&!@``"0D##PD'"0`1"A(% D!A0!_PD,$!,'%0O_"@T``0(!`@$!`0$"`@(#`P(!`0(!`0$! ` end -- Cameron Kaiser * cdkaiser.cris@com * powered by eight bits * operating on faith -- supporting the Commodore 64/128: http://computerworkshops.home.ml.org/ -- head moderator comp.binaries.cbm * cbm special forces unit $ea31 (tincsf) personal page http://calvin.ptloma.edu/~spectre/ * "when in doubt, take a pawn"