Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/12/03 09:41
Read: times


 
#50532 - OVERLAY in KEil C

Hello !

I am writing command interpretor and I have problems with RECURSIVE calls
and MULTIPLE call to segments. Functions are NOT called recursevly and
they are not called twice from different locations.

I was reading the manual but it was so short and in difficult language that
I didn't understand enough. It seems that the resolution to the problem is
in OVERLAY command for linker. (Can somebody advise me and explain this function)!

Functions have their own local variables!
I am using Keil C.

Structure of programme:


main
local variables

UART, Interrupt ... Setup
Endless loop, where I wait for interrupt or signal to find selected command
If command found, there Function is call via function pointer.
end main


RiTi interrupt
local variables

receive chars to command buffer

if received char is ENTER then is generate signal to compare commands (in main)

... Receiving and sending chars in diferrent formats (HEX,ASCII,BIN) from
diferrent memory types.

END RiTi interrupt


Also I need suggestion about Keil C optimizations of code.
Which is the best ?

char data Buffer[BUFF_LEN];
char data *Ptr = &Buffer[0];
char data BuffCounter = 0;
char data Char;

a) access via poiner
Char = *Ptr;
b) access like string
Char = Buffer[BuffCounter];

This is used in RiTi interrupt.

Any suggestions are welcome !!


Iztok


List of 4 messages in thread
TopicAuthorDate
OVERLAY in KEil C            01/01/70 00:00      
   RE: OVERLAY in KEil C            01/01/70 00:00      
   RE: OVERLAY in KEil C            01/01/70 00:00      
      RE: Array vs Pointer            01/01/70 00:00      

Back to Subject List