On Mon, 23 Jul 2012, it would appear that Raphael Neider wrote:

> Hi,
>
>> Also, there appears to be some suspect code generated at the end
>> of the isr to restore the W register.  The save code is:
>>
>> MOVWF WSAVE
>>
>> but the restore code is:
>>
>> SWAPF WSAVE,F
>> SWAPF WSAVE,W
>>
>> Shouldn't the restore code be:
>> MOVF WSAVE, W
>
> No, it should not. The restore sequence is from the datasheet (Example
> 12-1, DS41202F, page 109). MOVF would ruin STATUS<Z> ...
>
> I'll have to look deeper into the generated .asm stuff to analyse the
> "hang" you experience, which would be easier if you provided
> sources/assembly output.
>
> Raphael

   Raphael-

   I just downloaded the source for the latest 3.2.0 release (dated
   2012-07-09) and built the executables, and now my simple interrupt
   testcase is working fine.  The assembly code generated by the compiler
   looks identical to what I was getting previously, but the results are
   running differently.

   I'm using the gpasm/linker toolchain, and I haven't updated them
   recently, so I'm a bit confused as to where something may have changed.

   > sdcc -v
   SDCC :
   mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08
   3.2.0 #8008 (Jul 26 2012) (Linux)
   > gpasm -v
   gpasm-0.14.1 (Mar  4 2012)

   Just wanted to let you know that things appear to be working here.
   Sorry for the bother, and thanks for the suggestions and pointers with
   respect to my interrupt save/restore confusion.

   Joel
-- 
Joel Davidson
Austin, TX
j...@prismnet.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to