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.

Explanation of t #pragma application

Status
Not open for further replies.

Maverickmax

Advanced Member level 1
Joined
Dec 6, 2004
Messages
404
Helped
8
Reputation
16
Reaction score
3
Trophy points
1,298
Activity points
3,689
Hi

I don't really understand the concept of using #pragma. Can anyone care to explain it to me and maybe few examples?

I want to improve my code by optimising so do you know where can i get example of optimisng my code in Keil Environment?
 

Re: Pragma

Dear,

The Cx51 compiler offers a number of control directives that you may use to
control compilation. Directives are composed of one or more letters or digits
and, unless otherwise specified, can be specified after the filename on the
command line or within a source file using the #pragma directive. For example:

C51 testfile.c SYMBOLS CODE DEBUG
#pragma SYMBOLS CODE DEBUG


In the above examples, SYMBOLS, CODE, and DEBUG are all control directives.
testfile.c is the source file to be compiled.

For more information take a look @ :
Keil Software — Cx51 Compiler User’s Guide

Chapter 2 : Compiling with the Cx51 Compiler Control Directives section for #pragma
Chapter 6: Advanced Programming Techniques optimizer section for keil optimizer
Appendix C: Writing Optimum Code for hints to writing an optimum code


This PDF File provided with Keil.you can find it @ this place:

<keil installation dir>\C51\HLP\C51.PDF


Good Luck!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top