Page 2 of 3
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:04 pm
by stevewoods1986
obiwac wrote:I'm not the most experienced with instructions like AND and OR.
Ok hes a troll.
I am not a troll, OK? I am not a troll. I have done nothing to you. I am not a troll. I have no history of being a troll. I am not a troll.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:05 pm
by BrightLight
stevewoods1986 wrote:I don't want a puzzle. Fine, I'll figure it out.
I said it clearly enough. Imagine you're doing this in C without itoa(), printf() or any other standard functions. How would you do it? If you can't achieve that in C, then you can't do OS development. If you can do that in C, translate the code into assembly, looking up relevant instructions to do so.
Hint: Octacone already gave you the instructions you need.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:09 pm
by neon
Hello,
I don't want a puzzle. Fine, I'll figure it out.
You don't need to figure it out on your own. I even encouraged for you to take a close look at those answers and ask questions about it for clarity or sample code. How can we help someone that actively ignores the answers instead of asking questions?
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:12 pm
by zaval
MichaelFarthing wrote:
How long will everyone be fooled by this troll? Anyone who casually uses a word like nybble can't possibly be innocently making the sort of posts we see.
this must be a huge compliment for Steve.
Steve is not a troll. Nor he is fooling the forum. He is just a very active noob @$$.
Unfortunately, instead of directing his activity into hard and boring learning to achieve dreams come true, he is torturizing the forum. I guess School-Rea is especially vulnerable for this, since he tries to explain things in very details. And all that goes in vain, since Steve is not inclined to pay attention to advices.
Or maybe this is yet another "lickmynigga" incarnation, taking another approach for doing bad things?
Steve, stop it. It's embarrassing for you. Go learn. Assembly, Intel manuals, whatever.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:14 pm
by stevewoods1986
neon wrote:Hello,
I don't want a puzzle. Fine, I'll figure it out.
You don't need to figure it out on your own. I even encouraged for you to take a close look at those answers and ask questions about it for clarity or sample code. How can we help someone that actively ignores the answers instead of asking questions?
Yep, mov is not really code. It's more of an instruction, huh?
Listen, I can do OS development. I have never been on such a (BLEEP)...ing negative forum. Everyone just complains.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:17 pm
by stevewoods1986
zaval wrote:MichaelFarthing wrote:
How long will everyone be fooled by this troll? Anyone who casually uses a word like nybble can't possibly be innocently making the sort of posts we see.
this must be a huge compliment for Steve.
Steve is not a troll. Nor he is fooling the forum. He is just a very active noob (BLEEP).
Unfortunately, instead of directing his activity into hard and boring learning to achieve dreams come true, he is torturizing the forum. I guess School-Rea is especially vulnerable for this, since he tries to explain things in very details. And all that goes in vain, since Steve is not inclined to pay attention to advices.
Or maybe this is yet another "(BLEEP)" incarnation, taking another approach for doing bad things?
Racist, huh? Racism. I am not causing any torture here. His name is not School-Rea by the way. I don't want advice. Most advice from the Internet is bullying. I have already learned the hard way, OK? I am an experienced programmer. I haven't just been playing with HTML for 5 minutes.
I haven't done any beginner mistakes, OK?
You have made this all happen. I carry my own weight. I get confused. I've (BLEEP)...ing done nothing wrong. I don't want to upset the community.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:19 pm
by glauxosdever
Hi,
stevewoods1986 wrote:Everyone just complains.
Sorry. It's you that complained first...
Seriously, Octacone provided a nice way of doing what you want. Why don't you simply try to figure that out?
Regards,
glauxosdever
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:21 pm
by iansjack
The sad thing is that I found detailed answers to this question in about 30 seconds using Google. All this sillyness could be avoided simply by learning how to use a search engine.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:26 pm
by stevewoods1986
iansjack wrote:The sad thing is that I found detailed answers to this question in about 30 seconds using Google. All this sillyness could be avoided simply by learning how to use a search engine.
Me too. Stackoverflow has a question that has no complaining at all. I even have an account there
https://stackoverflow.com/users/8248254/steve-woods
I have actually helped. Want proof it's mine?
I don't use Stackoverflow for OS development. However, the behaviour (behavior) of members is great. Why can't any of you be like that?
I'll check out the instructions provided, OK?
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:31 pm
by obiwac
stevewoods1986 wrote:Most advice from the Internet is bullying
Then get the (BLEEP) outta here.
stevewoods1986 wrote:Yep, mov is not really code. It's more of an instruction, huh?
I thought you didn't want code? As @neon said "In the previous thread you said you don't want code or sample code".
stevewoods1986 wrote:Listen, I can do OS development
Didn't know someone could be more arrogant than me.
stevewoods1986 wrote:I haven't done any beginner mistakes, OK?
About that...
stevewoods1986 wrote:Stackoverflow has a question that has no complaining at all.
We were not even complaining at first. Only after you started bashing us as being unhelpful. And don't say that farthing post was starting the complaining, as this was based on your previous posts and you overall reputation.
All in all, you are arrogant and contradict yourself in 95% of your posts.
I could go on for ages with these quotes, but I do think I have better things to do.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:32 pm
by BrightLight
stevewoods1986 wrote:However, the behaviour (behavior) of members is great. Why can't any of you be like that?
In all my experience here, the members are generally very friendly and try to help when possible. Seriously, a bit of advice, and a few hints, and some work for you to figure out on your own. If you're doing OS development, you should be capable of doing much more than that.
Try to focus on the main issue, instead of doing things that'll hurt your reputation later, and reduce people's likeliness to reply to your threads.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:44 pm
by stevewoods1986
obiwac wrote:stevewoods1986 wrote:Most advice from the Internet is bullying
Then get the (BLEEP) outta here.
stevewoods1986 wrote:Yep, mov is not really code. It's more of an instruction, huh?
I thought you didn't want code? As @neon said "In the previous thread you said you don't want code or sample code".
stevewoods1986 wrote:Listen, I can do OS development
Didn't know someone could be more arrogant than me.
stevewoods1986 wrote:I haven't done any beginner mistakes, OK?
About that...
stevewoods1986 wrote:Stackoverflow has a question that has no complaining at all.
We were not even complaining at first. Only after you started bashing us as being unhelpful. And don't say that farthing post was starting the complaining, as this was based on your previous posts and you overall reputation.
All in all, you are arrogant and contradict yourself in 95% of your posts.
I could go on for ages with these quotes, but I do think I have better things to do.
I don't know what to do. You just keep complaining about other things. You bully me because I don't use someone's code or another programming language. You give me links to stupid Japanese animated videos.
Fine, give me code. Give me code if that helps you. Just give me code. I don't care. Wouldn't that be better?
JAAman, the moderator viewing this forum, can you give me an answer please instead of accusing me of trolling?
How would I just get the first and second nybble? Get the first nybble, put it in register with 0. Then, I just have to compare 0-9.
For example, AL had 0x45. I want to compare the first (4) and second nybble (5), then print it.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:55 pm
by dseller
stevewoods1986 wrote: I am an experienced programmer.
You must be mad.
stevewoods1986 wrote:I understand about bitwise logic, OK?
stevewoods1986 wrote:How would I just get the first and second nybble?
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 1:56 pm
by obiwac
stevewoods1986 wrote:obiwac wrote:stevewoods1986 wrote:Most advice from the Internet is bullying
Then get the (BLEEP) outta here.
stevewoods1986 wrote:Yep, mov is not really code. It's more of an instruction, huh?
I thought you didn't want code? As @neon said "In the previous thread you said you don't want code or sample code".
stevewoods1986 wrote:Listen, I can do OS development
Didn't know someone could be more arrogant than me.
stevewoods1986 wrote:I haven't done any beginner mistakes, OK?
About that...
stevewoods1986 wrote:Stackoverflow has a question that has no complaining at all.
We were not even complaining at first. Only after you started bashing us as being unhelpful. And don't say that farthing post was starting the complaining, as this was based on your previous posts and you overall reputation.
All in all, you are arrogant and contradict yourself in 95% of your posts.
I could go on for ages with these quotes, but I do think I have better things to do.
I don't know what to do. You just keep complaining about other things. You bully me because I don't use someone's code or another programming language. You give me links to stupid Japanese animated videos.
Fine, give me code. Give me code if that helps you. Just give me code. I don't care. Wouldn't that be better?
JAAman, the moderator viewing this forum, can you give me an answer please instead of accusing me of trolling?
How would I just get the first and second nybble? Get the first nybble, put it in register with 0. Then, I just have to compare 0-9.
For example, AL had 0x45. I want to compare the first (4) and second nybble (5), then print it.
Although we are similar, Geri and I are not the same person. You mixing us up.
Re: How do I print an integer that is interpreted as hex?
Posted: Thu Aug 17, 2017 2:13 pm
by Octacone
stevewoods1986 wrote:I don't know what I want. I need something that is not code, I don't want to use somebody else's code. I don't want anime links with witches. How to do it? Stop fighting... You are all mean to me... Okay give me code, OK? OK? I don't care just give me some code...whatever. I just want to learn it myself...
Okay, here is an example on how to do it. This is not the only way, there are other ways of doing it.
I can't provide you with any useful Assembly code (because I mostly code in C++) but here is a walk-through.
- Create an array (this will be used as an output object), make it hold 3 characters. 1st being used for the first digit, 2nd being used for the second digit, 3rd being used as a null terminator. (so you don't display any junk) (make sure your print function supports '\0')
- Create a second array, 16 characters in size. Make it equal "0123456789ABCDEF" (characters used for displaying hexadecimal values)
- Grab your first array (the output one), make its 0th element equal second_array[(number AND with 0xF0) --->> all shifted 4 bytes to the right];
- Grab your first array again, make its 1st element equal second_array[AND number with 0x0F];
- Print that array as a string.
- Profit!?
If you don't understand what these logical ANDs and shifts do, read my first reply again.
If you can't code this in Assembly, then you don't know Assembly. Take a step back, learn it and come back.