gnupic: Re: [gnupic] gpsim --"invalid file register" error
Subject:
Re: [gnupic] gpsim --"invalid file register" error
From:
"Scott Dattalo" ####@####.####
Date:
25 Jan 2007 06:27:04 +0000
Message-Id: <61384.71.139.36.106.1169706341.squirrel@ruckus.brouhaha.com>
> Hi group,
>
> When I try to step through the following bit of code:
>
> movlw 0x00
> movwf ANSEL ; 0X9b, exclusive to 16f88
>
> in order that PORTA be configured for digital i/o I get this:
>
> **gpsim> step
> attempt write to invalid file register
> address 0x1b, value 0x0
> could not decode trace type: 0x0
> 0x0000000000000000 p16f88 0x0000 0x3000 movlw 0x00
> 0x0000000000000001 p16f88 0x0001 0x009B movwf INVREG_1B
> Read: 0x0000 from W
> Invalid Trace entry: 0x0
Maxim,
According to the trace snippet, your bank select bit is not correct. Now,
it should be pointed out that the disassembled instructions in the trace
output do not show banked instructions. That's why you see the INVREG_1B.
However, the 'attempt write to invalid file register' indicates that the
simulated program attempted to write to address 0x1b.
Scott
> The code seems to know about the register(it got the address right) but
> clicking on the 0x9b cell in the register viewer window just comes up as
> "file_register". In the header file 16f88.inc however it *is* called
> ANSEL.
> Also, gpasm didn't complain.
>
> So, am I missing something here or is it gpsim?
>
> Maxim
>