Built-in monitor command reference?

Started by Michau, July 22, 2010, 05:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Michau

Is there any reference of the built-in monitor commands? I was not able to find any on the Web. And it's been 15 years since I last used a 6502 monitor...

I would like to be able to load/save a specified memory range to disk, for example.

marquisor

#1
There is in the C128 manual. I'll lookup the link for ya

Don't find the usual one used here. But this does same: http://www.commodore.ca/manuals/128_system_guide/app-j.htm


EDIT: Uhm... I've seen this is in the CBM  area, then my link might be wrong, I'm sorry... :( but maybe it's similar.
preserve what you deserve

Michau

It's definitely simpler than the PLUS/4 monitor I used to use (for example, no disassembly), so surely also much simpler than the C128 one. But I will take this reference as a start and try which commands work. Thanks for the link!

carlsson

The B-Series User's Guide has a description of the extended TIM monitor in appendix O.
http://www.bombjack.org/commodore/commodore/B_Series_Users_Guide.pdf





TIM is the Terminal Interface Monitor program for MOS Technology's 6500 Series microprocessors. It has been expanded and adapted to function on the B Series computers. Execution is transferred from the CBM BASIC interpreter to TIM by the SYS command. The monitor is incorporated as part of the Kernal.

Commands typed on the CBM keyboard can direct the TIM to start executing a program, display or modify registers and memory locations, load or save binary data, view other segments, send disk commands or read status, set default disk unit and load and execute programs by entering the program name (Segment 15 only). On modifying memory, TIM NO LONGER performs automatic read after write verification to insure that the addressed memory exists, and is R/W type.

TIM COMMANDS
M - Display memory
: - Alter memory
R - Display registers
; - Alter registers
G - Begin execution
L - Load
S - Save
V - View Segment
U - Set default disk unit
@ - Send disk command or get disk status
X - Exit to basic
Z - Transfer to second microprocessor
<file name> load and execute

EXAMPLES

M DISPLAY MEMORY

M 0000 0010
: 0000 0f 0f 4c d9 9a 00 00 00 00 00 00 00 22 22 9e 00
: 0010 00 00 00 00 00 00 00 d4 fb 04 00 04 00 00 c4 fb


In a display memory command, the start and ending addresses must be completely specified as 4 digit hex numbers. To alter a memory location, move the cursor up in the display, type the correction and press RETURN to enter the change. When you move the cursor to a line and press RETURN, the colon tells the monitor that you are re-entering data.

R DISPLAY REGISTERS

R
  PC  IRQ   SR  AC  XR  YR  SP
;0007 FBF8  B0  DD  71  04  71


The registers are saved and restored upon each entry or exit from the TIM. They may be modified or preloaded as in the display memory example above. The semicolon tells the monitor you are modifying the registers.

G BEGIN EXECUTION

G 0200

The GO command may have an optional address for the target. If none is specified, the PC from the R command is taken as the target.

L LOAD

L "filename",08

No defaults are allowed on a load command. The device number and the file name must be completely specified. Operating system prompts for operator intervention are the same as for BASIC. Memory addresses are loaded as specified in the file header which is set up by the SAVE command. Machine language subroutines may be loaded from BASIC but care must be taken not to use BASIC variables as the variable pointer is set lo the last byte loaded + 1. The machine language subroutine will be loaded into the segment that you are currently in as determined by the V command. After the load, the system will be initialized back to segment 15.

S SAVE¨

S "filename",08,010200,010300

As in the load command, no defaults are allowed in the SAVE command. The device number, file name and a six byte start and end address must be given. The above example will save a program to device 8 from segment #1 starting at 0200 hex and ending at 0300 hex. The first two bytes are the segment number followed by the address. Valid segment bytes may be 00 and 0F depending on your memory. After a save, the system will be initialized back to segment 15.

V VIEW

V 01

This will change the segment to the one that you wish to view, save, load or change memory from. The valid segments are 00 to 0F.

U UNIT ADDRESS

U 09

This command will allow you to set the disk unit default address while you are in the monitor. When leaving, the original address is reset. Valid unit addresses are 08 to 1F. These must be entered in HEX.

@ READ ERROR CHANNEL AND PROCESS DISK COMMANDS

@                        : Display error message and clear channel
@S1:filename             : Scratch specific file from drive 1
@I0                      : Initialize disk In drive 0
@R0:newname=oldname      : Rename file on drive 0
@C1:filename=oldname     : Copy file from drive 0 to drive 1
@V0                      : Validate or collect disk in drive 0
@N1:filename,id          : New or Header disk in drive 1


The above examples use the same syntax as the wedge program supplied with the disk drives.

<file name> LOAD AND EXECUTE FILE IN SEGMENT 15

This will load a machine language program from the disk and execute it. Its use is restricted to segment 15.

Z TRANSFER TO SECOND MICROPROCESSOR

Z

This command will allow you to utilize the 8088 when applicable.

X EXIT TO BASIC

X

This will cause a warm start to BASIC. In a warm start, memory is not altered in any way and BASIC resumes operation the way it was before the call to the monitor was made.





Worth mention is that at least three different manuals exist for these series of computers, ranging from P500 (C128-40) to CBM 720 (B256). The contents in these manuals are slightly different, both in terms of what it contains and how it explains things. It could be a matter of different printings, but eventually Commodore should've released a final edition that applies to all the models that were actually produced and sold, skipping the prototype versions.