Invalid ASM instruction: "MOV _bckA,A" ???

General discussion on mikroBasic PRO for 8051.
Post Reply
Author
Message
LQd
Posts: 13
Joined: 10 Jan 2011 16:21

Invalid ASM instruction: "MOV _bckA,A" ???

#1 Post by LQd » 19 Mar 2011 13:08

Please, can anyone tell me, what problem is here?

Code: Select all

module RL_RR

Sub procedure rot_left (dim byref byte_to_rot as byte)
Sub procedure rot_right (dim byref byte_to_rot as byte)

implements

Sub procedure rot_left (dim byref byte_to_rot as byte)
dim bckA as byte
   asm
     MOV _bckA,A
     MOV A,_byte_to_rot
     RL A
     MOV _byte_to_rot,A
     MOV A,_bckA
   end asm
end sub

Sub procedure rot_right (dim byref byte_to_rot as byte)
dim bckA as byte
   asm
     MOV _bckA, A
     MOV A, _byte_to_rot
     RR A
     MOV _byte_to_rot,A
     MOV A, _bckA
   end asm
end sub

end.

Code: Select all

0 1 mB8051.exe -DBG -pAT89C2051 -MSF -ES -Y -DL -O11111114 -fo24 -N"C:\Documents and Settings\Liquiduss\Desktop\ATMELing\Krokovy motor\polohovac\polohovac.mbp51" -SP"C:\Program Files\Mikroelektronika\mikroBasic PRO for 8051\defs\" -SP"C:\Program Files\Mikroelektronika\mikroBasic PRO for 8051\Uses\ATMEL\" -SP"C:\Documents and Settings\Liquiduss\Desktop\ATMELing\Krokovy motor\polohovac\" "__Lib_Math.mcl" "__Lib_MathDouble.mcl" "__Lib_System.mcl" "__Lib_Delays.mcl" "polohovac.mbas"  
0 132 Compilation Started C:\Documents and Settings\Liquiduss\Desktop\ATMELing\Krokovy motor\polohovac\polohovac.mbas
1 1015 Hint: Compiling unit "C:\Documents and Settings\Liquiduss\Desktop\ATMELing\Krokovy motor\polohovac\polohovac.mbas" polohovac.mbas
1 1015 Hint: Compiling unit "C:\Documents and Settings\Liquiduss\Desktop\ATMELing\Krokovy motor\polohovac\rl_rr.mbas" rl_rr.mbas
11 313 Invalid ASM instruction: "MOV _bckA,A" rl_rr.mbas
11 313 Invalid ASM instruction: "MOV _bckA,A" rl_rr.mbas
16 313 Invalid ASM instruction: "MOV _bckA,A" rl_rr.mbas
19 362 Routine prototype is different from previous declaration rl_rr.mbas
19 362 Routine prototype is different from previous declaration rl_rr.mbas
20 304 Syntax error: Expected "end" but "dim" found rl_rr.mbas
20 304 Syntax error: Expected "sub" but "bckA" found rl_rr.mbas
20 304 Syntax error: Expected "end" but "as" found rl_rr.mbas
20 304 Syntax error: Expected "." but "byte" found rl_rr.mbas
3 307 File "rl_rr.mcl" not found polohovac.mbas
0 102 Finished (with errors): 19 III 2011, 13:06:09 polohovac.mbp51
I'm trying to write module for rotating bytes in asm, because I did not find anything in MB Pro, but I just can not get through MOV instruction, no matter what I am moving where. Please help. Thanks in advance.

Post Reply

Return to “mikroBasic PRO for 8051 General”