Pony Monitor Commands
H - Help Command Displays the list of commands available:
PonyMon Commands:
A ADDR Disassemble (Not available on Mini-Pony)
B ADDR Set Break
U Undo Break
D ADDR Dump
E ADDR Edit
F BEGIN END VALUE Fill (Not available on Mini-Pony)
R Print Regs
G ADDR Go
N Next
L Load Srec
C Clear Flash
A ADDR Disassemble (Not available on Mini-Pony)
Disassemble memory starting at specified address. Display will show 20 lines. Pressing SPACE willdisplay another 20 lines, or pressing ENTER will return to the prompt. The display shows, from left to right, the address, the instruction bytes, the operator, and operators (if any). Branch operators show the calculated addresses.
Pony> a e000ENTER
E000 6E 03 1E mov #03,1E
E003 6E 01 1F mov #01,1F
E006 9B sei
E007 45 02 40 ldhx #0240
E00A 94 txs
E00B 45 E3 D8 ldhx #E3D8
E00E CD E2 F3 jsr E2F3
E011 6E 00 19 mov #00,19
E014 6E 40 13 mov #40,13
E017 6E 0C 14 mov #0C,14
E01A 45 00 40 ldhx #0040
E01D 7F clr ,x
E01E AF 01 aix #01
E020 65 02 40 cphx #0240
E023 26 F8 bne E01D
E025 CD E0 5B jsr E05B
E028 C7 FF FF sta FFFF
E02B A6 FF lda #FF
E02D CD E3 91 jsr E391
E030 45 E4 A2 ldhx #E4A2 ENTER
Pony>
B ADDR Set Break
The break instruction sets the address where execution will stop and return back to the monitor, if that address is reached. The break works for any access, read or write.
Pony> b 8027ENTER
Break: 8027
Pony>
U Undo Break
This erases the break setting.
Pony> u
Pony>
D ADDR Dump
The hex dump command shows memory starting at the address entered. Two notes:
- The command display will always start with the least significant hex digit of zero
- The display will pause at Hex --00 boundaries. Just press SPACE for the next page, or ENTER to reurn to the prompt.
Pony> d e200
ADDR 0 1 2 3 4 5 6 7 8 9 A B C D E F
---- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
E200 A1 FC 26 07 AD 24 F6 EE 01 87 8A CC E1 8A C6 02
E210 04 27 06 A1 01 26 09 20 05 C6 02 05 27 02 98 81
E220 99 81 AD 0F E6 03 EE 04 20 0F AD 07 EE 02 C6 02
E230 08 20 06 C6 02 04 CE 02 05 87 8A 81 8B 86 C7 02
E240 04 CF 02 05 81 CD E7 4F 25 10 8B 86 CF 02 02 45
E250 02 00 94 87 8A CE 02 02 9A FC AD B2 25 C3 C6 FE
E260 0B 2A 1F CD E2 22 C3 FE 0A 26 17 8B 86 C1 FE 09
E270 26 10 A6 01 C7 02 09 8B 86 C7 02 06 CF 02 07 CD
E280 E1 F8 AD AF 94 C6 02 08 87 8A 80 45 E4 A2 CD E6
E290 E2 45 E4 D8 CD E6 E2 81 45 00 3B D6 E3 60 D7 01
E2A0 99 5B F8 CD 01 9A CD E0 5B 81 45 00 47 D6 E3 90
E2B0 D7 01 99 5B F8 45 E4 7C CD E6 E2 C7 FF FF 95 35
E2C0 41 A7 DC CD E3 09 26 20 86 A1 39 27 0B A1 31 26
E2D0 17 CD 01 A5 A7 23 20 E3 A7 23 0B 16 C9 CD E6 B8
E2E0 0B 16 C3 CD E6 B8 20 BE A7 24 45 E4 8E CD E6 E2
E2F0 CC E0 28 19 36 1B 36 7E 36 7E 3A 7E 38 7E 39 1E
E ADDR Edit
The edit command allows you to change RAM and Registers (addresses 0-23f, and FDFF-FE0C). THIS WILL NOT WORK ON FLASH!!!
There are four things you can enter once the memory location is displayed:
- ENTER, where nn is a Hex digit, will write nn to the memory location.
- SPACE, Will skip to the next location, without altering the present location.
- BACKSPACE, Will skip to the previous location, without altering the present location.
- ENTER, Will exit the edit function, with altering the present location.
Pony\> e 67ENTER
0067 00 12ENTER
0068 00 34ENTER
0069 00 56ENTER
006A 00 BACKSPACE
0069 56 BACKSPACE
0068 34 BACKSPACE
0067 12 SPACE
0068 34 SPACE
0069 56 ENTER
Pony\>
F BEGIN END VALUE Fill (Not available on Mini-Pony)
This will write the entered Hex value to the specified range of addresses. Below shows writing the value Hex 77 from address 00c8 to 00e4. The dump command is used to verify the operation.
Pony> f c8 e4 77
Pony> d b0
ADDR 0 1 2 3 4 5 6 7 8 9 A B C D E F
---- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
00B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00C0 00 00 00 00 00 00 00 00 77 77 77 77 77 77 77 77
00D0 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77
00E0 77 77 77 77 77 00 00 00 00 00 00 00 00 00 00 00
00F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Pony>
R Print Regs
This command displays the registers on the user stack. The stack is stored in the variable _stack_save.
Pony> r
SP=FFFF CC=01 A=00 H:X=00:03 -- PC=0000
Pony>
G ADDR Go
The Go instruction executes at the address given. Or is no address is given, it executes at the address pushed on the user stack. If a download is done, and a reset jump table instruction is burned into the proper address, then the stack will be initialized to execute the user application after a download or power-up without specifying a starting address.
If a breakpoint exists at the go address, which will be the case if you have just reached a breakpoint, the go instruction will automatically do the following:
- Set a breakpoint to the next instruction,
- Execute at the current or specified instruction,
- When break occurs at next instruction, it will re- install the brakepoint at the previous spot,
- Then continue execution.
The above steps will all be transparent, looking just like it executed from the breakpoint spot.
Pony> g 8000ENTER
N Next
The Next instruction single steps from the current program counter. Pressing SPACE does the next instruction, and pressing ENTER returns to the prompt. Note that while the Next command uses the break register, the break register will be restored to the last value of the break command after command is done.
Pony> n
Break: SP=01FA CC=63 A=00 H:X=E1:AF -- PC=800D 45 80 A0 ldhx #80A0
SPACE
Break: SP=01FA CC=65 A=00 H:X=E1:A0 -- PC=8010 CD 80 7D jsr 807D
SPACE
Break: SP=01F8 CC=65 A=00 H:X=E1:A0 -- PC=807D F6 lda ,x
SPACE
Break: SP=01F8 CC=65 A=9B H:X=E1:A0 -- PC=807E 27 06 beq 8086
SPACE
Break: SP=01F8 CC=65 A=9B H:X=E1:A0 -- PC=8080 AD F3 bsr 8075
SPACE
Break: SP=01F6 CC=65 A=9B H:X=E1:A0 -- PC=8075 AD E8 bsr 805F
SPACE
Break: SP=01F4 CC=65 A=9B H:X=E1:A0 -- PC=805F 89 pshx
SPACE
Break: SP=01F3 CC=65 A=9B H:X=E1:A0 -- PC=8060 8B pshh
ENTER
Pony>
L Load Srec
The L command accepts S records from the host. s-records should be sent with 3 millisecond delays between each line to allow time for the data to burn into flash. Also, the s-record file should be produced to have a maximum of 16 data bytes (represented as 32 ASCII characters) per line. Example of an secord with maximum length below:
S113F19007CFFE0A8B86C7FE09A680C7FE0BC7FEF3
A popular way to download files from a windows computer is to use freeware Tera Term application. You can set the line delay in the "Setup-->Serial" menu as "3" msec per line. then use the "File-->Send File" menu to send the file. You can even program a macro to do this.
The Pony monitor will return to prompt after receiving the last record, which is a line starting with the letters "S9". The L command accepts S records from the host. S records should be sent a line at a time, with 3 millisecond delays between each line. It will return to prompt after receiving the last record, which is a line starting with the letters "S9".
Pony> l
- waiting ...
S1138000450200949A1C06458087CD807D4580A05A
S1138010CD807DCD8046C6004427F2A4DFA1412651
S1138020084580A4CD807D20E4A14226084580B087
S1138030CD807D20D820D64F0B1602B61881AD1FF7
S11380400B16FBB61881450044CD803EF7A10D26E2
S1138050037F200ACD8075AF0165006225EB81891D
S11380608B5542AFFF35422609080204180220024C
S113807019028A8881ADE80F16FBB71881F6270626
S1138080ADF3AF0120F7810D0A4C3320537973749B
S1138090656D73204843303820546573740D0A00AD
S11380A00D0A3A000D0A50756C73696E672E2E0026
S10C80B00D0A44756D6D79008020
S113DFCDCC80B8CC80B8CC80B8CC80B8CC80B8CC60
S113DFDD80B8CC80B8CC80B8CC80B8CC80B8CC809C
S113DFEDB8CC80B8CC80B8CC80B8CC80B8CC80B854
S106DFFDCC8000D1
S9030000FC
Pony>
C Clear Flash
This erases the user flash RAM space.
Pony> c
Pony>