The class I'm taking is assembly programming. ***My compiler is visual studio. x86 on windows. must use masm.*** I am completely stuck. I have wrote the instructions for the program below. ****i have attached my work please look it over and tell me how to fix errors. Instructions: Implement the following pseudocode in x86 assembly language. Use short-circuit evaluation and assume that num1 and RESULT are 32-bit variables. if ( num1 > ecx ) AND ( ecx > edx ) RESULT = 1 else RESULT = 2; ***Title your branch label using the 1st letter of your first name and last name. For example, Ann Napa's conditional branch label would be AN: Step through your program with a debugger to see exactly what is going on as you test your program branching execution.
The class I'm taking is assembly programming. ***My compiler is visual studio. x86 on windows. must use masm.*** I am completely stuck. I have wrote the instructions for the program below. ****i have attached my work please look it over and tell me how to fix errors. Instructions: Implement the following pseudocode in x86 assembly language. Use short-circuit evaluation and assume that num1 and RESULT are 32-bit variables. if ( num1 > ecx ) AND ( ecx > edx ) RESULT = 1 else RESULT = 2; ***Title your branch label using the 1st letter of your first name and last name. For example, Ann Napa's conditional branch label would be AN: Step through your program with a debugger to see exactly what is going on as you test your program branching execution.
The class I'm taking is assembly programming. ***My compiler is visual studio. x86 on windows. must use masm.*** I am completely stuck. I have wrote the instructions for the program below. ****i have attached my work please look it over and tell me how to fix errors. Instructions: Implement the following pseudocode in x86 assembly language. Use short-circuit evaluation and assume that num1 and RESULT are 32-bit variables. if ( num1 > ecx ) AND ( ecx > edx ) RESULT = 1 else RESULT = 2; ***Title your branch label using the 1st letter of your first name and last name. For example, Ann Napa's conditional branch label would be AN: Step through your program with a debugger to see exactly what is going on as you test your program branching execution.
***My compiler is visual studio. x86 on windows. must use masm.***
I am completely stuck. I have wrote the instructions for the program below.
****i have attached my work please look it over and tell me how to fix errors.
Instructions:
Implement the following pseudocode in x86 assembly language. Use short-circuit evaluation and assume that num1 and RESULT are 32-bit variables.
if ( num1 > ecx ) AND ( ecx > edx )
RESULT = 1
else
RESULT = 2;
***Title your branch label using the 1st letter of your first name and last name. For example, Ann Napa's conditional branch label would be AN: Step through your program with a debugger to see exactly what is going on as you test your program branching execution.
Transcribed Image Text:Debug
x86
> Local Windows Debugger -
Auto
A Live Share
Solution Explorer 4
SeanLab4.asm
Seanlab6.asm
seanlab7.asm
;start of program
INCLUDE C:\Irvine\Irvine32.inc
8
data
jequating some constants and a variable result
org 100h
num1 equ 7
10
num2 equ 6
num3 equ 4
11
12
13
result dw e
;result will contain the final result of if-else condition
14
15
.code
16
17
18
mov cx, num2
;moving value of num2 into cx register
19
mov dx, num3
;moving value of num3 into dx register
20
21
main proc
22
;compare the value of num1 with cx register
;if cx>num1 then jump to else label
; compare the value of dx with cx register
;if cx<dx then jump to else labe1
23
cmp cx, num1
24
jnbe else
cmp cx, dx
jnae else
25
26
27
28
sp:
;if both conditions are met then 1 will be stored in result variable and bx register
29
mov result,1
30
mov bx, result
31
ret
;end of function
32
100 %
O No issues found
Ln: 38
Ch: 4
SPC
CRLF
Output
Show output from: Build
1>------ Build started: Project: week 9, Configuration: Debug Win32 ------
1>Assembling seanlab7.asm...
1>seanlab7.asm(24): error A2008: syntax error : else
1>seanlab7.asm(26): error A2008: syntax error : else
1>seanlab7. asm(28): error A2008: syntax error : sp
1>seanlab7.asm(33): fatal error A1010: unmatched block nesting
1>C:\Program Files (x86) \Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\masm.targets(70,5): error MSB3721: The command "ml.exe /c /nologo /Zi /Fo"Debug\seanlab7.obj" /W3 /errorReport:prompt
1>Done building project "week 9.vcxproj" -- FAILED.
Transcribed Image Text:Debug
x86
• Local Windows Debugger Auto
A Live Share
Solution Explorer +
SeanLab4.asm
Seanlab6.asm
seanlab7.asm + x
17
18
mov cx, num2
;moving value of num2 into cx register
19
mov dx, num3
;moving value of num3 into dx register
20
21
main proc
22
; compare the value of num1 with cx register
;if cx>num1 then jump to else label
; compare the value of dx with cx register
;if cx<dx then jump to else labe1
23
cmp cx,num1
24
jnbe else
cmp cx, dx
jnae else
25
26
27
28
sp:
;if both conditions are met then 1 will be stored in result variable and bx register
mov result,1
mov bx, result
29
30
31
ret
;end of function
32
33
else:
;if any of condition fails then 2 will be stored in result variable
mov result,2
mov bx, result
34
35
36
ret
;end of function
37
ret
;invoking Exit
invoke ExitProcess,0
38
39
40
41
;end of main
42
main endp
43
; end of code
44
end
100 %
O No issues found
Ln: 38
Ch: 4
SPC
CRLF
Output
Show output from: Build
1>------ Build started: Project: week 9, Configuration: Debug Win32 ---
1>Assembling seanlab7.asm...
1>seanlab7.asm(24): error A2008: syntax error : else
1>seanlab7. asm(26): eror A2008: syntax error : else
1>seanlab7.asm(28): error A2008: syntax error : sp
1>seanlab7.asm(33): fatal error A1010: unmatched block nesting
1>C: \Program Files (x86) \Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\masm.targets(70,5): error MSB3721: The command "ml.exe /c /nologo /Zi /Fo"Debug\seanlab7.obj" /W3 /errorReport: prompt
1>Done building project "week 9.vcxproj" -- FAILED.
Process by which instructions are given to a computer, software program, or application using code.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.