Assignment 3, due September 9

Part of the homework for 22C:60, Fall 2005
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated, and unless there is what insurance companies call "an act of God" - something outside your control; the only exceptions to this rule will be by advance arrangement.

  1. Background:

    Here is a fragment of (familiar) assembly code:

    	B	2#10000001
    	B	"B"
    	B	8#44
    	B	16#18
    	B	24
    	B	"$"
    	B	4#1002
    	B       3#12210
    
    a) Type it into a text file called hw3.a. Add a TITLE line at the start of the file, with your name as the title. Assemble it using SMAL and print out the listing file. Turn in the assembly listing on paper! (1 point)

  2. Background: Consider this SMAL code:
    	W	100000
    	H	1000
    	B	100
    	B	10
    
    a) Give equivalent code, using 8 consecutive B (byte) directives. (1/2 point)

    b) Give equivalent code, using 2 consecutive W (word) directives. (1/2 point)

    Suggesstion: There is no reason not to use the SMAL assembler to help convert the original values to hexadecimal or to check your work.

  3. Background: Here is a simplified version of the display screen for MP1:
    .................................
    .    +---------------+          .
    .    |               |------+   .
    .    +---------------+      |   .
    .       |                   |   .
    .       +-------------------+   .
    .................................
    

    Problem: Show the data structure describing this screen, as it would be stored in consecutive words of memory. Use SMAL W directives to give the contents of these words. You need not assemble the result, but may do this with pencil and paper. Note that the TEXT fields of the two structures are null! (1 point)