8085 Assembly Programming...

BChico

Platinum Member
May 27, 2000
2,742
0
71
Hey if anyone want to offer any help, im just in an intro class on assembly, and looking for some help on a prog we have to write....

Prog has to read four numbers and print their max and average values....

Thanks for the help....Brad
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
8085? I can help you with MIPS and x86 assembly. Where are you reading the numbers from? Memory, keyboard, file?
 

BChico

Platinum Member
May 27, 2000
2,742
0
71
Well being more specific....averaging the numbers....and how to input a 1 - 3 digit number from keyboad....
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
It sounds like you are completely lost. You either need to provide us with a lot more information, or, the better option, talk to your professor, or someone else in your class.
 

HJB417

Senior member
Dec 31, 2000
763
0
0
hmm, I took a course a few yrs ago for a semester, it ended with asm and microasm programming
from what I can remember, it was 8086, we had a emulator
and to read from the keyboard, I believe you had to read in the value when a you get a certain interrupt request, like 10, 11, 12 or 13 or something. I forgot which port# was for what. Anyway, certain registers had special properties, there was A, B and C. I'm not sure if I'm using the right word for them [registers]. Is this what your 8085 programming structure is like?
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
Is the 8085 running an operating system, or do you have direct control of everything?
What book is your class using?
Do you understand the book, but it doesn't cover this, or do you not understand the book?
Do you know how to average and find the min and max of two numbers in pseudo code?
Do you know the 8085 instruction set (or a subset that will allow you to implement the above algorithm)?
Is the 8085 similar to the 8086, and what are the differences (important since a lot of people know x86)
Do you know how to read from a keyboard? How?
Do you know how interrupts work in an 8085?
What have you done so far?


It's much easier to get help if you ask a specific question. When I first read your question, I assumed that you don't understand your book or your professor, and have no clue how to program the 8085, and needed someone to write the program for you.

I've never programmed an 8085, but did 68k in school and Z80 at work. I don't know how to do your program off the top of my head, but if you answer the above questions, I at least have a place to start.
 

calpha

Golden Member
Mar 7, 2001
1,287
0
0
I don't remember much from my assembly past LEA and MOV. However, the algorithm should you be able to take the input properly is simple:

Convert from Decimal Entry to Hex. Store your entries in your registers after you convert. Perform your operations, and convert back from Hex to Decimal. Lucily if you google asm dec to hex or asm dec to binary you'll find a plethora of examples.

I had to write a program to compute a triangles perimiter, area, and whether or not it was a right triangle based on the dimensions. By far the hardest part for me was to convert from decimal to hex because my professor wouldn't allow a 3 digit limit on numbers.

The second hardest part for me was always getting spaghetti'd. I kept getting cross eyed so many times that I ended up rewriting the program about 4 times.