fns.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* arg */
  2. Iarg *adup(Iarg *x);
  3. Iarg *areg(Cpu *cpu, unsigned char len, unsigned char reg);
  4. Iarg *amem(Cpu *cpu, unsigned char len, unsigned char sreg, unsigned long off);
  5. Iarg *afar(Iarg *mem, unsigned char len, unsigned char alen);
  6. Iarg *acon(Cpu *cpu, unsigned char len, unsigned long val);
  7. unsigned long ar(Iarg *a);
  8. long ars(Iarg *a);
  9. void aw(Iarg *a, unsigned long w);
  10. /* decode */
  11. void decode(Iarg *ip, Inst *i);
  12. /* xec */
  13. void trap(Cpu *cpu, int e);
  14. int intr(Cpu *cpu, int v);
  15. int xec(Cpu *cpu, int n);
  16. int instfmt(Fmt *fmt);
  17. int flagfmt(Fmt *fmt);
  18. int cpufmt(Fmt *fmt);
  19. /* pit */
  20. void clockpit(Pit *pit, long long cycles);
  21. void setgate(Pit *ch, unsigned char gate);
  22. unsigned char rpit(Pit *pit, unsigned char addr);
  23. void wpit(Pit *pit, unsigned char addr, unsigned char data);
  24. /* For a poor-mans function tracer (can add these with spatch) */
  25. void __print_func_entry(const char *func, const char *file, int line);
  26. void __print_func_exit(const char *func, const char *file, int line);
  27. void set_printx(int mode);
  28. #define print_func_entry() __print_func_entry(__FUNCTION__, __FILE__, __LINE__)
  29. #define print_func_exit() __print_func_exit(__FUNCTION__, __FILE__, __LINE__)