MOV DIR/DIR 6 cycles (?) and SP out of allowed range

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MOV DIR/DIR 6 cycles (?) and SP out of allowed range

1,836 Views
jorge
Contributor II
When simulating this code:
Code:
MOV $80,$81

 
True Time Simulator throws 6 cycles as the execution time for this instruction. QUESTION> How could I report this bug?
 
ANOTHER QUESTION> I've posted (by mistake) this message in the MCU 8-bit Forum:

I've initialized the Stack Pointer register using Freescale template:
 
_Startup:
            LDHX   #RAMEnd+1        ; initialize the stack pointer
            TXS
 
But when using PSHA instruction, True-Time Simulator generates this error:
 
Error: Attempt to push or pop with SP out of allowed range
I understand that in the Flexis QE128, the stack could be anywhere within RAM section, right? At the beginning SP register is loaded with $1800 (end of RAM section, wich runs from $0080 to $17FF). But when trying to push Accumulator, TT Simulator throws this message!
 
So, I tried to change manually SP register to $00FF and PSHA works nice.
 
Any help will be appreciated.
 
Jorge

The thread is here:

http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&thread.id=10024

Any help in moving the thread to this forum will be appreciated.

Jorge

Labels (1)
Tags (1)
0 Kudos
Reply
2 Replies

698 Views
bigmac
Specialist III
Hello Jorge,
 
I tested the MOV dir,dir instruction with the 'AW60 as the target, and using both CW 5.0 and CW 6.0.  In both cases the cycle count increased by 6 cycles, rather than 5.  This would appear to be a long standing bug within the simulator, be it a very minor one.
 
However, I was unable to repeat your problem with the stack initialisation, so it might be specific to the QE128.  Have you tried the following "traditional" method?
 
; Symbol defined by the linker for the end of the stack
  XREF __SEG_END_SSTACK
 
;**************************************************************
main:
_Startup: ; Initialize stack pointer
          LDHX   #__SEG_END_SSTACK
          TXS
 
Regards,
Mac
 

698 Views
CrasyCat
Specialist III
Hello
 
In both cases, we need some reproducible project to investigate.
I would recommend you to submit a service request for each of the issue.

Click here to submit a service request.

Make sure to attach a reproducible project and installed product information to the service request.
To generate the required information:
- Start CodeWarrior
- Open the project
- Select "Help" -> "Pack and Go" and follow instructions on the screen.

Attach the generated .zip file to the SR.
 
Make sure you create 2 Service Requests. One for each issue.
 
CrasyCat