[526a993] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | romp.c -- external declarations
|
---|
| 4 | =============================================================================
|
---|
| 5 | */
|
---|
| 6 |
|
---|
[6262b5c] | 7 | #pragma once
|
---|
| 8 |
|
---|
| 9 | #include "regs.h"
|
---|
[6aa430b] | 10 | #include "setjmp.h"
|
---|
[6262b5c] | 11 | #include "stdint.h"
|
---|
| 12 |
|
---|
[2340de6] | 13 | #define MAXFNLN 13 /* xxxxxxxx.xxx + CR */
|
---|
| 14 | #define MAXARGLN 80 /* maximum argument length */
|
---|
| 15 | #define MAXCMDLN 128 /* maximum command line length */
|
---|
| 16 | #define MAXHS 80 /* maximum help string length */
|
---|
| 17 | #define MAXID 90 /* maximum ID string length */
|
---|
| 18 |
|
---|
| 19 | #define PDATELN 14
|
---|
| 20 |
|
---|
[6262b5c] | 21 | /*
|
---|
| 22 | =============================================================================
|
---|
[526a993] | 23 | external variables
|
---|
[6262b5c] | 24 | =============================================================================
|
---|
| 25 | */
|
---|
| 26 |
|
---|
[8c8b4e5] | 27 | extern volatile uint16_t *obj0;
|
---|
| 28 |
|
---|
[6262b5c] | 29 | extern int32_t afi;
|
---|
| 30 | extern int16_t aflag;
|
---|
| 31 | extern int8_t ahex[];
|
---|
| 32 | extern int8_t *aptr;
|
---|
| 33 | extern int16_t argln;
|
---|
| 34 | extern int8_t argsep;
|
---|
[2340de6] | 35 | extern int8_t argstr[MAXARGLN+1];
|
---|
[6262b5c] | 36 | extern int16_t asig;
|
---|
| 37 | extern int16_t astat;
|
---|
| 38 | extern int16_t aval;
|
---|
| 39 | extern int16_t b0flag;
|
---|
| 40 | extern int16_t b1flag;
|
---|
| 41 | extern uint16_t baroff;
|
---|
| 42 | extern uint16_t baron;
|
---|
| 43 | extern int16_t baseled;
|
---|
[2340de6] | 44 | extern int8_t bfname[MAXFNLN+1];
|
---|
| 45 | extern int8_t cmdline[MAXCMDLN+1];
|
---|
[6262b5c] | 46 | extern int16_t cmdunit;
|
---|
| 47 | extern int8_t *d_cur;
|
---|
| 48 | extern int8_t *d_last;
|
---|
| 49 | extern int8_t *d_next;
|
---|
| 50 | extern int16_t dflag;
|
---|
| 51 | extern int16_t exflag;
|
---|
| 52 | extern int16_t first1;
|
---|
| 53 | extern int32_t ftimer;
|
---|
| 54 | extern int16_t goflag;
|
---|
[2340de6] | 55 | extern int8_t hs_mtst[MAXHS+1];
|
---|
| 56 | extern int8_t idbuf[MAXID+1];
|
---|
[6262b5c] | 57 | extern int16_t ilast;
|
---|
| 58 | extern int16_t inext;
|
---|
| 59 | extern int16_t iplev;
|
---|
| 60 | extern int16_t ledcntr;
|
---|
| 61 | extern int8_t *monptr;
|
---|
| 62 | extern int16_t monsw;
|
---|
| 63 | extern uint16_t *p_ba0;
|
---|
| 64 | extern uint16_t *p_ba1;
|
---|
| 65 | extern uint16_t p_bv0;
|
---|
| 66 | extern uint16_t p_bv1;
|
---|
| 67 | extern int8_t *p_end;
|
---|
| 68 | extern int8_t *p_from;
|
---|
[add86dd] | 69 | extern int32_t p_goto;
|
---|
[6262b5c] | 70 | extern int32_t p_len;
|
---|
| 71 | extern int8_t *p_to;
|
---|
| 72 | extern int32_t p_value;
|
---|
| 73 | extern int32_t p_width;
|
---|
[2340de6] | 74 | extern int8_t promdate[PDATELN+1];
|
---|
[6262b5c] | 75 | extern int16_t redo;
|
---|
| 76 | extern struct regs *regptr;
|
---|
| 77 | extern jmp_buf restart;
|
---|
| 78 | extern int8_t *rlist[];
|
---|
| 79 | extern int16_t rnum;
|
---|
| 80 | extern int16_t sigadr[];
|
---|
| 81 | extern int16_t sigtab[128][2];
|
---|
| 82 | extern int8_t *sptr;
|
---|
| 83 | extern uint16_t swoff;
|
---|
| 84 | extern uint16_t swon;
|
---|
| 85 | extern uint16_t *tba0;
|
---|
| 86 | extern uint16_t *tba1;
|
---|
| 87 | extern int8_t *vrlist[];
|
---|
| 88 | extern int16_t vrnum;
|
---|
| 89 |
|
---|
| 90 | /*
|
---|
| 91 | =============================================================================
|
---|
[526a993] | 92 | external functions
|
---|
[6262b5c] | 93 | =============================================================================
|
---|
| 94 | */
|
---|
| 95 |
|
---|
| 96 | extern int16_t bphit(void);
|
---|
| 97 | extern int16_t cp_boot(void);
|
---|
| 98 | extern int16_t cp_chek(void);
|
---|
| 99 | extern int16_t cp_copy(void);
|
---|
| 100 | extern int16_t cp_dump(void);
|
---|
| 101 | extern int16_t cp_fill(void);
|
---|
| 102 | extern int16_t cp_go(void);
|
---|
| 103 | extern int16_t cp_ilev(void);
|
---|
| 104 | extern int16_t cp_ldmp(void);
|
---|
| 105 | extern int16_t cp_monc(void);
|
---|
| 106 | extern int16_t cp_monl(void);
|
---|
| 107 | extern int16_t cp_mons(void);
|
---|
| 108 | extern int16_t cp_mset(void);
|
---|
| 109 | extern int16_t cp_mtst(void);
|
---|
| 110 | extern int16_t cp_null(void);
|
---|
| 111 | extern int16_t cp_read(void);
|
---|
| 112 | extern int16_t cp_rset(void);
|
---|
| 113 | extern int16_t cp_vrst(void);
|
---|
| 114 | extern int16_t cp_wdmp(void);
|
---|
| 115 | extern int16_t cp_wfil(void);
|
---|
| 116 | extern int16_t cp_wset(void);
|
---|
| 117 | extern int16_t cx_adsp(void);
|
---|
| 118 | extern int16_t cx_boot(void);
|
---|
| 119 | extern int16_t cx_bpb(void);
|
---|
| 120 | extern int16_t cx_chek(void);
|
---|
| 121 | extern int16_t cx_copy(void);
|
---|
| 122 | extern int16_t cx_crsh(void);
|
---|
| 123 | extern int16_t cx_dini(void);
|
---|
| 124 | extern int16_t cx_dump(void);
|
---|
[298f0b4] | 125 | extern int16_t cx_exit(void);
|
---|
[6262b5c] | 126 | extern int16_t cx_fill(void);
|
---|
| 127 | extern int16_t cx_go(void);
|
---|
| 128 | extern int16_t cx_help(void);
|
---|
| 129 | extern int16_t cx_ilev(void);
|
---|
| 130 | extern int16_t cx_ldmp(void);
|
---|
| 131 | extern int16_t cx_load(void);
|
---|
| 132 | extern int16_t cx_mlod(void);
|
---|
| 133 | extern int16_t cx_mon(void);
|
---|
| 134 | extern int16_t cx_mset(void);
|
---|
| 135 | extern int16_t cx_mtst(void);
|
---|
| 136 | extern int16_t cx_next(void);
|
---|
| 137 | extern int16_t cx_omap(void);
|
---|
| 138 | extern int16_t cx_read(void);
|
---|
| 139 | extern int16_t cx_regs(void);
|
---|
[298f0b4] | 140 | extern int16_t cx_rest(void);
|
---|
[6262b5c] | 141 | extern int16_t cx_rset(void);
|
---|
| 142 | extern int16_t cx_vreg(void);
|
---|
| 143 | extern int16_t cx_vrst(void);
|
---|
| 144 | extern int16_t cx_wdmp(void);
|
---|
| 145 | extern int16_t cx_wfil(void);
|
---|
| 146 | extern int16_t cx_writ(void);
|
---|
| 147 | extern int16_t cx_wset(void);
|
---|
[298f0b4] | 148 | extern int16_t cx_zap(void);
|
---|
[6262b5c] | 149 | extern int16_t ddump(int8_t *loc, int8_t *lastloc, int16_t nwide, int16_t unit);
|
---|
| 150 | extern void do_cmd(void);
|
---|
| 151 | extern int16_t do_srec(int8_t *line);
|
---|
| 152 | extern void dobar(int16_t nb, int16_t bv);
|
---|
| 153 | extern void dosw(int16_t nb, int16_t sv);
|
---|
| 154 | extern int16_t dtext(int8_t *loc, int8_t *lastloc, int16_t nwide, int16_t unit);
|
---|
[432327d] | 155 | extern uint16_t exp_c(int16_t c);
|
---|
[6262b5c] | 156 | extern int16_t getarg(void);
|
---|
| 157 | extern int16_t getcmd(void);
|
---|
| 158 | extern int16_t getlong(int32_t *var);
|
---|
[5117699] | 159 | extern int16_t ldump(uint32_t *loc, uint32_t *lastloc, int16_t nwide, int16_t unit);
|
---|
[6262b5c] | 160 | extern void main(void);
|
---|
[add86dd] | 161 | extern void padr(void *adr, int16_t unit);
|
---|
[6262b5c] | 162 | extern int16_t pclr(void);
|
---|
| 163 | extern void progid(void);
|
---|
| 164 | extern int16_t pscan(void);
|
---|
[298f0b4] | 165 | extern void puthn(uint32_t num, int16_t cw, int16_t unit);
|
---|
| 166 | extern void putn(uint32_t num, int16_t cw, int16_t unit);
|
---|
[7ecfb7b] | 167 | extern void rompbp(uint32_t d0, ...);
|
---|
[7d4cf30] | 168 | extern int16_t setp(void *var, void *deflt);
|
---|
[6262b5c] | 169 | extern int16_t setvar(int32_t *var, int32_t deflt);
|
---|
| 170 | extern void showcr(void);
|
---|
| 171 | extern void showrs(struct regs *rp);
|
---|
| 172 | extern int16_t waitcr2(void);
|
---|
| 173 | extern int16_t wdump(uint16_t *loc, uint16_t *lastloc, int16_t nwide, int16_t unit);
|
---|
| 174 | extern int16_t xdtoi(int16_t c);
|
---|