LABORATORY 1 -- Using the SDS 68K simulator

The first task is to add together the values stored at two memory locations and place the result at a third memory location. This operation expressed in the HVZ syntax is

           C <- [A] + [B]

Using the SDS 68K assembler syntax

The HVZ code (Chapter 2, figure 2.26, page 67) for performing this summation was developed using the original Motorola syntax for the 68K processors. Many of the more recent commercial assemblers treat the original Motorola syntax as a small sub-set of the syntax available to assist the program developer.

During this first laboratory, we shall discuss how to take the original Motorola syntax and convert that to the format that can be used with the SDS 68K toolset, making the minimal number of changes to get the code to assemble. The coding standard used in the examples of later Laboratories will also be introduced.

As discussed earlier, the SDS 68K starter-kit is intended as a demonstration of an industrially useful programmer's toolset, with capabilities far and above what we need to have for an introductory computer organizationcourse. We shall try to identify the absolute minimum number of things we need to change in the HVZ code and get it to work. Many of the specifics can be automated. This is called the HIW (Hope It Works) process. More details about the full SDS toolset capabilities are available in the "Full Companion" chapters.

In this first Laboratory, we shall initially do the "editing", "assembling" and "linking" of files using the SDS executables from within a DOS command window. We will only use the graphical SDS interface for "simulation" of our code. Later the use of the SDS interface for all tasks will be demonstrated.

Students who want to try to do all the editing, assembling and linking solely within the SDS interface, should configure the interface at this point. This aproach is recommended to those with previous experience in assembly language programming.


Do rather than just watch

It can get rather boring just reading through this laboratory companion. It is recommended that you actually perform the exercises before the various results are discussed. This is best handled with

I recommend that you establish a working directory lab1 for your source and executable files used in this laboratory. To cut down on some of the typing, it is possible to use the web browser to download the files into your working directory. The file can be accessed via the standard hyperlink approach, e.g. click on the link to bring up the file e1v0.s which can then be downloaded directly into your working directory. You can then do the exercise before using the "Companion" for more detailed information or as a guide when you get stuck.


A Choice

You now have a choice of the way you want to proceed through Laboratory task 1.


HIW process steps

The first time through, follow all the steps involved in the Hope It Works process.

  1. Generating the SDS assembly language source and object files
  2. Specifying the memory locations for the program code and data
  3. Generating a 68K executable file
  4. Running the SDS 68K simulator
  5. The What if section of Laboratory 1
  6. There are a number of exercises you can try after you have completed Laboratory 1 to test your understanding of the ideas introduced during Laboratory 1.

If you have completed all the six steps in the HIW process, you are now ready to move onto Laboratory 2.



Last modified: July 14, 1996 06:40 PM by M. Smith.
Copyright -- M. R. Smith