DEVELOPMENT TOOLS TIPS AND TRICKS
Go to bottomPage: 1
TOPIC:
#2231
Re: Compiler do not restor register BC 1 Month, 3 Weeks ago Karma: 0
“PUSH BC” inserted into assembly code when “Generate Debug Info” is checked.
This code is not inserted in assembly code when “Generate Debug Info” is not checked.
Wilson Leung (Admin)
Admin
Posts: 11
graphgraph
User Online Now Click here to see the profile of this user
The administrator has disabled public write access.
 
#2226
Compiler do not restor register BC 2 Months ago Karma: 0
This C Function

TickType_t xTaskGetTickCount( void )
{
TickType_t xTicks;

/* Critical section required if running on a 16 bit processor. */
portTICK_TYPE_ENTER_CRITICAL();
{
xTicks = xTickCount;
}
portTICK_TYPE_EXIT_CRITICAL();

return xTicks;
}

results in

TickType_t xTaskGetTickCount( void )
{
00325E DDE5 PUSH IX
003260 DD21000000 LD IX,%0
003265 DD39 ADD IX,SP
003267 C5 PUSH BC ;#### Store BC but will never restored !!!!!!!!!!!!!!!!!!
TickType_t xTicks;

/* Critical section required if running on a 16 bit processor. */
portTICK_TYPE_ENTER_CRITICAL();
003268 ED57 LD A,I
00326A F5 PUSH AF
00326B F3 DI
{
xTicks = xTickCount;
00326C ED4B09E1B7 LD BC,(%B7E109)
003271 DD0FFD LD (IX+%FD),BC
}
portTICK_TYPE_EXIT_CRITICAL();
003274 F3 DI
003275 F1 POP AF
003276 E27B3200 JP PO,%327B
00327A FB EI

return xTicks;
00327B DD27FD LD HL,(IX+%FD)
}
00327E DDF9 LD SP,IX
003280 DDE1 POP IX
003282 C9 RET
Diese webseite ist echte Scheisse (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: Tom Ormiston
The Sample Center is managed separately
from Zilog's Customer Support services,
and therefore requires a separate login.
Acknowledged! Take me to the Sample Center.
Disable this pop-up in the future.