Author Topic: 50$ robot and assembler  (Read 820 times)

0 Members and 1 Guest are viewing this topic.

Offline backmanTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
50$ robot and assembler
« on: February 15, 2011, 09:48:24 AM »
Hi,
I have a little question. I am compiling c# code and I need assembler code because I understand more to assembler. Because i have linux I am compiling with make file and so I don't know how to do it.

Sorry for my bad english.

Offline dmclifton

  • Jr. Member
  • **
  • Posts: 42
  • Helpful? 1
Re: 50$ robot and assembler
« Reply #1 on: February 15, 2011, 10:38:54 AM »
To clarify, you mean C code right? C# is .Net CLR code that does not compile down to machine code.

I would suggest rather that you learn C code instead of working with assembler...it is much easier to use (once you understand it), and it all compiles down to the same thing (the .hex machine code).

There is no good direct way I know of to convert C code into assembler code, because assembler is not a 'step' in the process of compilation. There are tools to convert X86 code into assembler but these won't work, as you want to work with the registers and whatnot in your particular microprocessor. Somebody else might know something, but in general it is a rather manual process.

Offline backmanTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: 50$ robot and assembler
« Reply #2 on: February 15, 2011, 10:50:53 AM »
Yes I mean C code. And I thought the c code must go trought assembler. But thanks for answer.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: 50$ robot and assembler
« Reply #3 on: February 15, 2011, 11:56:52 AM »
I don't know about the tools to compile code for the processor in the $50 Bot project.

I work with PICs from Microchip and their tools (MPLAB IDE) do create assembler code from the C compilers and then invokes the assembler and linker to produce the finial Hex file.
Also with MPLAB IDE one can look at the assembler code produced and even run the simulator into the assembler code.

Offline dmclifton

  • Jr. Member
  • **
  • Posts: 42
  • Helpful? 1
Re: 50$ robot and assembler
« Reply #4 on: February 15, 2011, 12:15:21 PM »
Not what you are looking for per-se, but I did see this: you can combine C program code with assembler.

http://winavr.scienceprog.com/avr-gcc-tutorial/how-to-combine-c-program-with-external-asm.html

It is possible that the AVR stuff goes to assembler first, but I haven't seen such when using AVR Studio at least.

 


Get Your Ad Here

data_list