DSPIC CLR f instruction , hex error

Discuss about beta versions of mikroPascal compiler.
Post Reply
Author
Message
yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

DSPIC CLR f instruction , hex error

#1 Post by yo2lio » 04 Apr 2008 14:01

Hi,

CLR f ASM instruction generate wrong HEX code.

Example :

Address of TMR3 is 0x010A
CLR TMR3 must give me $EF210A instead of $EF010A

Bit 13 from hex code must be 1 if destination is file register and 0 for WREG.

From dsPIC30F Programmer’s Reference Manual

Code: Select all

1110 1111 0BDf ffff ffff ffff

The ‘B’ bit selects byte or word operation (0 for word, 1 for byte).
The ‘D’ bit selects the destination (0 for WREG, 1 for file register).
The ‘f’ bits select the address of the file register.
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: DSPIC CLR f instruction , hex error

#2 Post by zristic » 04 Apr 2008 14:21

Will be checked/fixed.
Thanks.

Post Reply

Return to “mikroPascal Beta testing”