/* Purpose: contains two functions for pm reading (PmRead16Bits, PmRead32Bits) Creation Date: 2006/03/21 Notes: no significant changes have been made with respect to previous version */ /* files include */ #include /* include assembly macros */ /******************************************************************** * * PmRead32Bits - reads the Program memory cell and returns the * 32bits Most significant bit * * * * ARGUMENTS * Input Parameters * N/A * Output Parameters * N/A * Global Variables * description * description * * RETURNS: N/A * * SEE ALSO: * * INTERNAL * This section will not appear in the generated manual entry. * */ /* unsigned long PmRread32bit( unsigned long m_PmCellAddr, ) */ .segment /pm seg_pmco; .global _PmRead32Bits; _PmRead32Bits: leaf_entry; /* the first three parameters are passed in r4 r8 r12 register */ /* return value is passed in r0 register */ puts=i8; /* save i4 register */ i8=r4; /* read the first argument,pointer to the PM cell */ px=pm(m13,i8); /* load in px the cell value pointed from i8 */ r0=px2; /* return px1 */ i8=gets(1); leaf_exit; .endseg; /******************************************************************** * * PmRead16Bits - The function reads the pm and returns the 16 bits * Less significant bits * * * * ARGUMENTS * Input Parameters * N/A * Output Parameters * N/A * Global Variables * description * description * * RETURNS: N/A * * SEE ALSO: * * INTERNAL * This section will not appear in the generated manual entry. * */ /* unsigned long PmRead16Bits( unsigned long m_PmCellAddr, ) */ .segment /pm seg_pmco; .global _PmRead16Bits; _PmRead16Bits: leaf_entry; /* the first three parameters are passed in r4 r8 r12 register */ /* return value is passed in r0 register */ puts=i8; /* save i8 register */ i8=r4; /* read the first argument,pointer to the PM cell */ px=pm(m13,i8); /* put pm value in px register */ r0=px1; /* return the px2 value */ i8=gets(1); leaf_exit; .endseg;