home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / assembler / as / src / c / m_copmem < prev    next >
Encoding:
Text File  |  1992-07-21  |  702 b   |  41 lines

  1.  
  2. /*
  3.  * m_copmem.c
  4.  * Copyright © 1992 Niklas Röjemo
  5.  */
  6.  
  7. #include "mnemonics.h"
  8. #include "error.h"
  9. #include "option.h"
  10. #include "input.h"
  11. #include "expr.h"
  12. #include "reloc.h"
  13. #include "put.h"
  14. #include "area.h"
  15. #include "get.h"
  16. #include "help_cop.h"
  17.  
  18. /** MEMMORY **/
  19.  
  20.  
  21. static void dstmem(unsigned int ir)
  22. {
  23.   ir |= CP_NUMBER(help_copInt(15,"coprocessor number"));
  24.   skipblanks();
  25.   if(inputLook() == ',') {inputSkip(); skipblanks();}
  26.   else error(ErrorError,TRUE,"Inserting a comma after coprocessor number.");
  27.   ir |= CPDST_OP(getCopReg());
  28.   ir = help_copAddr(ir);
  29.   putIns(ir);
  30. }
  31.  
  32. void m_ldc(unsigned int cc)
  33. {
  34.   dstmem(cc | 0x0c100000);
  35. }
  36.  
  37. void m_stc(unsigned int cc)
  38. {
  39.   dstmem(cc | 0x0c000000);
  40. }
  41.