Saturday, November 10, 2007

Microprocessor Program

WAP to find the biggest of three numbers
ORG 0000H
LXI H,0085H
MVI B,03H
MVI A,00H
QQ: CMP M ;IF (A>M),THEN JUMP WITH NO CARRY
JNC PP
MOV A,M
PP: INX H
DCR B
JNZ QQ
STA 0090H
HLT
END
ORG 0085H
DB 28H,03H,38H

No comments: