Question: Emu8086 Assembly Programming. Please help me fix the code. It keep showing errors around line 10 to 14 and more others. I already asked this
Emu8086 Assembly Programming. Please help me fix the code. It keep showing errors around line 10 to 14 and more others. I already asked this to Chegg, but the expert's answers kept showing errors. The instruction was: -------------------------------------------- Write an assembly program in emu8086 to find the value of Z, given: X = -217,770 Y = 12,810 where Z = 4X - 8Y + X/Y. Also print the value of Z (if possible). I'm using Emu8086 version 4.08. Please make sure it runs on it. Thanks! ----------------------------------------------------- HERE IS THE CODE. PLS FIX IT. MAKE IT RUN ON EMU8086. You can remove the printing part if it hinders the code. Thanks! .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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
