Brutsche Assignment 6

# Brutsche Assignment 6 - →(AX Assume that all the...

This preview shows pages 1–2. Sign up to view the full content.

Jeff Brutsche Engt 2230 Assignment 6 1. Describe what happens as each of the following instructions is executed bye the 8088. (a) ROL DX, CL The contents of DX are rotated to the left by the number of bit positions in CL. (b) RCL BYTE PTR [0400H], CL The contents of byte PTR [0400H] is rotated left through the carry bit by the number of bit positions in CL. (c) ROR BYTE PTR [DI] , 1 This rotates the contents of byte PTR [D1] to the right 1 bit position. (d) ROR BYTE PTR [DI+BX] ,CL This rotates the contents of byte PTR [D1] to the right by the number bit positions in CL. (e) RCR WORD PTR [BX+DI+, 1 This rotates the word PTR [BX+DI] to the right 1 position, through the carry bit. (f) RCR WORD PTR [BX][DI]+10H, CL This rotates the word PTR [BX][DI]+10H,CL to the right by the number of bit positions in CL. 2. Implement the following operation using shift and arithmetic instructions 8(AX) – 4(BX) – (BX)/8

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: → (AX) Assume that all the parameters are word-sized. State any assumptions made in the calculations. MOV CX, BX MUL AX, 8 MUL BX, 4 DIV CX, 8 SUB AX, BX SUB AX, CX 3. Write an instruction sequence to configure the 8088 as follows: interrupts not accepted; save the original contents of flags SF, ZF, AF, PF, and CF at the address 0A000H and then clear CF. CLI MOV AX, 0H MOV DS, AX MOV BX, 0A000H LAHF MOV [BX], AH CLC 4. Given a number N in the range 0<N ≤ 5, write a program that computes its factorial and saves the result in the memory location FACT. (N! = 1*2*3*4…. .*N) 5. What operation is performed by the following instructions when they are executed in sequence? PUSH AX PUSH BX POP AX POP BX Push AX saves AX on the stack Push BX saves BX on the stack Pop AX retrieves AX from the stack Pop BX retrieves BX from the stack...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

Brutsche Assignment 6 - →(AX Assume that all the...

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

View Full Document
Ask a homework question - tutors are online