Laboratory 1: Introduction to HC11

  1. Objective

    To become familiar with HC11 and using BUFFALO utilities, interacting using the terminal program, transferring files, editing-assembling-loading programs and executing them.

  2. Tasks
    1. Getting started with HC11

      Enter the following program: b6 30 00 f6 30 01 1b b7 30 02 3f beginning at $2100 using memory modify. What you type is shown in bold-faced underlined text. Remarks are shown in script font.

      First enter the program using memory modify command. You enter each byte followed by a space. When you are done, press enter key. Warning: backspace does not work. So make sure that you make no errors! In the following ## indicates arbitrary numbers

      >mm 2100

      2100 ## B6 ## 30 ##

      Now execute memory dump command to see what is in memory. This should match what you entered using memory modify command. If not, go back and fix any differences.

      >md 2100 210F

      2100 B6 30 ## ## ## ## ## ## ## ## ## ## ## ## ## ##

      Run your program using the call command.

      >call 2100

      Nothing much seems to happen! Dump memory in locations $3000-300F. Change the value in locations $3000, and 3001 (using memory modify) and rerun the program and copy the values in locations $3000-$3002. You should collect three different sets of data and explain the results in your write-up.

      Next you will trace through the program by executing one instruction at a time. First you have to modify the program counter by using the register modify command

      >rm

      ####

      ####

      p- 2100

      ####

      This sets the program counter to $2100. Now trace through the program using the trace command

      >t

      ####

      >t

      ####

    2. Editing-assembling-loading-executing programs
    3. Start the terminal program and the file editor (pfe). Press the reset button on the HC11 and make sure you have the buffalo prompt >
    4. Copy the file LAB1.ASM to a floppy disk and open it using the file editor.
    5. From the execute menu, assemble the program using the command:

      asm lab1

      Note: You can also go to DOS and run the same command. In either case, make sure that asm.exe is in the path, and the current directory is A: (or where ever the lab1.asm file is). If there are no errors, you should see two new files: lab1.lst and lab1.s19 (you may want to look at these files to see what they look like).

    6. Now you have to transfer the file to HC11. First execute the command load text from the Buffalo prompt:

      > load t

    7. Buffalo is now waiting for you to type in the s19 file! You use the ascii transfer to send the file over rather than typing it. From the menu select transfer and send ASCII file.
    8. If there were no errors, you should get the buffalo prompt. If not, press the reset key and fix any problems.
    9. Run the program using the command

      >call 2000

    10. Edit the assembly program following the instructions in lines that begin with *++. Go through the assemble-fix errors-assemble-fix errors-….- transfer-execute process
    11. When you submit your code, make sure that you turn in the lst file and not the asm file.