ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Docs/sam.html
Revision: 1.1
Committed: 2003-07-01T15:44:24Z (20 years, 10 months ago) by cebix
Content type: text/html
Branch: MAIN
CVS Tags: VERSION_4_2
Log Message:
imported files

File Contents

# User Rev Content
1 cebix 1.1 <HTML>
2     <HEAD>
3     <TITLE>SAM</TITLE>
4     </HEAD>
5     <BODY>
6    
7     <H1>SAM</H1>
8    
9     <CITE>
10     "Frodo! Mr.Frodo, my dear!" cried Sam,<BR>
11     tears almost blinding him. "It's Sam, I've come!"
12     </CITE>
13    
14     <HR>
15    
16     Frodo has a built-in machine language monitor that can be activated at any
17     time by pressing F9 (Unix) or selecting the appropriate menu item (BeOS/AmigaOS/MacOS):
18     SAM (Simple Assembler and Monitor). It provides full access to the memory
19     and hardware of the emulated C64 and 1541 (under BeOS, you must only start
20     SAM if you launched Frodo from the Shell).<P>
21    
22     SAM is controlled by a command-based interface, all numbers are in hex.
23     With the command "h" you can display a list of all commands. The command
24     "x" quits SAM and returns to Frodo.<P>
25    
26     SAM has two modes of operation, indicated by the prompt "C64>" or "1541>".
27     You can switch between them with the "64" and "1541" commands. In "C64"
28     mode, all commands that access memory or the CPU operate on the memory/CPU
29     of the emulated C64. In "1541" mode, they operate on the emulated 1541
30     (this is only useful if the processor-level 1541 emulation is turned
31     on).<P>
32    
33     All commands that access the C64 memory use the memory configuration set
34     with the "k" command. On starting up SAM, the configuration is set to the
35     one the processor is in. Accesses from within SAM have the same effect as
36     accesses of the emulated processor. This affects especially the I/O
37     registers: a memory dump of $dc00-$de00 clears pending CIA interrupts as
38     SAM reads from $dc0d and $dd0d. With the "v" commands, you can examine the
39     state of the I/O chips without modifying the state of the emulation.<P>
40    
41     In all places where SAM expects a number (except in the assembler) you can
42     also enter an expression of hex numbers containing '+', '-', '*', '/' and
43     parens. Commands that create a longer output can be interrupted with
44     Ctrl-C.<P>
45    
46     Here is a description of all commands ('[]' marks a parameter than can be
47     left out, '{}' marks a parameter that can be repeated many times. If a
48     [start] parameter is left out, SAM continues at the address where the last
49     command stopped):<P>
50    
51    
52     <PRE>
53     a [start] Assemble
54     </PRE><P>
55    
56     starts the assembler at the address "start". SAM always prints the address
57     where the next instruction will be written to. The syntax of the
58     instructions conforms to the standard except for shift/rotation
59     instructions in the "accumulator" addressing mode. Those have to be entered
60     without operand, e.g. "lsr" instead of "lsr a". Entering a blank line quits
61     the assembler and returns to the command mode of SAM.<P>
62    
63    
64     <PRE>
65     b [start] [end] Binary dump
66     </PRE><P>
67    
68     displays the memory from "start" to "end" byte-wise binary. With this
69     command, you can view character sets.<P>
70    
71    
72     <PRE>
73     c start end dest Compare memory
74     </PRE><P>
75    
76     compares the memory in the range from "start" to (and including) "end"
77     with the memory at "dest". The addresses of all different bytes and the
78     total number of differences (decimal) are printed.<P>
79    
80    
81     <PRE>
82     d [start] [end] Disassemble
83     </PRE><P>
84    
85     disassembles the memory from "start" to "end". Undocumented opcodes are
86     markes with a star '*'.<P>
87    
88    
89     <PRE>
90     e Show interrupt vectors
91     </PRE><P>
92    
93     shows the currently active interrupt vectors of the 6510 (C64) or 6502
94     (1541) and (in C64 mode, if the Kernal ROM is mapped in) of the Kernal.<P>
95    
96    
97     <PRE>
98     f start end byte Fill memory
99     </PRE><P>
100    
101     fills the memory in the range from "start" to (and including) "end" with
102     the value "byte".<P>
103    
104    
105     <PRE>
106     i [start] [end] ASCII/PETSCII dump
107     </PRE><P>
108    
109     shows the memory from "start" to "end" as ASCII/PETSCII characters.<P>
110    
111    
112     <PRE>
113     k [config] Show/set C64 memory configuration
114     </PRE><P>
115    
116     "k" without parameters shows the memory configuration that is set for SAM,
117     "k" with parameter modifies it. On exiting SAM, the configuration set with
118     the processor port is reactivated. The memory configuration has no effect
119     in 1541 mode. The 8 possible configurations are:
120    
121     <PRE>
122     # $a000-$bfff $d000-$dfff $e000-$ffff
123     ----------------------------------------
124     0 RAM RAM RAM
125     1 RAM Char ROM RAM
126     2 RAM Char ROM Kernal ROM
127     3 Basic ROM Char ROM Kernal ROM
128     4 RAM RAM RAM
129     5 RAM I/O RAM
130     6 RAM I/O Kernal ROM
131     7 Basic ROM I/O Kernal ROM
132    
133     </PRE>
134    
135    
136     <PRE>
137     l start "file" Load data
138     </PRE><P>
139    
140     loads the contents of the specified file into memory starting from address
141     "start". The file name must be enclosed in quotation marks even if it
142     contains no spaces. This command cannot be used to load C64 programs as
143     it doesn't respect the embedded load address in the programs.<P>
144    
145    
146     <PRE>
147     m [start] [end] Memory dump
148     </PRE><P>
149    
150     displays the memory from "start" to "end" as hexadecimal numbers and ASCII
151     characters.<P>
152    
153    
154     <PRE>
155     n [start] [end] Screen code dump
156     </PRE><P>
157    
158     displays the memory from "start" to "end" as ASCII characters, interpreting
159     each byte as a screen code of the standard character set.<P>
160    
161    
162     <PRE>
163     o ["file"] Redirect output
164     </PRE><P>
165    
166     When a file name is specified, all following output is redirected to this
167     file. The file name must be enclosed in quotation marks even if it contains
168     no spaces. Entering "o" without parameters closes the file and directs the
169     output into the window of SAM again.<P>
170    
171    
172     <PRE>
173     p [start] [end] Sprite dump
174     </PRE><P>
175    
176     displays the memory from "start" to "end" binary with three bytes per line.
177     With this command, you can display sprite data.<P>
178    
179    
180     <PRE>
181     r [reg value] Show/set CPU registers
182     </PRE><P>
183    
184     "r" without parameters shows all 6510 (C64) or 6502 (1541) registers and
185     flags and the instruction at the address specified by the program counter.
186     For the 6510, "DR" and "PR" are the data direction register and data
187     register of the processor port. To modify a register, give its name ("reg")
188     and the new value ("value") as parameters.<P>
189    
190    
191     <PRE>
192     s start end "file" Save data
193     </PRE><P>
194    
195     writes the memory from "start" to (and including) "end" to the specified
196     file. The file name must be enclosed in quotation marks even if it contains
197     no spaces. This command cannot be used to save C64 programs as it doesn't
198     save a load address in the file.<P>
199    
200    
201     <PRE>
202     t start end dest Transfer memory
203     </PRE><P>
204    
205     transfers the memory from "start" to (and including) "end" to "dest".
206     Source and destination may overlap.<P>
207    
208    
209     <PRE>
210     vc1 View CIA 1 state
211     </PRE><P>
212    
213     shows the state of CIA 1 ($dc00).<P>
214    
215    
216     <PRE>
217     vc2 View CIA 2 state
218     </PRE><P>
219    
220     shows the state of CIA 2 ($dd00).<P>
221    
222    
223     <PRE>
224     vf View floppy state
225     </PRE><P>
226    
227     shows the state of the processor-level 1541 emulation.<P>
228    
229    
230     <PRE>
231     vs View SID state
232     </PRE><P>
233    
234     shows the state of the SID.<P>
235    
236    
237     <PRE>
238     vv View VIC state
239     </PRE><P>
240    
241     shows the state of the VIC.<P>
242    
243    
244     <PRE>
245     x Return to Frodo
246     </PRE><P>
247    
248     quits SAM and returns to Frodo.<P>
249    
250    
251     <PRE>
252     : addr {byte} Modify memory
253     </PRE><P>
254    
255     writes the space-separated values "byte" into memory starting at "addr".<P>
256    
257    
258     <PRE>
259     1541 Switch to 1541 mode
260     </PRE><P>
261    
262     switches to 1541 mode. All commands that access memory or the CPU will then
263     operate on the emulated 1541 (processor-level).<P>
264    
265    
266     <PRE>
267     64 Switch to C64 mode
268     </PRE><P>
269    
270     switches to C64 mode. All commands that access memory or the CPU will then
271     operate on the emulated C64.<P>
272    
273    
274     <PRE>
275     ? expression Calculate expression
276     </PRE><P>
277    
278     calculates the value of the given expression and displays it in decimal
279     and hexadecimal.<P>
280    
281     </BODY>
282     </HTML>