home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / h / hp11 / Amiga_Code / c / test < prev    next >
Encoding:
Text File  |  1992-05-07  |  967 b   |  54 lines

  1. /*-> c.test  */
  2. #include <stdio.h>
  3.  
  4. #include "flex.h"
  5. #include "heap.h"
  6.  
  7. #include "types.h"
  8. #include "hp11.h"
  9. #include "translate.h"
  10.  
  11. struct Regs hp11r; /* the current internal state */
  12. int on, quit, running, fast, error, skip; /* various flags indicating
  13.  the run mode ... */
  14. int PC, retStack[MAXSTACK], retCnt; /* PC & return stack (4 levels) */
  15. int Flags; /* the current flags */
  16.  
  17. int waiting, ProgStepWait;
  18.  
  19. int comma = FALSE;
  20.  
  21. void ExecIns(int ip)
  22. {
  23. }
  24.  
  25. int main(void)
  26. {
  27.   FILE *ptr;
  28.   int         file_length;
  29.  
  30.   Prog[0] = 1;
  31.   Prog[1] = 10;
  32.   Prog[3] = 29;
  33.   Prog[4] = 45;
  34.   Prog[5] = 100;
  35.   Prog[6] = 22;
  36.   Prog[7] = 50;
  37.   Prog[8] = 56;
  38.   lastIns = 8;
  39.  
  40.   flex_init();
  41.   heap_init(TRUE);
  42.  
  43.   ptr = fopen("results","w");
  44.  
  45.   code_buffer = (char*)heap_alloc((unsigned int) (lastIns+1)*MAXCODE);
  46.   file_length = hp11_encode();
  47.   fprintf(ptr, "file length = %d bytes\n\n%s", file_length, code_buffer);
  48.  
  49.   fclose(ptr);
  50.  
  51.   heap_free((void *)code_buffer);
  52.   return 0;
  53. }
  54.