gnupic: program memory not used with addlw 0xFF (H'3FFF')


Previous by date: 30 Jan 2007 05:19:25 +0000 Re: [gnupic] Object File Bit Relocation, David Barnett
Next by date: 30 Jan 2007 05:19:25 +0000 Re: [gnupic] program memory not used with addlw 0xFF (H'3FFF'), Nestor A. Marchesini
Previous in thread:
Next in thread:

Subject: program memory not used with addlw 0xFF (H'3FFF')
From: "Nestor A. Marchesini" ####@####.####
Date: 30 Jan 2007 05:19:25 +0000
Message-Id: <45BED677.3080000@xinet.com.ar>

After giving them many turned to the matter and hours of simulation with 
gpsim-0.22.0 under linux Mandriva Free 2007 and MPALB 7.01 low winme 
with qemu .... eureka! I it have found the difference that almost me 
madman turns.

The matter is that my program for one 16f873 has a routine that reads 
all the memory of program (4096) and is calculating two cheksums, the 
high byte and low byte, then they are compared with two values stored in 
the memory eeprom of data, if they coincide, the program continues your 
normal course, if they do not coincide (goto $) this requirement is of 
my client and serves to avoid future frauds for modifications of the code.

I pass to explain:

My program uses the page 0 (H'000' - H'7FF') and the page 1 (H'800' - 
H'FFF') but a small space stays without using, that goes from H '69D' up 
to H'7FF' I define the beginning of the page 1 with:

.page1  ORG H'800'

00000680 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXX--- ---------------- 
----------------
00000800 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 
XXXXXXXXXXXXXXXX

The difference is that gpsim-0.22.0 puts the spaces not used as INVALID 
H '0000' and MPLAB like H '3FFF'
(addlw H'FF') and this concerns fundamentally in the calculation of the 
checksum under simulation, since I
need to simulate the code to obtain the two bytes that are stored in the 
memory eeprom of data with:

.eepromdata  ORG H'2100'
ChecksumH    H'xx'
ChecksumL    H'xx'

The solution that I have given is to put:

FILL (addlw H'FF'), H'800 - $
.page1 ORG H'800'

but, this one is not a very elegant solution.

The truth is that not if this is a bug of gpsim-0.22.0 or simply 
something that was not born in mind.
For my would be a requirement that should expire gpsim-0.22.0

Regards

NĂ©stor A. Marchesini
Chajari-Entre Rios-Argentina
ICQ # 50983752 colo
MSN ####@####.####
####@####.####
####@####.####
http://www.deselectronica.com.ar




Previous by date: 30 Jan 2007 05:19:25 +0000 Re: [gnupic] Object File Bit Relocation, David Barnett
Next by date: 30 Jan 2007 05:19:25 +0000 Re: [gnupic] program memory not used with addlw 0xFF (H'3FFF'), Nestor A. Marchesini
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.