Due 11/18 You may work in pairs (or paris if you can't type) on this project. You may also work on your own. If you work with someone else, then just hand in one project with both names on it. I want the assignment TYPED. Also, include the following TYPED statement, that is to be signed by each author. --------------------------------------------------------------------------------------------- Name: Name: We have worked together on this project in an equal capacity. The work was done by us with no help from any other people, except possibly Tim Downey. Signature: Signature: --------------------------------------------------------------------------------------------- I am giving you a Pascal program. You are to generate the following TYPED programs from it. 1. An Assembly listing like the one on page 181 of the text. You are limited to using the machine code instructions that are listed on page 185. 2. The corresponding machine code program. Each machine code instruction will be 16 bits long, consisting of 1's and 0's. For the first five instructions use binary for the entire instruction. After that, use binary for the opcode, and decimal for the address or offset. 3. The microcode statements that would be generated as a result of the conventional machine language program above. Use the format for microinstructions that is listed on pages 190-191. 4. The correcponding microcode instructions for the above using numbers for the corresponding fields. For the COND, ADDR, ALU, A, B, C fields, you may use decimal numbers. Use the format on page 188. (TRUE or FALSE) Please wait until the very last minute because this is a simple assignment and it won't take very much time. Make the same assumptions about the size of memory, and the reserved area of the stack as are made in the book. Allocate global memory for any constants that you use, like C1 and C20 in the book. Pass 'var' parameters by reference, so you can change the value of the actual parameter. That means: when you pass a 'var' parameter, pass the address not the value. Pass other parameters by value (place the value on the stack). You must pass the indicated parameters, and use the indicated local variables. Use the names that I have used. The return value of a function is placed in the AX register. When you want to print a value, set up a loop that will test if 4094 is negative. As long as it stays positive, stay in the loop. When it goes negative, then store the value in 4095, and clear 4094. When you want to read a value, set up a loop that will test if 4092 is negative. As long as it stays positive, stay in the loop. When it goes negative, then load the value from 4093, and clear 4092. program ThisIsFun(input, output); const MAX_ARR = 10; type ArrType = array[1..MAX_ARR] of integer; var ActArr: ArrType; Result, ActLen: integer; function AddUp (var LocArr: ArrType; LocLen: integer): integer; var Total, Pos: integer; begin Total := 0; for Pos := 1 to LocLen do begin Total := Total + LocArr[Pos]; end; AddUp := Total; end; procedure ReadIt (var LocArr: ArrType; var LocLen: integer); var Value: integer; begin LocLen := 0; read(Value); while ((LocLen < MAX_ARR) and (Value > 0)) do begin LocLen := LocLen + 1; LocArr[LocLen] := Value; if (LocLen < MAX_ARR) then read(Value); end; end; begin ReadIt(ActArr, ActLen); Result := AddUp(ActArr, ActLen); write(Result); end.