gnupic: Re: [gnupic] LCD Example Segmentation Faults
Subject:
Re: [gnupic] LCD Example Segmentation Faults
From:
"Scott Dattalo" ####@####.####
Date:
30 Aug 2005 18:12:25 +0100
Message-Id: <13185.12.146.139.19.1125421942.squirrel@12.146.139.19>
>> Scott Dattalo wrote:
>>> the code in CVS for gpsim ... it is about time for another release.
>>> But before I do that there are some things I need to fix as a
>>> result of the recent I/O port redesign.
>>
>> Hey Scott,
>>
>> Any room in your schedule for squeezing in a fix/patch/hack prior to
>> your release?
>>
>> Specifically, solving the 18F-specific bug of stepping over 2-word
>> 'CALL' instructions.
>
> David,
>
> I've got this fixed and will be checking in the change some time today.
The feature is now working for the 18f family. I also now treat skip
instructions like non-branching instructions. Here's a description of the
step-over feature:
The step over feature is designed to step over single instructions. If the
program counter is pointing at a non-branching instruction (e.g. MOVLW)
then the step over is identical to a step. If the program counter is
pointing at a branching instruction (e.g. CALL, RCALL, GOTO, BRA, etc)
then a break point will be set a break point at the following instruction
and the simulator will start running. If the program counter is pointing
at a skip instruction, then a step over is identical to a step. If a skip
instruction is skipping a 2-word instruction (e.g. skip followed by CALL
on the 16bit core), then a step over is still identical to a step. However
in this case, the step and step over may execute the 'nop' portion of the
2-word instruction; and unless you're looking at the program memory view
it's not obvious that this is the case.
Examples:
1) non-branching instructions:
Before step over:
==> MOVLW 1
MOVWF temp
After step over:
MOVLW 1
==> MOVWF temp
cycle counter increments by one count.
2) branching instructions:
Before step over:
==> CALL func
MOVWF temp
After step over:
CALL func
==> MOVWF temp
cycle counter increments by many counts.
3) skip instruction:
before step over:
==> SKPZ
CALL func
MOVWF temp
After step over case 1:
SKPZ
==> CALL func
MOVWF temp
After step over case 2 - mid range pics:
SKPZ
CALL func
==> MOVWF temp
After step over case 2 - 16-bit core pics:
SKPZ
==> CALL func ; pointing at nop portion of call
MOVWF temp
Allow a few hours before CVS syncs up.
Scott