Please disregard the last version of this email. I guess I need some sleep. I used x3001 to store two instructions. Guess I must have had a very large shoehorn. In any case, I have now corrected it. So, if you have not yet studied the previous message, please delete it and read this, which is (hopefully) correct. A student asked: > If needed can we store large values like 256 512 etc that > could be useful in our program and can we store values in > other areas in memory. If you were wondering the same thing, read on. It could be useful in dealing with the second programming assignment. If you realize that the answer is yes, and you understand it well, then feel free to delete the rest of this message now. For those still reading, one of my TAs pointed out that since we are NOT allowing you to use Assembly Language in the second programming assignment, my message answering the student in terms of .FILL may have been confusing. So, I decided to redo my answer, in the context of the reality that you are not using assembly language. Since you are writing this program in machine language, you are producing by hand the object module (i.e., the machine language program). I think the best way to answer is by means of an example. Example: Write a program, starting in location x3000, that examines the value in location x3008, and outputs a 1 on the screen if either bit [10] or bit [11] is 1, and outputs a 0 otherwise. 0011000000000000 ; starting address, x3000 Solution: x3000 0010000000001010 ; R0 <--- Memory location A (ASCII 0) x3001 0010001000001000 ; R1 <--- Memory location 8 (value to test) x3002 0010010000001001 ; R2 <--- Memory location 9 (mask) x3003 0101010010000001 ; R2 <--- Value AND mask x3004 0000010000000110 ; If neither 11,10 is 1, get ready to output x3005 0001000000100001 ; ADD 1 to R0; R0 now contains ASCII 1 x3006 1111000000100001 ; TRAP to output a character x3007 1111000000100101 ; TRAP to halt x3008 the value to test x3009 0000110000000000 ; the mask to test if either Bit 10 or 11 is 1 x300A 0000000000110000 ; ASCII code for 0 The solution (above) ANDs the value to be tested with a mask consisting of 0's every place except bits 11 and 10. Then, if either bit 11 or 10 is 1, the result of the AND is not zero. If both are 0, the result of the AND is zero. Thus the branch in x3003 results in an ASCII 0 or an ASCII 1 to be loaded in R0, ready for outputting. In order to make this work, the program needs the ASCII for 0 (x30) and the mask (x0C00). Both are too large to store as immediates. Therefore we put their values into memory locations that are part of the object module, that is, locations x3009 and x300A. So, back to the student's question: > If needed can we store large values like 256 512 etc that > could be useful in our program and can we store values in > other areas in memory. Answer: Yes. Look at x3009 and x300A. Good luck. Yale Patt