Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 7.

Similar presentations


Presentation on theme: "ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 7."— Presentation transcript:

1 ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 7

2 Exercise Write a procedure (mul32 ) that does a 32-bit multiply and returns its 32-bit result in DX:AX. Passed the two double-word parameters using a standard stack frame. Allocate any temporary variables required on the stack frame. Write a code fragment that calls mul32 using two double-word operands stored in memory and stores the answer in a third double-word memory location.

3 Procedures Exam 1 will be held on Thursday, October 18, 2001 from 7:15 to 8:45 PM in 132 Noland Can use one 8½ x 11 sheet (both sides) of original, handwritten notes Instruction set and datasheets will be provided as required. Midterm Exam #1

4 Assessment Quiz 1. Register used as a loop counter. 2. What type of memory operations are run for AND mem, 2? 3. Registers that can be used as sources for the OUT instruction. 4. Default segment for most memory operands. 5. Assembler operator used to inform the assembler of the type of memory access.

5 Assessment Quiz 1. Write a code fragment that uses rotates/shifts to fill BX with the bit- reversed value of AX.

6 Assessment Quiz If CS=1000h, DS=2000h, ES=3000h, SS=4000h, BX=5000h, BP=6000h, DI=7000h, SI=8000h, offset of X = 400h; find source’s logical and physical address: 1. mov AX, [BP] 2. mov AX, X[DI] 3. mov AX, [BX]+3 4. mov AX, X 5. mov AX, CS:X

7 Assessment Quiz 80C188EB Hardware 1. Indicates next instruction to be fetched. 2. Calculates physical addresses. 3. Purpose of /S2:0 4. Used as the frame pointer. 5. The extended accumulator. 6. Source operand for IN instruction. 7. Memory destination for string operations.

8 Assessment Quiz Code Generation 1. Joins multiple object files. 2. Converts mnemonics to opcodes. 3. Assigns physical addresses to memory segments. 4. Debugging technique using small kernel on the target to communicate with host machine having main debugging software. 5. Assembler that generates code for another CPU.

9 Assessment Quiz Addressing modes: 1. Uses a register to hold operand’s offset. 2. Operand’s offset embedded in opcode. 3. Operand embedded in opcode. 4. Destination mode of MOV [BP+2], AL. 5. Purpose of the ASSUME directive.

10 Assessment Quiz 1. Effect of LOOPZ instruction. 2. Restrictions on conditional jumps. 3. Applicability and effect of REP prefix. 4. Effect of PUSH instruction. 5. Difference between SAL and SHL. 6. Ways to access a look-up table. 7. How to declare constant data in embedded system.

11 Assessment Quiz 1. Toggle bit D5 of AL. 2. Clear bit D1 of CH. 3. Set D14 of AX. 4. Clear word output port 0030h. 5. Clear AX if D3 of byte input port 0378h is cleared. 6. Use LOOP to set every element of the word array XYZ to 0FFFFh.

12 Assessment Quiz 1. How may iterations? MOVCX, -1 SALCX, 3 XORCX, 1 NOTCX XYZ:NOP LOOPXYZ

13 Assessment Quiz 1. Use a look-up table to convert the values 0-9 to their ASCII equivalents? Assume that the value to convert has been placed in DL.

14 1. Show the signals and timing required to transfer data from the input port to the output port. Assessment Quiz

15 Wrapping Up Exam 1 will be held on Thursday, October 18, 2001 from 7:15 to 8:45 PM in 132 Noland


Download ppt "ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 7."

Similar presentations


Ads by Google