3.22EjemploDRM007 Co..
3.22EjemploDRM007 Co..
3.22EjemploDRM007 Co..
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Source <strong>Co</strong>de<br />
7.3 Source <strong>Co</strong>de Files<br />
7.3.1 START08.C<br />
;<br />
/******************************************************************************<br />
FILE : start08.c<br />
PURPOSE : 68HC08 standard startup code<br />
LANGUAGE : ANSI-C / INLINE ASSEMBLER<br />
----------------------------------------------------------------------------<br />
HISTORY<br />
22 oct 93 Created.<br />
04/17/97 Also C++ constructors called in Init().<br />
******************************************************************************/<br />
#include "start08.h"<br />
/**********************************************************************/<br />
struct _tagStartup _startupData; /* read-only:<br />
_startupData is allocated in ROM and<br />
initialized by the linker */<br />
#define USE_C_IMPL 0 /* for now, we are using the inline assembler implementation for<br />
the startup code */<br />
#if !USE_C_IMPL<br />
#pragma MESSAGE DISABLE C20001 /* Warning C20001: Different value of stackpointer<br />
depending on control-flow */<br />
/* the function _COPY_L releases some bytes from the stack internally */<br />
#pragma NO_ENTRY<br />
#pragma NO_EXIT<br />
#pragma NO_FRAME<br />
static void near loadByte(void) {<br />
asm {<br />
PSHH<br />
PSHX<br />
LDA 5,SP<br />
PSHA<br />
LDX 7,SP<br />
PULH<br />
LDA 0,X<br />
AIX #1<br />
STX 6,SP<br />
PSHH<br />
PULX<br />
STX 5,SP<br />
PULX<br />
DRM007<br />
BLDC Motor <strong>Co</strong>ntrol Board for Industrial and Appliance Applications<br />
116 Source <strong>Co</strong>de MOTOROLA