Society of Robots - Robot Forum
Software => Software => Topic started by: lkik on March 27, 2008, 12:11:34 AM
-
i was looking at this http://www.societyofrobots.com/microcontroller_tutorial.shtml
and down the botem it have an example of machine language
3A 10 51
E6 DF
32 38 00
is that just hexicdecimal
-
It is just hexadecimal, but you have to know what each assembly command equates to to use it. Also you need to know which hex numbers are the program address and which are the commands
-
yea it is just hexadecimal numbers.
the thing that your mcu operates by.
compilers do the job of turning your whatever language code into machine code(.hex).
you just have to download it into your mcu.
i see no reason why would someone get interested in machine language ....
dont tell me you wanna do machine coding ;D
-
if it is just hexicdecimal i could probly try and program a mcu with it probly would not work lol
i learnt it at schoool
-
I don't know what you've been learning at school, but chances are it wasn't AtMega8 assembly, especially not in hex. Even if you did learn it, I wouldn't recommend it for anything but enhancing specific parts of a C program. Compilers were made for a reason! A good one too!
As far as just programming from hex directly without a IDE, that would be just plain silly, if you want to do machine code, use assembly through AVR studio -- I think you can but am not sure --
However, after wasting enough time just figuring our the hex, it probably would work... just don't do it... ;)
-
it is totaly insane to do machine coding,, come one buddy,, wake up
-
it is totaly insane to do machine coding,, come one buddy,, wake up
but has anyone actually done it?
-
Yes. Back in the day when home computers were just starting, most of them could be programmed in basic, but if you wanted to do something advanced or speed up a program then you had to do it in machine code.
Also dont forget the people who make the programming languages need to know the lower level stuff in order to get the translations correct.
Rather than look into hex etc... why not learn assembly? that is as low as you can go and still retain any normal understanding as to whats going on
-
yep assembly was my first language on a microcontroller
reason being was that I used a PIC and assembly language was the only language that didn't cost extra for a compiler i knew of
i despise assembly
movlw hate
movwf Assembly_Language
lol :D
-
dont worry i dont plan on trying to do it
lol
that is just crazy it would take me for ever too do
and it would probly be all rong any way
-
old times they didnt write machine code as coding, they wrote assembly code but they were their own compilers.
i mean after you write your assembly code you turn it into machine code by yourself.,,,misery,,,, .
i think assembly is the greatest shot for a true beginner as you can understand how software/hardware work together.
-
I took an entire class on assembly. It is a skill everyone should learn. It helps you understand how the processor does thing and why for instance float calculations take FOREVER. I enjoyed my time with the Intel 8080. The assembly to machine code translation isn't even that hard. I think i had a spreadsheet open that I used to format my code. Every assembly line corresponds directly to a machine code. You just have to match them up. Hmm now that I think about it with Excel and a little time I could even build macros that automatically matched the code with the hex numbers for you. I guess that would be your compiler. The project board we where using with the 8080 required that you entered everything by hand with a number pad and LED display. Typos get really annoying that way.
-
I took an entire class on assembly. It is a skill everyone should learn. It helps you understand how the processor does thing and why for instance float calculations take FOREVER. I enjoyed my time with the Intel 8080. The assembly to machine code translation isn't even that hard. I think i had a spreadsheet open that I used to format my code. Every assembly line corresponds directly to a machine code. You just have to match them up. Hmm now that I think about it with Excel and a little time I could even build macros that automatically matched the code with the hex numbers for you. I guess that would be your compiler. The project board we where using with the 8080 required that you entered everything by hand with a number pad and LED display. Typos get really annoying that way.
I agree, it is useful but NOT necessary