Write and run a 8086 assembly language program that finds the factorial of first N natural numbers. The value of N is input to the assembly program. The factorial value is stored in AX register. Assume that the value of N is between 1 and 5 only.
Assume that you have a machine, as shown in section 3.2.2 of Block 3 having the microoperations given in Figure 10 on page 62 of Block 3. Consider that R1 and R2 both are 8-bit registers and contain 11110000 and 00110110 respectively. What will be the values of select inputs, carry-in input, and result of the operation (including carry out bit) if the following microoperations are performed? (For each micro-operation you may assume the initial value of R1
and R2 as given above)
(i) Decrement R1
(ii) Add R1 and R2 with carry
(iii)AND R1 and R2
(iv) Shift right R1
Consider that an instruction pipeline has only three stages namely instruction fetch and
decode (IFD), Operand Fetch (OF), and Instruction execute and store results (IES). Draw and
instruction pipeline diagram showing execution of 5 sequential instructions. What are the
problems of this instruction pipelining?
Explain the following in the context of 8086 Microprocessor:
(i) Physical address calculation in code and data segment
(ii) Interrupt vector table and its use
(iii)Based Indexed addressing mode with the help of an example
Write a NEAR subroutine using 8086 assembly Language (with proper comments) that
returns the smallest byte value in a byte array of length 5-bytes. The array is declared in the
calling program and the base address of the array is passed to the subroutine in the stack. You
should write both the calling program and subroutine.
write a program emu8086 take four digit number and write it to next memory address. Consider which memory address you should be using according to the answer of the first question.
write a program on emu8086
Write a program that adds ten numbers and store the result in register AX,BX,CX,DX and DS
Write a program that adds ten numbers and store the result in register AX,BX,CX,DX and DS
write a function B() in assembly lang programming which takes the argument as 64 bit integer. It should interpret that as a 8-byte ASCII string and print individual
characters on screen. You need to call the write() system call from assembly language using the syscall instruction, passing appropriate arguments.
Modify the stack in the function B() in such a way that when B() executes
the ret instruction, it jumps to a third function C(). C() must also be
written in C.
1.Write a program with three functions A(), B() and C(). B() is written in asssembly lang.
2. A() should call B() passing a 64-bit integer as an argument.
3. B() should be written in asm and interpret that as a 8-byte ASCII string and print individual characters on screen. You need to call the write() system call from assembly language using the syscall instruction, passing appropriate arguments.
4. Modify the stack in the function B() in such a way that when B() executes the ret instruction, it jumps to a third function C(). C() must also be written in C. This MUST happen without an explicit call to function C(). A mere ret from B, should pass the control to function C() instead of A(). Finally, the function C() needs to terminate the program by using the exit() system call.