www.pudn.com > OSBDM08.zip > HIDEF.H


/******************************************************/ 
/** 
* @file hidef.h 
* Machine/compiler dependent declarations. 
*/ 
/*---------------------------------------------------- 
   Copyright (c) Metrowerks, Basel, Switzerland 
               All rights reserved 
                  Do not modify! 
 *****************************************************/ 
 
#ifndef _H_HIDEF_ 
#define _H_HIDEF_ 
 
#ifdef __cplusplus 
extern "C" { 
#endif 
 
 
/**** Version for MC68HC08 */ 
#include  
#include  
 
#define CLOCKS_PER_SEC 4000000 
  /*!< \a CLOCKS_PER_SEC has to be user defined, depending on your timer/target. */ 
#pragma NO_STRING_CONSTR 
  /*!< allow '#' in HLI (used for HALT_AND_QUIT). */ 
#define HALT               __asm CLRA; __asm SWI ! {A}, {A+HX+SR}; 
  /*!< Allows to halt the simulator. */ 
#define HALTX(x)           __asm LDA x; __asm SWI ! {A}, {A+HX+SR}; 
  /*!< Macro to halt the simulator and to let the simulator perform an action (argument \a x), useful for automated testing.*/ 
#define HALT_AND_QUIT      HALTX(#32) 
  /*!< Macro to halt the simulator and to close it (exit), useful for automated testing.*/ 
#define EnableInterrupts   __asm CLI; 
  /*!< Macro to enable all interrupts. */ 
#define DisableInterrupts  __asm SEI; 
  /*!< Macro to disable all interrupts. */ 
 
extern char __SEG_END_SSTACK[]; 
  /*!< Declaration of a special linker symbol for the stack end, assumes a linker version of at least V5.0.10. Used for INIT_SP_FROM_STARTUP_DESC(). */ 
 
#define INIT_SP_FROM_STARTUP_DESC() __asm LDHX @__SEG_END_SSTACK; __asm TXS; 
  /*!< Macro to initialize the stack pointer with the end of the stack segment. */ 
 
#if !defined(__TINY__) 
  #define FAR 
  /*!< for tiny memory model, \a FAR is used as segment modifier */ 
#endif 
 
#define _FAR __far 
  /*!< _FAR is used instead of \a __far for backward compatibility. */ 
#define NEAR   __near 
  /*!< NEAR is used instead of \a __near for backward compatibility. */ 
#define _NEAR  __near 
  /*!< _NEAR is used instead of \a __near for backward compatibility. */ 
 
#ifdef __cplusplus 
 } 
#endif 
 
#endif 
 
/*****************************************************/ 
/* end hidef.h */