Assignment 2, due September 2
Part of
the homework for 22C:60, Fall 2005
|
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.
Background:
Here is some SMAL assembly language code:
B 2#10000001 B "B" B 8#44 B 16#18 B 24 B "$" B 4#1002 B 3#12210a) Show what this puts into memory, giving the result in binary, arranged as an array 8 bits wide by 8 bytes high, with byte number 1 at the top. (8/10 point)
b) In fact, the above really stupid encoding was used to encode a single letter from the Roman alphabet, in graphical form. The letter should be clearly visible in the array presentation you gave for part a. What letter is this? (1/5 point)
Note: You could solve part a) by writing a throw-away computer program (in any language) that converts from a string of digits to binary. It is probably easier to do the work by hand.
a) 0001175D
b) FFFFF316
c) 00002E58
d) 0001A4E5
e) FFFC301C
Problem: Give an appropriate set of definitions in SMAL for the ASCII constants NUL, BS, HT, CR and LF, sufficient to allow the SMAL assembler to assemble this message: (1 point)
MESSAGE:B HT,BS,BS ASCII "Hello World!",CR,LF,NUL