Question
ASSEMBLY PROGRAMMING EMU8086. Please Help me fix the errors. It always shows error about the IMUL parts. Here are the codes: .MODEL SMALL .STACK 100H
ASSEMBLY PROGRAMMING EMU8086. Please Help me fix the errors. It always shows error about the IMUL parts. Here are the codes:
.MODEL SMALL .STACK 100H .DATA X DD -217770 Y DD 12810 Z DD ? .CODE .STARTUP MOV AX, X IMUL AX, 4 ;4X MOV BX, Y IMUL BX, 8 ;8Y NEG BX ;-8Y ADD AX, BX ;4X-8Y MOV BX, Y IDIV BX ;X/Y ADD AX, DX ;4X-8Y+X/Y MOV Z, AX ;STORE RESULT IN Z ;PRINTING MOV AH, 09H ;PRINT STRING LEA DX, PRINT ;LOADD MESSAGE INT 21H ;CALL DOS INTERRUPT MOV AH, 02H ;FUNCTION TO PRINT INTEGER LEA DX, Z ;LOAD ADDRESS OF Z INT 21H ;CALL DOS INTERRUPT MOV AX, 4C00H ;EXIT FUNTION INT 21H ;CALL DOS INTERRUPT PRINT DB 'THE VALUE OF Z IS: $' .END I have already asked this in Chegg, but the expert answer's kept showing errors when I run it in emu8086. Here are the questions which was asked before the shown code above was answered. Might come in handy.
Instructions:
1. Write an assembly program in emu8086 version 4.08 that places the hexadecimal value 23 in the accumulator. 2. The ASCII values for the numbers 0-9 are represented by 48-57, respectively. The program should convert the upper nibble of the hexadecimal value to its corresponding ASCII value and store it in a designated RAM location. 3. The program should then convert the lower nibble of the hexadecimal value to its corresponding ASCII value and store it in a separate RAM location.
Constraints:
1. The program must utilize the rotate command instead of shift instructions. 2. The program should be flexible enough to work with any original value, not just F3H.
Tips:
1. Store the original hexadecimal value in a RAM location for easy reference. 2. The program should utilize rotate instructions, masks, and arithmetic instructions to achieve the desired results. 3. Reserve three RAM locations for the original value, the upper nibble, and the lower nibble of the original value.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started