Frage

The following is a program to find the greater of 2 numbers:

enter image description here

In the above program what does EQU denote? And what does the instruction MVI A,01H do in EQU?

What does PORT1 denote here?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top