What does this Intel assembly code mean?
-
27-04-2021 - |
题
The following is a program to find the greater of 2 numbers:
In the above program what does EQU denote? And what does the instruction MVI A,01H do in EQU?
What does PORT1 denote here?
解决方案
EQU
and GRT
are labels. The lines
CMP C
JZ EQU
compare the value in the C
register with the value in the A
register and jump to the label EQU
if they're equal. (The processor subtracts the two values; JZ
means "Jump if Zero," that is, if the difference is 0.)
The MVI
command probably means "Move Immediate," so the line
MVI A,01H
moves the value 01H (1 in hexadecimal, which is just 1) into A
.
The line
OUT PORT1
probably means to OUTput the value of A
to the pins on Port 1 on the processor.
不隶属于 StackOverflow