> Chaps, > > I'm getting the following error from gpsim and the code does not work on a > PIC. My suspicion is that my variables have run out of file registers or > are attempting to overright ones they should not. I'm attemping to write > code for the PIC 16F877. > > Any hints? > >>From GPSIM, as it stops: > > attempt write to invalid file register > address 0x90, value 0xff > 0x0000000004C61337 0x08EB 0x0090 movwf _T1CON_bits
Pete, I'm really pleased to see that you're using gpsim for your development! The reason gpsim halted is because address 0x90 is invalid for the 16F877. The T1CON register (which I assume you're attempting to address) is at address 0x10. So the problem is that your bank register is incorrect; your pointing into bank 01 when you should be pointing into bank 00. I don't know if the offending code was written by you or SDCC, but in either case you may track down where the bank was (or was not) getting written by using gpsim's trace command. For example, you can say 'trace 100' to see what has happened for the last 100 instruction cycles. This will allow you to inspect where things went awry. Scott > > Pete > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user