Page 1 of 1

Transformation mBasic code to Assembler one

Posted: 24 Jul 2022 15:06
by Const50
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

Re: Transformation mBasic code to Assembler one

Posted: 25 Jul 2022 08:46
by filip
Hi,

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

Regards,
Filip.

Re: Transformation mBasic code to Assembler one

Posted: 25 Jul 2022 10:01
by Const50
You think it will be enough? This is assemble code for the mBasic compilation, not direct assembling code which is much shorter...

Re: Transformation mBasic code to Assembler one

Posted: 27 Jul 2022 14:06
by filip
Hi,

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

Regards,
Filip.

Re: Transformation mBasic code to Assembler one

Posted: 30 Jul 2022 07:40
by Const50
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.