Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I access C pointers from assembly code written for an OCG compiler?

0
Posted

Can I access C pointers from assembly code written for an OCG compiler?

0

Pointer variables defined in C code will have a size and format which is determined by the compiler after analysing the entire C project. This pointer sizes and formats can change from one build to another as the C program is developed. This would make it very difficult to access C pointers from assembly code as the size and format is not fixed. The 9.70 (PIC10/12/16 9.70PL1 introduced this for mid-range devices) compilers will fix the pointer class so that it has maximum size and can access all objects from all memory spaces. For all PIC10/12/16 devices, the size of these pointers is 2 bytes. For Baseline and Mid- range PIC devices, the most significant bit is set if the address is that of a data memory- based object; clear if it is that of an object in program memory. For Enhanced Mid-range PIC devices, the state of this bit is reserved: set indicates a program memory address; clear the address of an object in data memory. This encoding enables the pointer to be accessed correctly fr

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123