Hi Jonathan,
Well, its a compiler bug. From line
mytasks[a].fp = ledon;
SDCC generates something like
MOVFF LOW(_ledon), POSTINC0
MOVFF HIGH(_ledon), POSTINC0
MOVFF UPPER(_ledon), INDF0
This will push the contents of registers 0x1c, 0x02, and 0x00 into
mytasks[a], but we wanted to place the literal values 0x1c, 0x02, and
0x00 (= address of _ledon) there.
I fixed this in the latest svn revision (r4880). Please update and have
the following correct generated:
MOVLW LOW(_ledon)
MOVWF POSTINC0
MOVLW HIGH(_ledon)
MOVWF POSTINC0
MOVLW UPPER(_ledon)
MOVWF INDF0
Regards,
Raphael
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user