QE MCUs 8-bit and 32-bit Comparison
QE128 Quick Reference User Guide, Rev. 1.0
Freescale Semiconductor
2-17
;
; 13: for (i=0; i<=60000; i++) {
;
0x0000000A 0x4280 clr.l d0
0x0000000C 0x6016 bra.s *+24 ; 0x00000024
;
; 14: for (k=0; k<=100; k++) {
;
0x0000000E 0x4281 clr.l d1
0x00000010 0x6008 bra.s *+10 ; 0x0000001a
;
; 15: buffer[k] = k;
;
0x00000012 0x41D7 lea (a7),a0
0x00000014 0x21811C00 move.l d1,(a0,d1.l*4)
;
; 16: }
;
0x00000018 0x5281 addq.l #1,d1
0x0000001A 0x0C8100000064 cmpi.l #100,d1 ; '...d'
0x00000020 0x63F0 bls.s *-14 ; 0x00000012
;
; 17: }
; 18:
;
0x00000022 0x5280 addq.l #1,d0
0x00000024 0x0C800000EA60 cmpi.l #60000,d0 ; '...`'
0x0000002A 0x63E2 bls.s *-28 ; 0x0000000e
;
; 19: PTED = 0xFF;
;
0x0000002C 0x103C00FF move.b #-1,d0 ; '.'
0x00000030 0x11C08008 move.b d0,0xffff8008
;
; 20: } /* loop forever */
;
0x00000034 0x60D4 bra.s *-42 ; 0x0000000a
0x00000036 0x51FC trapf
Table 2-8
shows the CPU cycles needed and the assembly lines code generated to complete the execution
of the program described above. The used compiler for this test was CW 6.0 version and no optimization
tool was used.
NOTE
This example is just a particular comparison and the performance between
cores is not reflected with this example. The performance is application
dependant.
Table 2-8. Comparison of CPU Cycles and Assembly Code Lines
MCF51QE128
MC9S08QE128
Assembly lines code
18
43
CPU Cycles
49,201,507
407,947,991