Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | Comp.Arch.Embedded | Assembler to C converter for PIC?

There are 15 messages in this thread.

You are currently looking at messages 10 to 15.

Re: Assembler to C converter for PIC? - booth multiplier - 2005-04-08 09:01:00

hamilton <h...@deminsional.com> wrote in message news:<M...@forethought.net>...
> I would like to know whose code are you trying to steal ???

 This is not about stealing nor converting machine language to C. Its
about upgrading and Education.
 The tool will help:
1. Students who start with C and want to use HANDWRITTEN Assembly
Examples on the Net.
2. Assembly coders who want to upgrade their code to C.
 Is this not worth asking for?

 Thanks Anyway



Re: Assembler to C converter for PIC? - Hans-Bernhard Broeker - 2005-04-08 11:42:00

booth multiplier <b...@hotmail.com> wrote:

> The tool will help:
> 1. Students who start with C and want to use HANDWRITTEN Assembly
> Examples on the Net.

Students are much better off doing that conversion manually ---
they'll learn a great deal about that particular C compiler, assembler
and micro in the process, which is what being a student is supposedly
all about.

> 2. Assembly coders who want to upgrade their code to C.

Why would they ever want to do that?  If the assembly program was
written by people worthy of being called "assembly coders", odds are
that a direct translation to C would be vastly inferior to a plain
rewrite from scratch.

In other words, the only tools actually *needed* for such a conversion
are lots of documentation, time and a screen large enough to display C
and assembly source side-by-side.  Or failing the latter, a paper
print-out holder to sit next to the screen.

-- 
Hans-Bernhard Broeker (b...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Re: Assembler to C converter for PIC? - John - 2005-04-08 15:57:00

> > 1. Students who start with C and want to use HANDWRITTEN Assembly
> > Examples on the Net.
>
> Students are much better off doing that conversion manually ---
> they'll learn a great deal about that particular C compiler,
assembler
> and micro in the process, which is what being a student is supposedly
> all about.

I'm a student and I'd get confused as ever going from assembler to C. I
tried that eons ago with Z80 stuff and it's a confusing bloated layer
of bizzaro labels and gotos. Don't foist that upon your students unless
you want them to leave.

Much better, as Hans said, is to learn assembler, learn C, and how to
convert from one to another. I'm trying C2Cplus (formerly picant) and
it will generate heavily commented (corresponding to C source)
assembler (their SourceboostC steps in C source) which makes
comparisons between C and assembler easy, and for newbies,
enlightening.

I don't know squat about 16F assembler, but at 35 instructions, it's
not bad. It is actually fun (only 35 instructions) to examine small
listings to see how people solve problems. It could likely be essential
to learn and write assembler for certain projects.

> Why would they ever want to do that?  If the assembly program was

Portability?


Re: Assembler to C converter for PIC? - Dan Henry - 2005-04-08 23:17:00

b...@hotmail.com (booth multiplier) wrote:

>Hi All,
> Has anybody heard of an assembly to C converter tool for Microchip
>PICs. A Converter from MPASM to C, or is it impossible?
>Thanks

Relogix (http://www.microapl.co.uk/asm2c/index.html) performs
assembler-to-C tranlation for 680x0 and 80x86 CPUs.  The vendor offers
porting services for other architectures.

--
Dan Henry

Re: Assembler to C converter for PIC? - hamilton - 2005-04-09 03:23:00


booth multiplier wrote:

> hamilton <h...@deminsional.com> wrote in message news:<M...@forethought.net>...
> 
>>I would like to know whose code are you trying to steal ???
> 
> 
>  This is not about stealing nor converting machine language to C. Its
> about upgrading and Education.

If you were an educator, you would already understand compiler theory.

Getting the "original" C code from assembly in not possible.

The best you can get is a (dare I say it) is a flow of the program.

 From there you can 're-engineer' the code in C.

My guess is that you are not an educator.

previous | 1 | 2