ECE 353 Introduction to Microprocessor Systems Week 7

  • Slides: 15
Download presentation
ECE 353 Introduction to Microprocessor Systems Week 7 Michael G. Morrow, P. E.

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

Exercise Write a procedure (mul 32 ) that does a 32 -bit multiply and

Exercise Write a procedure (mul 32 ) that does a 32 -bit multiply and returns its 32 -bit result in DX: AX. n n 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 mul 32 using two double-word operands stored in memory and stores the answer in a third double-word memory location.

Midterm Exam #1 Procedures n n n Exam 1 will be held on Thursday,

Midterm Exam #1 Procedures n n n 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.

Assessment Quiz 1. Register used as a loop counter. 2. What type of memory

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.

Assessment Quiz 1. Write a code fragment that uses rotates/shifts to fill BX with

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

Assessment Quiz If CS=1000 h, DS=2000 h, ES=3000 h, SS=4000 h, BX=5000 h, BP=6000

Assessment Quiz If CS=1000 h, DS=2000 h, ES=3000 h, SS=4000 h, BX=5000 h, BP=6000 h, DI=7000 h, SI=8000 h, offset of X = 400 h; 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

Assessment Quiz 80 C 188 EB Hardware 1. Indicates next instruction to be fetched.

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

Assessment Quiz Code Generation 1. Joins multiple object files. 2. Converts mnemonics to opcodes.

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.

Assessment Quiz Addressing modes: 1. Uses a register to hold operand’s offset. 2. Operand’s

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.

Assessment Quiz 1. 2. 3. 4. 5. 6. 7. Effect of LOOPZ instruction. Restrictions

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

Assessment Quiz 1. 2. 3. 4. 5. Toggle bit D 5 of AL. Clear

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

Assessment Quiz 1. How may iterations? MOV CX, -1 SAL CX, 3 XOR CX,

Assessment Quiz 1. How may iterations? MOV CX, -1 SAL CX, 3 XOR CX, 1 NOT CX XYZ: NOP LOOP XYZ

Assessment Quiz 1. Use a look-up table to convert the values 0 -9 to

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.

Assessment Quiz 1. Show the signals and timing required to transfer data from the

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

Wrapping Up Exam 1 will be held on Thursday, October 18, 2001 from 7:

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