Last Save:27-Sep-02
This handout will be updated from time to
time with emailed questions that seem to have general interest. Everyone learns
at different rates and is at different stages in understanding. Some of these
questions may look trivial to you once you are past that learning stage, but
may prove a significant stumbling block to someone who is not as far along.
Hopefully by the exam you will all be up to speed.
Current topics:
The design centre has Ultragizmo stations
available and you can link to the assembler from any internet-enabled machine
using Terra Term, as described in the lab manual. Simulators are also available
(see the website) but are not supported.
The regular labs are only available when a TA
is present.
On the issue of internet resources, it is
always good to consult extra material and get ideas. I cannot recommend a
particular website but I can tell you that consulting material from the
Motorola website may be useful to familiarize yourself thoroughly with the
68000 instruction set, as well as your textbook. However, I think that
completing the labs successfully can be achieved through understanding material
explained in the class lectures as well as present in the textbook, careful
reading of the lab manual as well as understanding concepts specific to the
Gizmo board specified in the manual, and of course, practice and testing before
the lab.
Use SCP instead of FTP which provides a
secure shell (the same as when you ssh to some) for your link to the ugsparc
network.
When you are requested to "test"
your lab program, it is assumed that this will be done in the lab. Please remember that for these simple
programs (ie anything before the final project), writing an assembly language
program that follows your pseudocode and compiles should give you enough of a
head start to get your code working during the lab time.
Otherwise, if you REALLY want to test your
program before the lab, please go to the design center found in the basement of
SF (Rm 540 I think).
There is no way to "remotely"
access the gizmo boards.
No. You must use a subroutine and you must
demonstrate recursive calls and callee or caller save. Use the model of the
pseudocode given in the lab writeup.
Some things you might want to try --
If Appendix C proves inadequate to get the
68000 information you want, check out the motorola website and look for the
68000 Programmers Reference Manual (M68000PM) and the 68000 or 68306 Users
Manual. Or just write a small program and see what it does (the kick-it-and-see
approach).
Say a0 contains (points to) $1000.
You could then use indexed mode to get to
$1002: ex add.w 2(a0),d0
This would not change the value of a0.
You could also load a register, say d1, with
the value of 2, and get to $1002 using a more complex addressing mode: add.w
$0(a0,d1),d0
Again the value in a0 would not change.
Or you could first move the pointer then do
the operation:
tst (a0)+
add (a0),d1
The reason you are getting the error
"invlaid register
expression" is that you are trying to
treat d0 the same way you would
treat an address register. If you go to Appendix C and look at the
valid addressing modes (see the headings at the top), you will note that there
is no column (Dn). This is why the
instruction set provides you with address registers which can act like
pointers. You must use an address
register (a0 through a7) and rewrite the instruction as:
move.w (a0), d1 ;moves the word value stored at the location ;specified in a0 to d1