home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / trash / part01 / i_o.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-22  |  540 b   |  43 lines

  1. #include    "register.h"
  2. #include    "symtab.h"
  3. #include    "diblock.h"
  4. #include    "instrn.h"
  5. #include    "process.h"
  6.  
  7. dinstrn    *
  8. i_or(dipc, rs, rt, rd, shamt, funct)
  9. dinstrn    *dipc;
  10. int        rs;
  11. int        rt;
  12. int        rd;
  13. int        shamt;
  14. int        funct;
  15. {
  16.     unsigned long    s;
  17.     unsigned long    t;
  18.  
  19.     procsget(rs, s);
  20.  
  21.     procsget(rt, t);
  22.  
  23.     procsput(rd, s | t);
  24.  
  25.     return dipc;
  26. }
  27.  
  28. dinstrn    *
  29. i_ori(dipc, rs, rt, immediate)
  30. dinstrn    *dipc;
  31. int        rs;
  32. int        rt;
  33. short        immediate;
  34. {
  35.     unsigned long    s;
  36.  
  37.     procsget(rs, s);
  38.  
  39.     procsput(rt, s | ((unsigned long)immediate & 0xFFFF));
  40.  
  41.     return dipc;
  42. }
  43.