You require the BASIC compiler the program was written for, this converts the BASIC source either to assembler (which you can then use MPASM on) or directly to a HEX file.Thorpydo said:Hey,
I have a program written in basic. Can I use MPLAB to convert it to assembly and then MPASM to convert it to hex? If so how? And if not, how would you go about this?
Assembler code for the 16F877 and the 16F628 are identical, they both have the same 14 bit core. The only differences are in the hardware, the 16F628 has comparators and the 16F877 has analogue to digital converters (and lots more!). The only changes you need to make are in the settings of the hardware - unless you are using hardware not available on the 16F628?.Thorpydo said:I now have assembly code for the PIC16F877. Is it a simple task to convert it to run with my PIC16F628?
Disassembling PIC assembler only takes seconds, you load the HEX file into WinPicProg and press the 'Disassemble' button - source code in seconds!.Matt(Pic progger) said:Hello, you can program a pic (type supported) with the working code, read it back with a programmer (e.g. picstart) then dissaemble the code..... this isn't a task to take on lightly, dissasembling code can take a LONG time.... especially basic as it's normally pretty bloaty" <-- que mass flaming from "my basic is better/tighter/smaller/sexier etc than asm" brigade :wink: