2005-11-10 12:52 AM
Compiler Error message C5691 (SLL assembly command)
2005-11-09 11:00 PM
Excuse me,
when i compile my program appears an error in an assembly section of the program, the error is this: ''ERROR C5691: Instruction operand mismatch'', i am using the metrowerks compiler fo ST7, and the software is this: unsigned char temp; asm { CLR X ; CLR Y ; LD A, (Buffer_Param,Y) LD A, Buffer_Param CALLR shifting LD A, Buffer_Param:1 CALLR shifting LD A, Buffer_Param:2 CALLR shifting LD A, Buffer_Param:3 CALLR shifting LD A, Buffer_Param:4 CALLR shifting SCF RLC X LD Buffer_Param:5, X RET shifting: LD temp, A SLL X LD A, X XOR A, temp JRPL shift_bit1 LD A, X XOR A, #0x09 LD X, A shift_bit1: SLL temp <--- this is the error!!! i don't understand why appears this error...the temp is a Byte variable and the SLL command is good for byte variables, then why there is a operand mismatch? help me please.... :-? :-? :-? [ This message was edited by: liotro78 on 10-11-2005 12:31 ] [ This message was edited by: liotro78 on 10-11-2005 12:40 ]2005-11-09 11:46 PM
Liotro78,
SLL works only if temp address is within the zero page (0x0000 - 0x00FF). Consult metrowerks compiler manual and find the compiler option which puts temp in this zone. EtaPhi2005-11-10 12:39 AM
thank you very much!
i have used #pragma command and now all is ok. But appears another new error,and i think is similar with the first. the error is always the C5961, and now the instruction is this: LD A , ([_LEX.w],Z) the _LEX variable is declared in this way: #pragma DATA_SEG SHORT _ZEROPAGE extern short _LEX; why this error? i don't know very well the assembly language...excuse me.. :-[ [ This message was edited by: liotro78 on 10-11-2005 14:13 ]2005-11-10 12:50 AM
ok all ok!!
2005-11-10 12:52 AM
Liotro78,
the ST7 core has only A, X and Y registers to hold data... EtaPhi