I'm not sure if all assembly is the same, I have looked this question up already and the language I saw looked different. I am learning to code for the 8085 microprocessor and need to know how take a byte stored in location 4050h and test if its less than or equal to 7Fh, if it is, I need to store 00h in location 5000h. If its greater than 7F, I need to store 01h in location 5000h. I don't need someone to do the whole thing for me, just point me in the right direction. Any help would be great :)
how to do less than or equal to in 8085 Assembly language
1.2k views Asked by lordcideon At
1
Unlike 8051 (which I'm used to), 8085 actually has
CMP
instruction to compareA
with operand, but it is not needed in your case. Condition "less than or equal to 7Fh" actually means "has no bit 7 set", so you just need to rotate value left (so bit 7 becomes bit 0) and bit-and it with 01h.So it would be something like: