Homework 11

Homework 11 - ELEC 2220 - Computer Systems Homework #11...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ELEC 2220 - Computer Systems Homework #11 Due: Thursday, June 24 1. To exercise the logical operations, write a program that manipulates two one-byte data variables labeled STATUS and CONTROL. The program is to test the byte at location STATUS as follows: If bit 0 of STATUS is 1, set bit 6 of CONTROL to 1, otherwise set bit 0 of CONTROL to 0. If bit 7 of STATUS is 0 and bit 3 of STATUS is 0, set bit 2 of CONTROL to 1, otherwise set bit 2 of CONTROL to 0. If bit 4 of STATUS is 1, change bit 5 of CONTROL to its complementary value. Note that bits are numbered 7 to 0 from left to right within each byte. Also, there should be no “writes” to variable STATUS. Test the program on the following sets of data values. In each case, initialize STATUS and CONTROL to the given values, run the program, and print the debug screen showing the final values of STATUS and CONTROL. Test 1: STATUS DC.B $43 Test 2: STATUS DC.B $88 CONTROL DC.B $00 CONTROL DC.B $FF You are to write two different versions of this program: Version 1: Use only the logical operators (and, or, exclusive-or, complement) and no “bit operators” (bit
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Homework 11 - ELEC 2220 - Computer Systems Homework #11...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online