HW2 - a MOV SI[BX 200h b MOV BL AL c MOV[BP 1500h(tricky d...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
EE3750 HW2 Due: 6/25 1. Given the following register values and memory locations, list each one that changes and its new value for each line of code below: Registers DS: 1000h CS: 2000h SS: 3000h SP: FFFCh AX: 0020h BX: 07A0h CX: 0000h DX: 0000h Memory 107A0h: 1h 3FFFFh: 4Ah 107A1h: 2h 3FFFDh: 32h 107A2h: 3h 3FFFCh: 6Bh MOV DX, 300h MOV [BX+2], DX ADD AL, DL PUSH AX POP CX POP DX MOV [BX], DX MOV AX, [7A0h] ADD AX, [7A1h] 2. Provide the machine language for the following assembly commands:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a) MOV SI, [BX+200h] b) MOV BL, AL c) MOV [BP], 1500h (tricky!) d) MOV CL, [BX+DI] 3. Observe the shift right command SHR AL, 1 which shifts the AL register right by one bit. The MSB is filled with a zero while the shifted bit goes into the carry flag. Write a small code segment using move, add, jump, loop and shift commands that will count the number of 1’s in the register AL....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online