|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
[Help]Assembler
Can some1 help me make assembler that can convert decimal to hexadecimal to biner to octal in 1 program....?
I need a code for make this assembler... ![]() |
|
#2
|
|||
|
|||
|
Welcome to the DevShed forums
![]() If anyone is going to help you we need a little more information. What assembler are you using or wanting to use? There are many out ther such as FASM, GAS*, High Level, etc. They all vary in their syntax and so on. Can I also point out that if you are simply wanting it written for you try a code bank, as that isn't our purpose here. Perhaps show us your effort at it and we can work from there?
__________________
Did this post help? Please Click The Next To My PostNeed help? Did you try Google? Take a look over at my current work in progress http://crispycrisp.org Last edited by xnemesis64 : May 5th, 2007 at 04:11 AM. Reason: Typo |
|
#3
|
|||
|
|||
|
Are you doing this for a class? Most beginning assembly classes teach about this problem of conversion. The conversion processes involves converting binary to decimal to hex etc. Probably the easiest way is dividing by the base number and storing the remainders. Let's say you have a decimal number like 100. The smallest digit is the remainder of the first division by the base number. Let's say we want it to be hex. so 100/16 = 6 Remainder 4. or 6 R 4. 4 is our first place digit. then divide 6 by 16 which is 0 remainder 6. When we reach 0, we stop. So it's 64h which is 64 HEX = 100 Decimal. Same thing can be done with binary or any number base("radix"). And most assembly languages can do simple division , (after all assembly is one step above machine language) which most any CPU's ALU(Arithmetic Logic Unit) implements as a primary basic function( composed of logic gates). Hope I got it mostly right. Good luck.
|
|
#4
|
||||
|
||||
|
Also, point out the operating system you are using. There are different system calls used for outputting data depending on the OS. I'm confident I could easily write such a program with GNU Assembler on Linux. If you need help, respond back before I forget that I even made this post.
PS. Just realized this thread was created in May... was posting according to the date of the guy before me. In other words, this post can be ignored. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Other Programming Languages > [Help]Assembler |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|