PC undefined for WINAVR???

I'm in the process of porting a graphics library downloaded from avrfeaks.net from AVR Assembler to avr-as.

I'm now getting undefined references to PC. Does GAS not have a PC symbol defined? Can anyone point me to something that I'm doing wrong that would keep PC from not being defined? Can anyone suggest a work- around?

Thanks,

K
Reply to
espian
Loading thread data ...

I know nothing about WINAVR, but PC is normally used to refer to the ProgramCounter. I suggest you read the source and see if this makes sense.

--
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: 
            Try the download section.
Reply to
CBFalconer

On Sun, 03 Aug 2008 05:16:08 -0400, CBFalconer posted:

I just went through the user manual and didn't see a reference to PC, this despite a heckuva lot of windows stuff in there. When I read the original post, I was worried that winavr was going to make itself unaware of its own operating system. I think 'PC' is undefined in winavr.

--
What men value in this world is not rights but privileges. 7
H. L. Mencken
Reply to
Ron Ford

Are there any instructions that allow you to access the PC directly in any case?

--
Regards,
Richard.

+ http://www.FreeRTOS.org & http://www.FreeRTOS.org/shop
17 official architecture ports, more than 6000 downloads per month.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.
Reply to
FreeRTOS.org

The PC (program counter) register is sometimes referred to as IP (instruction pointer). Same thing, different mnemonic traditions --- gas mostly follows the AT&T assembly syntax rather than the Intel assembly syntax, but I think for register names gas tries to follow the chip vendor's conventions, whatever they are for that particular CPU.

But as Richard/FreeRTOS says, is the PC (or IP) register even visible on AVRs? I don't think it is. What's the instruction you're running into trouble with?

--
   Wim Lewis , Seattle, WA, USA. PGP keyID 27F772C1
Reply to
Wim Lewis

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.