Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
This is a weired question indeed, because most companies, if not all, will not bother themselves making any thing that converts ASM code to their C code recognized by the compiler.
As you know, C, Basic, Pascal compilers use what is known as ASM code blocks, so that when you write a C code for example, and then compile it, the compiler simply recognizes what commands you have written, and checks rules to see if there are any mistakes, if you are a lucky guy, then the compiler will add those ASM blocks together to form your ASM code equivalent to what you really want to do, then using an assembler, it will generate the HEX code...
Bear in mind that there are many ways to do the same job, for example, if you want to move from one bank to another, you can simply write:
BSF STATUS,RP0 ;Moving to bank 1
or, equivalently, you can also write:
BANKSEL PORTB;Moving to the bank where PORTB register exists
From this, you can see that its seriously difficult, if not impossible for the company's profit point of view to even think about it.
well i tried to bother to convert because , i wanted to use a asm block in hitech18 c compiler which has some loop, but it shows some error, which perfectly compiles in MPLAB, any idea how to do such asm blocks ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.