1 / 15

ECE 353 Introduction to Microprocessor Systems

ECE 353 Introduction to Microprocessor Systems. Michael G. Morrow, P.E. Week 7. 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.

Download Presentation

ECE 353 Introduction to Microprocessor Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 353Introduction 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 • Register used as a loop counter. • What type of memory operations are run for AND mem, 2? • Registers that can be used as sources for the OUT instruction. • Default segment for most memory operands. • Assembler operator used to inform the assembler of the type of memory access.

  5. Assessment Quiz • 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: mov AX, [BP] mov AX, X[DI] mov AX, [BX]+3 mov AX, X mov AX, CS:X

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

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

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

  10. Assessment Quiz • 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.

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

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

  13. Assessment Quiz • 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. Assessment Quiz • Show the signals and timing required to transfer data from the input port to the output port.

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

More Related