ASM problem.

General discussion on mikroC PRO for 8051.
Post Reply
Author
Message
ZMiTAC
Posts: 2
Joined: 09 Jul 2015 16:44

ASM problem.

#1 Post by ZMiTAC » 09 Jul 2015 18:55

Hi,

I wrote simple program:

Code: Select all

void main() {
     asm{
         mov a, #15;
         mov a, 15;
         }       
}
After Build in asm view I'm seeing:

Code: Select all

_main:
        MOV SP+0, #128
;test.c,1 ::                 void main() {
;test.c,3 ::                 mov a, #15;
        MOV A, 15
;test.c,4 ::                 mov a, 15;
        MOV A, 15
;test.c,8 ::                 }
        SJMP #254
; end of _main
Why immediate mode was translate as direct mode?

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: ASM problem.

#2 Post by biljana.nedeljkovic » 13 Jul 2015 14:04

Hi,

can you tell me which version of the compiler do you use?

Best regards,
Biljana Nedeljkovic

ZMiTAC
Posts: 2
Joined: 09 Jul 2015 16:44

Re: ASM problem.

#3 Post by ZMiTAC » 26 Jul 2015 08:17

Hi,

I'm using version 3.6.0.

Best regards

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: ASM problem.

#4 Post by biljana.nedeljkovic » 27 Jul 2015 16:15

Hi,

have you tried this in some project?

The compiler will translate your assembler code only if you enter values of the registers (You can see the registers' addresses in View Listing).

I don't know if you faced some issues in your work?


Best regards,
Biljana

Post Reply

Return to “mikroC PRO for 8051 General”