
1.2. TASKS 11
call C100
Note you can abbreviate any command by entering enough characters to identify
it. Since no other command starts with the letter c, you could also have typed c
C100
3
. When the control is returned to BUFFALO, it prints the contents of all
the registers and you should see something like:
>CALL C100
P-C10C Y-AAAA X-AAAA A-EA B-AA C-D8 S-004A
>
Do a memory dump of locations D000-D00F. You should see something like:
>md D000 D00f
D000 10 32 A8 EA FF FF FF FF FF FF FF FF FF FF FF FF 2
>
Exercises
1. Modify the values in locations D000-D00f and run your program. Write
down the values in the locations D000-D003 and the value in register A,
after you run the program.
2. Repeat the above 5 times and explain your results.
1.2.6 Entering your program: Using ASM
We will reenter your program, except we will store it at a different location.
Enter the program starting at address C200, using the asm command. When you
enter the ASM command, BUFFALO will display instruction currently stored in
memory (or a question mark if it is not a valid instruction). You can press enter
if you want to leave memory unchanged or type the command and then press the
enter key. On power-up, the BUFFALO performs a memory check and fills all
of RAM with FF. FF happens to be the code for STX. So ASM command will
often display STX $FFFF
4
. Here is how I entered the program at location C200.
What I typed is shown in boldface:
3
An alternative to call is the go command, G. There is no difference between them if your
program ends with SWI. However, if your code ends with an RTS, you have to use the call
command.
4
BUFFALO expects all its data to be entered in HEX. So you do NOT type the $ in front of
numb ers to indicate that the number is entered using HEX representation. However, BUFFALO
adds the $ in front of the numbers written using HEX representation
Kommentare zu diesen Handbüchern