T1review-3750-S06

T1review-3750-S06 - CX AND, OR, XOR, NOT TEST Example...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Review before Test 1 — Spring 2006 EE 3750 Addressing Modes Immediate 12 Register BL Direct GREEN, [276] Register indirect [BX] : use BP, BX, SI, DI Base-plus-index [BX+DI] : use BP, BX + SI, DI Register relative GREEN[BX], [DI-58] : use BP, BX, SI, DI Base relative-plus-index GREEN[BX+SI], [BP+SI+100] : use BP, BX + SI, DI
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Instructions, with special case registers MOV, XCHG, LEA PUSH, POP, PUSHF, POPF SP LODSB, LODSW destination AL or AX, source DS:[SI] STOSB, STOSW destination ES:[DI], source AL or AX MOVSB, MOVSW destination ES:[DI],source DS:[SI] REP ADD, ADC, SUB, SBB, NEG, INC, DEC CMP MUL, IMUL AX ! AL * source or DX~AX ! AX * source DIV, IDIV AL ! quotient AX/source AH ! remainder AX/source or AX ! quotient DX~AX/source DX ! remainder DX~AX/source
Background image of page 2
CBW AX ! sign extended AL CWD DX~AX ! sign extended AX DAA, DAS, AAA, AAS, AAM, AAD AL JMP, JZ, JG, JA, etc. LOOP, LOOPE, LOOPNE, JCXZ
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CX AND, OR, XOR, NOT TEST Example Problems Write an 8086 instruction sequence to first find the value of the minimum element of a 30 word array PURPLE of unsigned integers and store it in word variable MIN. Next, subtract that minimum value from each of the 30 elements. Use string instructions to copy an array of 47 bytes from an array starting at variable GREEN to an array starting at variable PURPLE. (Both GREEN and PURPLE are in the segment to which DS points.) Next, replace each byte that is not an ASCII code for a lowercase letter (a-z: 61-7AH) with the ASCII code for ? (3FH). Write an instruction sequence to implement the steps below. All variables are byte variables holding signed integers. green ! red + 88 if green > 101 then green ! yellow else green ! ( green * red ) / yellow blue ! green...
View Full Document

This note was uploaded on 01/25/2012 for the course EE 3750 taught by Professor Desouza during the Fall '08 term at LSU.

Page1 / 4

T1review-3750-S06 - CX AND, OR, XOR, NOT TEST Example...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online