News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Z80 Question

Started by Ghirai, November 15, 2005, 10:28:09 PM

Previous topic - Next topic

Ghirai

Does anyone know how to actually print an 8 bit decimal number?

Thanks.
MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

BogdanOntanu

Nah, we are just fooling arround... havent you noticed yet?
(none of us never did any programming job... we all plant roses ;) )

Now really, what exactly do you mean mean by "printing"

In my mind -- for example-- the word "printing" has al least 20 or more MEANINGS.

A typical error of a newbie seekers is:  not giving enough details about his thoughts and requests.
Assuming we can read your MIND or all of us understand the same thing by the same word...

So please explain much better what you need to do and why
This way you will get much better and faster answers.

Othrwise many of us just sit back and wait until the issue is more clear...
in time we learn to completly ignore ambigouse or much to general requests.

PS.
I suppose you want the answer in Z80 Assembler... can i use the IX register?
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

Ghirai

Lol, you're too mean, besides, we live in the same country...

And yes, i'm a total n00b when it comes to Z80, and i know i was ambiguous.

By printing i mean printing on the screen, as in ld e,something/call 5.

Basically i'm struggling with the conversion to ascii...

I know how to do it in masm/c, but i'm having problems with the syntax, esp. conditional jumps and those meaningless flags.
Speaking of which, wtf is the 'm' flag?
MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

BogdanOntanu

Sorry if i look "too mean"

My intention was only to help you improve your asking skills ;)
...even with "a stick".

That is because i wanted to answer the question ... but i have found it was too ambigouse to answer ;)
Now it is more clear that you want to convert an binary value to its ASCII reperesentation

Base 16(hexa) is very easy:
-just use the two b bits nibbles from a byte to offset into a string like" "0123456789ABCDEF"

Now, should I assume that you need an algorithm for BASE 10 (ten / decimal)?

Also, since you are using a CALL 5 (apparently BDOS) 
--> Can i assume you are running under a CP/M like envinronment?
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

Ghirai

Quote from: BogdanOntanu on November 16, 2005, 07:31:17 AM
Now, should I assume that you need an algorithm for BASE 10 (ten / decimal)?

Also, since you are using a CALL 5 (apparently BDOS) 
--> Can i assume you are running under a CP/M like envinronment?

Yes to both questions :P

Another thing, what do you understand in romanian under 'numar zecimal'? Base 10 or float?

Thanks.

MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html