Msg:E-420 Invalid ASM instruction(55):PORTF(0x00021A)

General discussion on mikroPascal for dsPIC30/33 and PIC24.
Post Reply
Author
Message
bordol
Posts: 1
Joined: 14 Jul 2008 11:45

Msg:E-420 Invalid ASM instruction(55):PORTF(0x00021A)

#1 Post by bordol » 14 Jul 2008 12:05

Hello,
While compiling next code the errors
[color=red]BTSS.B PORTF, #0 // Msg:E-420 Invalid ASM instruction(55):PORTF[/color](0x00021A) Unit #0
and
[color=red]BRA wait0 // Msg:E-13 Invalid ASM instruction "BTSC.B [W1],#0 Unit Test1.dpas[/color]
appears.
[code]
{*
* Test configuration:
MCU: dsPIC33FJ128GP706
Oscillator: HS, 80.000MHz
Ext. Modules: None.
SW: mikroPascal for dsPIC30/33 and PIC24 v6.0.0.0
*}
program Test1;
Label WaitNext;
begin
TRISF := $FFFD; // PORTC as Input
PORTF:=0;
LATF:=0;
WaitNext:
// wait 1 then 0 on PORTF.0
asm
MOV.B W0,PORTF // No Error
MOV PORTF,W0 // No Error
MOV #0x02E0, W1 // Addr. of PORTF
wait1:
BTSS.B [W1], #0 // No Error
BTSS.B PORTF, #0 // Msg:E-420 Invalid ASM instruction(55):PORTF(0x00021A) Unit #0
BRA wait1
wait0:
BTSC.B [W1], #0
BRA wait0 // Msg:E-13 Invalid ASM instruction "BTSC.B [W1],#0 Unit Test1.dpas
end;
// Do anything
GOTO WaitNext;
end.

Next text is from 70157C.pdf
" Syntax: {label:} BTSS{.B} f, #bit4
Operands: f = [0 ... 8191] for byte operation
f = [0 ... 8190] (even only) for word operation
bit4 = [0 ... 7] for byte operation
bit4 = [0 ... 15] for word operation
Operation: Test (f)<bit4>, skip if set"
[/code]

Is this messages are my bugs?
Thank you
Sorry for my English :cry:

Post Reply

Return to “mikroPascal for dsPIC30/33 and PIC24 General”