Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

assembly programming 8085

Status
Not open for further replies.
You can save nine bytes by eliminating JNZ IORD, JZ INCREMENT and JZ 0820H. The OUT A0H instruction should have the 0820H tag preceding it.
Both CPI instructions could take a long time to attain, and cause a false system freeze or loop activity. This is a good program, just needs clarity on each subroutine. The loops created by the OUT and JMP could only be stopped by resetting the CPU.

The final program is on post no. 17. :)
 
Doesn't anyone use pseudo code anymore to break a simple problem like this down and eventually substitute the pseudo statement with real mnemonics.

count=0

1. if count equal to 255 goto 3
2. if button up pressed then count=count+1

3. if count equal to zero goto 1
4. if button down pressed then count=count-1
5. goto 1

or something along these lines...Use a time delay to prevent switch debounce if required or another way to prevent the count up/down buttons being held
It's assembler so jmps/gotos are allowed.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top