Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   Gurus is this correct! (http://www.go4expert.com/forums/gurus-correct-t6012/)

12341234 24Aug2007 13:47

Gurus is this correct!
 
Hello, is this correct?

1. A program in 8085 assembly language to store EFH in following registers
Registers: B,C,D,H,L
(using only MOV & MVI instructions)

MVI B,EFH
MOV C,B
MOV D,C
MVI M,EFH ; will store EFH into memory location pointed out by HL contents.
HLT

DaWei 25Aug2007 06:47

Re: Gurus is this correct!
 
Your program is functional. It doesn't meet the requirements of putting EFh into registers H and L. It also places EFh into the location pointed to by HL, as you mention, but which you did not state as a requirement.

Incidentally, this question could have been answered merely by assembling your code and stepping through it with a debugger. Surely that's more effective than asking the question on a forum and waiting for an answer.


All times are GMT +5.5. The time now is 02:17.