Hi.
I'm working/experimenting with a simple demo program:
A C-written ISR from within I need to read out all the register contents from the stack performed by the (newly/last occurred) automatic context save (during the "Standard operation for CPU maskable interrupt"). I tried the following ASM-inline code:
. . .
if (taskNo & 1)
{
// Read registers from the stack
__asm(" DINT");
__asm(" POP XT");
__asm(" POP XAR7");
__asm(" POP XAR6");
. . .
The ASM-listing/expansion looks like:
_clk_ISR:
.dwcfi cfa_offset, -2
.dwcfi save_reg_to_mem, 26, 0
.dwcfi save_reg_to_reg, 78, 26
.dwpsn file "../tasks.c",line 93,column 2,is_stmt
MOVB ACC,#1 ; [CPU_] |93|
MOVW DP,#_taskNo ; [CPU_U]
ADDL @_taskNo,ACC ; [CPU_] |93|
.dwpsn file "../tasks.c",line 95,column 2,is_stmt
TBIT @_taskNo,#0 ; [CPU_] |95|
BF $C$L6,NTC ; [CPU_] |95|
; branchcc occurs ; [] |95|
.dwpsn file "../tasks.c",line 99,column 3,is_stmt
DINT
.dwpsn file "../tasks.c",line 101,column 3,is_stmt
POP XT
.dwpsn file "../tasks.c",line 102,column 3,is_stmt
POP XAR7
.dwpsn file "../tasks.c",line 103,column 3,is_stmt
POP XAR6
.dwpsn file "../tasks.c",line 113,column 2,is_stmt
B $C$L6,UNC ; [CPU_] |113|
; branch occurs ; [] |113|
$C$L6:
And give me the following ERRORS for all the asm inline statement (DINT and POP ...): "[E0003] Syntax error - Operand 1"
Why?
I see that the ASM-listing shows: ".dwpsn file "../tasks.c",line 100,column 3,is_stmt".
Why does is says "column 3" (shouldn't it be column 2) ?
Best Regards
Terje Bøhler