EE 361 LAB 4 ADDRESSING AND ARITHMETIC References: EE361 Texts Schedule: Week of 9/29 Pre-lab due, do the lab Week of 10/6 Memo report due, last time to demonstrate the working program 1. Pre-Lab: a. Come to the lab with a short description of how you will test that the program you do for part 2 works. Describe any Buffalo monitor commands you will use and show what data you expect to see in BUF3 and BUF4. Write this as a short memo report to your lab instructor. 2. Create the following program a.Locates the program at $C000 using: ORG $C000 (Write your program op codes etc here) The program is to: b.Add the bytes in BUF1 with the corresponding bytes in BUF2 and store the result in BUF3. c.Take the two's-complement of BUF3 and store the results in BUF4. d.You are to set up 4 data storage buffers of 12 bytes each. Use the ORG, FCB and RMB assembler directives to initialize data in the buffers as shown. ORG $C100 BUF1 FCB $FF,$FF,$01,$70,$70,$70,$7F,$80,$82,$FF,$00,$01 ORG $C110 BUF2 FCB $01,$02,$01,$0D,$0E,$0F,$01,$01,$01,$FE,$FE,$FE ORG $C120 BUF3 RMB $0C ORG $C130 BUF4 RMB 12 3. Extra credit. After you have completed the program required for 2, add the capability to print out the contents of the four buffers in hexadecimal. Each of the four buffers should be printed like this, with a label (BUF1: etc) followed by the hex display of the 12 bytes in each buffer. BUF1: FF,FF,01,70,70,70,7F,80,FF,00,01 BUF2: 01,02,01,0D,0E,0F,01,01,FE,FE,FE BUF3: ...(contents of BUF3)... BUF4: ...(contents of BUF4)... 4. Memo to: Snodgrass P. Student From: The Boss Date: September 29, 1997 Reference: Unsigned binary and two's-complement codes Now that you have been employed by Two Dot Engineering for a couple of weeks, you should know something about programming the M68HC11 and how it performs unsigned and signed arithmetic. After all these years at TDE, I still do not understand how the it handles signed and unsigned numbers and what the condition code register bits mean when it does arithmetic. How does it know if the number is signed or unsigned? Please explain it to me in a report using the new memo report style. I especially want to know what happens to the flags in the condition code register when you two's complement a data value of $80. Maybe you could use some examples from the program you just wrote. 5. Grading: Pre-Lab 10 points, demo (2) 10 points, memo report 20 points, extra credit (4) 5 points