Continue to Site

Welcome to EDAboard.com

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.

#pragma asm in Keil ,do you know??

Status
Not open for further replies.

eltonjohn

Advanced Member level 4
Joined
Feb 22, 2002
Messages
1,434
Helped
64
Reputation
126
Reaction score
29
Trophy points
1,328
Activity points
16,329
#pragma asm

I have to use some assembler code in the middle of a routine . So i decided to use the in line assemby .. But it's kind of heavy .
because what the compiler does is to produce an SRC file . .
that i need later to assemble ..
That appears to me very mediocre for a compiler .Why not just
call the assembler directly and produce the machine code tranparently.

There are ocasions where probably is ok .But i only need to code 4 to 5 assembly lines , here and there ...

As i see the best way is to create a shell function with the assembler in a separate file and call that function ... JUST WHAT I WANTED TO AVOID ..
I dont want to create a separate code SEGMENT EITHER
does anybody know another way ???
Please explain ..
 

keil pragma asm

One you are programming in C there is no need for assembler. What are you trying to do in assembler? Most common thing is direct access to memory location that is done by macros from absacc.h file.

Tom
 

#pragma keil

Just add your SRC file in the UV2 project's Source group,
UV2 calls assembler automatically after translation to SRC file.
 

#pragma asm ()

Thre is always the need for assambler ! .
The human mind is better than a compiler!

anyways .. its a crapy set up !
 

pragma asm

i have same problem in last :

i ignore this problem with put asm with C. it can generate C the same as asm in 99.9% (if have problem reply your code to i hope you)

yes
K*eil c in not contian inline Asm in need you compile all of your unit to asm then link it (it can not work in big c file !)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top