home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / RiscOS / APP / DEVS / FORTH / BEETLE / BEETLE.ZIP / Beetle / debug.h < prev    next >
C/C++ Source or Header  |  1997-05-23  |  2KB  |  53 lines

  1. /* DEBUG.H
  2.  
  3.     Vrsn  Date   Comment
  4.     ----|-------|---------------------------------------------------------------
  5.     0.00 17nov94
  6.     0.01 18nov94 Changed showEP to val_EP. Added endass.
  7.     0.02 21nov94 Added lit.
  8.     0.03 22nov94 Added ibytes and current; added start_ass, renamed endass
  9.                  to end_ass, and added ilit.
  10.     0.04 28nov94 Added R0 and show_return_stack.
  11.     0.05 29nov94 Added val_data_stack.
  12.     0.06 19feb95 Added toass. Return type of disass changed to const char *.
  13.  
  14.     Reuben Thomas
  15.  
  16.  
  17.     Header for debug.c.
  18.  
  19. */
  20.  
  21.  
  22. #ifndef BEETLE_DEBUG
  23. #define BEETLE_DEBUG
  24.  
  25.  
  26. #include "beetle.h"     /* main header */
  27.  
  28.  
  29. extern int instrs;  /* number of instructions assembled */
  30. extern int ibytes;  /* number of opcodes assembled in current instruction word
  31.                        so far */
  32. extern CELL *current;    /* where the current instruction word will be stored */
  33. extern CELL *here;  /* where we assemble the next instruction word or literal */
  34. extern CELL *S0;    /* pointer to base of data stack */
  35. extern CELL *R0;    /* pointer to base of return stack */
  36.  
  37. void ass(BYTE instr);    /* assemble an instruction */
  38. void lit(CELL literal);    /* assemble a cell literal */
  39. void ilit(CELL literal);    /* assemble an immediate literal */
  40. void start_ass(void);    /* start assembly, initialising variables */
  41. void end_ass(void);  /* end assembly, storing any pending instructions */
  42. const char *disass(BYTE opcode);  /* disassemble an instruction */
  43. BYTE toass(char *token);    /* convert a instruction to its opcode */
  44.  
  45. CELL val_EP(void);  /* return the current contents of EP */
  46. char *val_data_stack(void); /* return the current data stack as a string */
  47. void show_data_stack(void); /* show the current contents of the data stack */
  48. void show_return_stack(void);    /* show the current contents of the return stack
  49.                                 */
  50.  
  51.  
  52. #endif
  53.