Transformation mBasic code to Assembler one

General discussion on mikroBasic PRO for PIC32.
Post Reply
Author
Message
Const50
Posts: 124
Joined: 28 Oct 2010 15:08
Location: West Siberia, Tomsk

Transformation mBasic code to Assembler one

#1 Post by Const50 » 24 Jul 2022 15:06

Who can help to transform the procedure loops into Assembler code for PIC32MZ2048EFH064

mBasic code:

Code: Select all


Sub procedure A
dim 	i, k 	as longword
	j 	as word
	M1 	as byte [40000] data
	CKd 	as sbit at LATB8_bit
	HD 	as byte at LATB

CKd=0
For j=0 to 100
   k=j*360
  For i=0 to 100
    HD=M1[i+k]
    CKd=1
    CKd=0
  next i
next j
end sub

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Transformation mBasic code to Assembler one

#2 Post by filip » 25 Jul 2022 08:46

Hi,

Why don't you compile your code and see the generated asm listing ?

Regards,
Filip.

Const50
Posts: 124
Joined: 28 Oct 2010 15:08
Location: West Siberia, Tomsk

Re: Transformation mBasic code to Assembler one

#3 Post by Const50 » 25 Jul 2022 10:01

You think it will be enough? This is assemble code for the mBasic compilation, not direct assembling code which is much shorter...

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Transformation mBasic code to Assembler one

#4 Post by filip » 27 Jul 2022 14:06

Hi,

Please see the ASM and LST file, they will show you the ASM code.

Regards,
Filip.

Const50
Posts: 124
Joined: 28 Oct 2010 15:08
Location: West Siberia, Tomsk

Re: Transformation mBasic code to Assembler one

#5 Post by Const50 » 30 Jul 2022 07:40

I've understood: the high speed code is suitable for 8 bit code. For 32 bit it is much slower and to increase the code execution I must increase tact frequency only. Nothing more.

Post Reply

Return to “mikroBasic PRO for PIC32 General”