home *** CD-ROM | disk | FTP | other *** search
- /*-> c.test */
- #include <stdio.h>
-
- #include "flex.h"
- #include "heap.h"
-
- #include "types.h"
- #include "hp11.h"
- #include "translate.h"
-
- struct Regs hp11r; /* the current internal state */
- int on, quit, running, fast, error, skip; /* various flags indicating
- the run mode ... */
- int PC, retStack[MAXSTACK], retCnt; /* PC & return stack (4 levels) */
- int Flags; /* the current flags */
-
- int waiting, ProgStepWait;
-
- int comma = FALSE;
-
- void ExecIns(int ip)
- {
- }
-
- int main(void)
- {
- FILE *ptr;
- int file_length;
-
- Prog[0] = 1;
- Prog[1] = 10;
- Prog[3] = 29;
- Prog[4] = 45;
- Prog[5] = 100;
- Prog[6] = 22;
- Prog[7] = 50;
- Prog[8] = 56;
- lastIns = 8;
-
- flex_init();
- heap_init(TRUE);
-
- ptr = fopen("results","w");
-
- code_buffer = (char*)heap_alloc((unsigned int) (lastIns+1)*MAXCODE);
- file_length = hp11_encode();
- fprintf(ptr, "file length = %d bytes\n\n%s", file_length, code_buffer);
-
- fclose(ptr);
-
- heap_free((void *)code_buffer);
- return 0;
- }
-