- Timestamp:
- 07/09/2017 04:45:34 PM (7 years ago)
- Branches:
- master
- Children:
- 8618599
- Parents:
- 0292fbb
- Location:
- rom
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
rom/booter.c
r0292fbb r7258c6a 15 15 #include "biosdefs.h" 16 16 17 extern FILE *fopenb( char *name, char*mode);18 extern int fclose(FILE *ptr);19 extern int fread(char *buffer, unsigned size, int number, FILE *stream);20 extern int flread(char *buff, longlen, FILE *fp);21 extern longgetl(FILE *stream);17 extern FILE *fopenb(int8_t *name, int8_t *mode); 18 extern int16_t fclose(FILE *ptr); 19 extern int16_t fread(int8_t *buffer, uint16_t size, int16_t number, FILE *stream); 20 extern int16_t flread(int8_t *buff, int32_t len, FILE *fp); 21 extern int32_t getl(FILE *stream); 22 22 23 23 #if PRINTIT 24 24 extern struct fcb *SnapFCB(struct fcb *fcp); 25 extern int ClusMap(struct fcb *fcp);25 extern int16_t ClusMap(struct fcb *fcp); 26 26 #endif 27 27 … … 30 30 struct EXFILE B_fhdr; /* executable file header */ 31 31 32 longB_txt_o, /* test origin from file header */32 int32_t B_txt_o, /* test origin from file header */ 33 33 B_dat_o, /* data origin from file header */ 34 34 B_bss_o, /* bss origin from file header */ … … 40 40 B_chk; /* checksum */ 41 41 42 char*B_buf_a; /* boot load address */42 int8_t *B_buf_a; /* boot load address */ 43 43 44 short B_log_s; /* boot log switch */45 short B_dbg_s; /* boot debug switch */44 int16_t B_log_s; /* boot log switch */ 45 int16_t B_dbg_s; /* boot debug switch */ 46 46 47 47 /* … … 56 56 */ 57 57 58 short booter(char *fn, longtextadr)58 int16_t booter(int8_t *fn, int32_t textadr) 59 59 { 60 register longi, bgnbss, endbss;61 register char*cp;60 register int32_t i, bgnbss, endbss; 61 register int8_t *cp; 62 62 #if PRINTIT 63 63 register struct fcb *fcp; -
rom/romp.c
r0292fbb r7258c6a 42 42 #include "vsddvars.h" 43 43 #endif 44 45 typedef unsigned short UWORD16; /* unsigned 16 bit word */46 44 47 45 /* … … 122 120 */ 123 121 124 extern u nsigned setipl(unsignedarg);122 extern uint16_t setipl(uint16_t arg); 125 123 126 124 extern void rjumpto(void *addr); 127 125 extern void halt(void); 128 extern int getln(int unit, int nb, char*buf);126 extern int16_t getln(int16_t unit, int16_t nb, int8_t *buf); 129 127 extern void sjumpto(void *addr, void *stack); 130 128 extern void trap15(void); … … 133 131 #if ON_B700 134 132 extern void hdvini(void); 135 extern short booter(char *fn, longtextadr);136 extern void vsndpal( short pp[16][3]);133 extern int16_t booter(int8_t *fn, int32_t textadr); 134 extern void vsndpal(int16_t pp[16][3]); 137 135 #endif 138 136 139 137 /* external variables */ 140 138 141 extern short wzcrsh, *crshpc, *crshsp, *crshus, crshst[16];139 extern int16_t wzcrsh, *crshpc, *crshsp, *crshus, crshst[16]; 142 140 143 141 #if ON_B700 144 extern short B_log_s;145 extern short B_dbg_s;146 extern char*B_buf_a;147 extern int _bpbin;148 extern short dfltpal[16][3];142 extern int16_t B_log_s; 143 extern int16_t B_dbg_s; 144 extern int8_t *B_buf_a; 145 extern int16_t _bpbin; 146 extern int16_t dfltpal[16][3]; 149 147 #endif 150 148 151 extern UWORD16crshsr;152 extern longcrshrg[16];153 extern charcrshvc[4];149 extern uint16_t crshsr; 150 extern int32_t crshrg[16]; 151 extern int8_t crshvc[4]; 154 152 155 153 /* forward references */ 156 154 157 int cp_dump(void);158 int cp_fill(void);159 int cp_copy(void);160 int cp_null(void);161 int cp_ilev(void);162 int cp_ldmp(void);163 int cp_go(void);164 int cp_read(void);165 int cp_mset(void);166 int cp_rset(void);167 int cp_wset(void);168 int cp_mtst(void);169 int cp_wdmp(void);170 int cp_wfil(void);171 int cp_vrst(void);172 int cp_monc(void);173 int cp_mons(void);174 int cp_monl(void);175 int cp_chek(void);155 int16_t cp_dump(void); 156 int16_t cp_fill(void); 157 int16_t cp_copy(void); 158 int16_t cp_null(void); 159 int16_t cp_ilev(void); 160 int16_t cp_ldmp(void); 161 int16_t cp_go(void); 162 int16_t cp_read(void); 163 int16_t cp_mset(void); 164 int16_t cp_rset(void); 165 int16_t cp_wset(void); 166 int16_t cp_mtst(void); 167 int16_t cp_wdmp(void); 168 int16_t cp_wfil(void); 169 int16_t cp_vrst(void); 170 int16_t cp_monc(void); 171 int16_t cp_mons(void); 172 int16_t cp_monl(void); 173 int16_t cp_chek(void); 176 174 177 175 #if ON_B700 178 int cx_dini(void);179 int cx_mlod(void);180 int cp_boot(void);181 int cx_boot(void);182 int cx_adsp(void);176 int16_t cx_dini(void); 177 int16_t cx_mlod(void); 178 int16_t cp_boot(void); 179 int16_t cx_boot(void); 180 int16_t cx_adsp(void); 183 181 #endif 184 182 185 int cx_dump(void);186 int cx_fill(void);187 int cx_copy(void);188 int cx_rset(void);189 int cx_load(void);190 int cx_go(void);191 int cx_read(void);192 int cx_help(void);183 int16_t cx_dump(void); 184 int16_t cx_fill(void); 185 int16_t cx_copy(void); 186 int16_t cx_rset(void); 187 int16_t cx_load(void); 188 int16_t cx_go(void); 189 int16_t cx_read(void); 190 int16_t cx_help(void); 193 191 void cx_exit(void); 194 int cx_writ(void);195 int cx_regs(void);196 int cx_mset(void);197 int cx_bpb(void);198 int cx_wset(void);199 int cx_wdmp(void);200 int cx_wfil(void);192 int16_t cx_writ(void); 193 int16_t cx_regs(void); 194 int16_t cx_mset(void); 195 int16_t cx_bpb(void); 196 int16_t cx_wset(void); 197 int16_t cx_wdmp(void); 198 int16_t cx_wfil(void); 201 199 void cx_rest(void); 202 int cx_vrst(void);203 int cx_vreg(void);204 int cx_mon(void);205 int cx_next(void);206 int cx_ilev(void);207 int do_srec(char*line);208 int cx_crsh(void);209 int cx_mtst(void);200 int16_t cx_vrst(void); 201 int16_t cx_vreg(void); 202 int16_t cx_mon(void); 203 int16_t cx_next(void); 204 int16_t cx_ilev(void); 205 int16_t do_srec(int8_t *line); 206 int16_t cx_crsh(void); 207 int16_t cx_mtst(void); 210 208 void cx_zap(void); 211 int cx_ldmp(void);212 int cx_omap(void);213 int cx_chek(void);214 215 charhs_mtst[];209 int16_t cx_ldmp(void); 210 int16_t cx_omap(void); 211 int16_t cx_chek(void); 212 213 int8_t hs_mtst[]; 216 214 217 215 /* … … 247 245 struct cmdent { /* command table entry */ 248 246 249 char*cname; /* command name pointer */250 int (*cp)(); /* command parser function pointer */251 int (*cx)(); /* command execution function pointer */252 char*hstr; /* help string pointer */247 int8_t *cname; /* command name pointer */ 248 int16_t (*cp)(); /* command parser function pointer */ 249 int16_t (*cx)(); /* command execution function pointer */ 250 int8_t *hstr; /* help string pointer */ 253 251 }; 254 252 … … 316 314 */ 317 315 318 charahex[] = "0123456789abcdefABCDEF";319 320 char*rlist[] = { /* register name list */316 int8_t ahex[] = "0123456789abcdefABCDEF"; 317 318 int8_t *rlist[] = { /* register name list */ 321 319 322 320 "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", 323 321 "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", 324 322 "sr", "pc", "sp", 325 ( char*)0323 (int8_t *)0 326 324 }; 327 325 328 char*vrlist[] = { /* video register name list */326 int8_t *vrlist[] = { /* video register name list */ 329 327 330 328 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", 331 329 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", 332 330 "h0", "h1", "h2", "h3", "v0", "v1", "v2", "v3", 333 ( char*)0331 (int8_t *)0 334 332 }; 335 333 336 334 #if ON_B700 337 int sigadr[] = { /* display offsets for signals */335 int16_t sigadr[] = { /* display offsets for signals */ 338 336 339 337 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, /* keys */ … … 366 364 */ 367 365 368 charargsep; /* argument separator */369 370 char*aptr, /* argument pointer */366 int8_t argsep; /* argument separator */ 367 368 int8_t *aptr, /* argument pointer */ 371 369 *monptr, /* monitored variable pointer */ 372 370 *d_cur, /* dump current from */ … … 379 377 *sptr; /* string scan pointer */ 380 378 381 short argln, /* argument length */379 int16_t argln, /* argument length */ 382 380 b0flag, /* breakpoint 0 flag */ 383 381 b1flag, /* breakpoint 1 flag */ … … 400 398 401 399 #if ON_B700 402 short asig, /* signal number */400 int16_t asig, /* signal number */ 403 401 aval, /* signal value */ 404 402 astat, /* signal status */ … … 407 405 ledcntr; /* LED scan counter */ 408 406 409 short sigtab[128][2]; /* signal table */410 411 longafi, /* analog FIFO input */407 int16_t sigtab[128][2]; /* signal table */ 408 409 int32_t afi, /* analog FIFO input */ 412 410 ftimer; /* analog FIFO clear timer */ 413 411 414 u nsignedbaron, /* bar 'on' color */412 uint16_t baron, /* bar 'on' color */ 415 413 baroff, /* bar 'off' color */ 416 414 swon, /* switch 'on' color */ … … 419 417 #endif 420 418 421 UWORD16*tba0, /* breakpoint 0 temporary */419 uint16_t *tba0, /* breakpoint 0 temporary */ 422 420 *tba1; /* breakpoint 1 temporary */ 423 421 424 UWORD16p_bv0, /* breakpoint 0 value */422 uint16_t p_bv0, /* breakpoint 0 value */ 425 423 p_bv1; /* breakpoint 1 value */ 426 424 427 UWORD16*p_ba0, /* breakpoint 0 address */425 uint16_t *p_ba0, /* breakpoint 0 address */ 428 426 *p_ba1; /* breakpoint 1 address */ 429 427 430 428 jmp_buf restart; /* jmp environment */ 431 429 432 longp_len, /* length parameter */430 int32_t p_len, /* length parameter */ 433 431 p_value, /* value parameter */ 434 432 p_width; /* width parameter */ … … 436 434 struct regs *regptr; /* register save area pointer */ 437 435 438 charargstr[MAXARGLN+1], /* argument string */436 int8_t argstr[MAXARGLN+1], /* argument string */ 439 437 cmdline[MAXCMDLN+1], /* command line */ 440 438 bfname[MAXFNLN+1], /* boot file name */ … … 475 473 */ 476 474 477 int cx_mlod(void)478 { 479 register short i;475 int16_t cx_mlod(void) 476 { 477 register int16_t i; 480 478 481 479 B_log_s = TRUE; … … 496 494 497 495 for (i = 0; i < 7; i++) /* clear a0..a6 */ 498 regptr->a_reg[i] = ( char*)0L;496 regptr->a_reg[i] = (int8_t *)0L; 499 497 500 498 regptr->a_reg[7] = ISTACK; /* setup initial stack */ … … 517 515 */ 518 516 519 int cp_boot(void)520 { 521 register int i;522 register charendc;517 int16_t cp_boot(void) 518 { 519 register int16_t i; 520 register int8_t endc; 523 521 524 522 redo = FALSE; … … 560 558 */ 561 559 562 int cx_boot(void)563 { 564 register short i;560 int16_t cx_boot(void) 561 { 562 register int16_t i; 565 563 566 564 B_log_s = TRUE; … … 580 578 581 579 for (i = 0; i < 7; i++) /* clear a0..a6 */ 582 regptr->a_reg[i] = ( char*)0L;580 regptr->a_reg[i] = (int8_t *)0L; 583 581 584 582 regptr->a_reg[7] = ISTACK; /* setup initial stack */ … … 601 599 */ 602 600 603 void dobar(int nb, int bv)604 { 605 register u nsigned*bp;606 register int i;601 void dobar(int16_t nb, int16_t bv) 602 { 603 register uint16_t *bp; 604 register int16_t i; 607 605 608 606 if ((nb LT 1) OR (nb GT 82)) … … 610 608 611 609 --nb; 612 bp = obj0 + BARBASE + ( long)(sigadr[nb] + MARGIN + nb);610 bp = obj0 + BARBASE + (int32_t)(sigadr[nb] + MARGIN + nb); 613 611 614 612 for (i = 127; i GE 0; --i) { … … 641 639 */ 642 640 643 void dosw(int nb, int sv)644 { 645 register u nsigned*bp;646 register int i, j;641 void dosw(int16_t nb, int16_t sv) 642 { 643 register uint16_t *bp; 644 register int16_t i, j; 647 645 648 646 if ((nb LT 1) OR (nb GT 82)) … … 650 648 651 649 --nb; 652 bp = obj0 + SWBASE + ( long)(sigadr[nb] + MARGIN + nb);650 bp = obj0 + SWBASE + (int32_t)(sigadr[nb] + MARGIN + nb); 653 651 654 652 if (sv) … … 674 672 */ 675 673 676 u nsigned exp_c(unsignedc)674 uint16_t exp_c(uint16_t c) 677 675 { 678 676 c &= 0x000F; … … 693 691 */ 694 692 695 int cx_adsp(void)696 { 697 register int xasig, xastat, xaval;698 register longxafi;699 register longlc;700 register u nsigned*bp;701 int i, j, k;702 int oldi;693 int16_t cx_adsp(void) 694 { 695 register int16_t xasig, xastat, xaval; 696 register int32_t xafi; 697 register int32_t lc; 698 register uint16_t *bp; 699 int16_t i, j, k; 700 int16_t oldi; 703 701 704 702 memsetw(sigtab, 0, sizeof sigtab / 2); … … 831 829 */ 832 830 833 int waitcr(void)834 { 835 charc;831 int16_t waitcr(void) 832 { 833 int8_t c; 836 834 837 835 BIOS(B_PUTC, CON_DEV, '\007'); … … 856 854 */ 857 855 858 int xdtoi(int c)859 { 860 register int i;861 register char*ap = &ahex[0];856 int16_t xdtoi(int16_t c) 857 { 858 register int16_t i; 859 register int8_t *ap = &ahex[0]; 862 860 863 861 for (i = 0; i < 22; i++) … … 881 879 */ 882 880 883 int getcmd(void)884 { 885 register int c;881 int16_t getcmd(void) 882 { 883 register int16_t c; 886 884 887 885 sptr = cmdline; … … 944 942 */ 945 943 946 int getarg(void)947 { 948 register int c;944 int16_t getarg(void) 945 { 946 register int16_t c; 949 947 950 948 argln = 0; … … 1009 1007 */ 1010 1008 1011 int getlong(long*var)1012 { 1013 register longtemp = 0L;1014 register int csw = FALSE,1009 int16_t getlong(int32_t *var) 1010 { 1011 register int32_t temp = 0L; 1012 register int16_t csw = FALSE, 1015 1013 c; 1016 1014 … … 1050 1048 */ 1051 1049 1052 int setvar(long *var, longdeflt)1053 { 1054 int rc;1055 longtemp;1050 int16_t setvar(int32_t *var, int32_t deflt) 1051 { 1052 int16_t rc; 1053 int32_t temp; 1056 1054 1057 1055 *var = deflt; … … 1104 1102 */ 1105 1103 1106 void putn( long num, int cw, int unit)1107 { 1108 register int d;1104 void putn(int32_t num, int16_t cw, int16_t unit) 1105 { 1106 register int16_t d; 1109 1107 1110 1108 if (!cw) … … 1130 1128 */ 1131 1129 1132 void puthn( long num, int cw, int unit)1133 { 1134 register int d;1130 void puthn(int32_t num, int16_t cw, int16_t unit) 1131 { 1132 register int16_t d; 1135 1133 1136 1134 if (!cw) … … 1159 1157 */ 1160 1158 1161 int ddump(char *loc, char *lastloc, int nwide, int unit)1159 int16_t ddump(int8_t *loc, int8_t *lastloc, int16_t nwide, int16_t unit) 1162 1160 { 1163 1161 while (nwide--) { 1164 1162 1165 puthn(( long)(0xFF & *loc), 2, unit);1163 puthn((int32_t)(0xFF & *loc), 2, unit); 1166 1164 BIOS(B_PUTC, unit, ' '); 1167 1165 … … 1195 1193 */ 1196 1194 1197 void padr( long adr, int unit)1195 void padr(int32_t adr, int16_t unit) 1198 1196 { 1199 1197 puthn(adr, 8, unit); … … 1213 1211 */ 1214 1212 1215 int dtext(char *loc, char *lastloc, int nwide, int unit)1216 { 1217 register int c;1213 int16_t dtext(int8_t *loc, int8_t *lastloc, int16_t nwide, int16_t unit) 1214 { 1215 register int16_t c; 1218 1216 1219 1217 BIOS(B_PUTC, unit, ' '); … … 1259 1257 */ 1260 1258 1261 int cp_mset(void)1259 int16_t cp_mset(void) 1262 1260 { 1263 1261 redo = FALSE; … … 1281 1279 */ 1282 1280 1283 int cx_mset(void)1281 int16_t cx_mset(void) 1284 1282 { 1285 1283 while (TRUE) { … … 1308 1306 */ 1309 1307 1310 int cp_wset(void)1308 int16_t cp_wset(void) 1311 1309 { 1312 1310 redo = FALSE; … … 1321 1319 return(FALSE); 1322 1320 1323 if (( long)p_from & 1L)1321 if ((int32_t)p_from & 1L) 1324 1322 return(FALSE); 1325 1323 … … 1337 1335 */ 1338 1336 1339 int cx_wset(void)1340 { 1341 UWORD16*p_uint;1342 1343 p_uint = ( UWORD16*)p_from;1337 int16_t cx_wset(void) 1338 { 1339 uint16_t *p_uint; 1340 1341 p_uint = (uint16_t *)p_from; 1344 1342 1345 1343 while (TRUE) { … … 1369 1367 */ 1370 1368 1371 int cp_mtst(void)1369 int16_t cp_mtst(void) 1372 1370 { 1373 1371 inext = ilast; … … 1375 1373 if (argsep EQ A_CR OR argsep EQ '\0') { 1376 1374 1377 p_from = ( char*)0x00000008L;1378 p_to = ( char*)USER_RAM - 2L;1375 p_from = (int8_t *)0x00000008L; 1376 p_to = (int8_t *)USER_RAM - 2L; 1379 1377 return(TRUE); 1380 1378 } … … 1391 1389 return(FALSE); 1392 1390 1393 if (( long)p_from & 1L)1391 if ((int32_t)p_from & 1L) 1394 1392 return(FALSE); 1395 1393 1396 if (( long)p_to & 1L)1394 if ((int32_t)p_to & 1L) 1397 1395 return(FALSE); 1398 1396 … … 1413 1411 */ 1414 1412 1415 int cx_mtst(void)1416 { 1417 register short mask, was, *loc, *eloc, *oldloc;1413 int16_t cx_mtst(void) 1414 { 1415 register int16_t mask, was, *loc, *eloc, *oldloc; 1418 1416 1419 1417 mask = 0x0001; 1420 loc = ( short *)p_from;1421 eloc = ( short *)p_to;1418 loc = (int16_t *)p_from; 1419 eloc = (int16_t *)p_to; 1422 1420 oldloc = loc; 1423 1421 1424 if (p_from LT ( char*)USER_RAM)1422 if (p_from LT (int8_t *)USER_RAM) 1425 1423 setipl(7); 1426 1424 … … 1432 1430 1433 1431 if (mask NE (was = *loc)) 1434 if (p_from LT ( char*)USER_RAM)1432 if (p_from LT (int8_t *)USER_RAM) 1435 1433 halt(); 1436 1434 else … … 1441 1439 1442 1440 if (~mask NE (was = *loc)) 1443 if (p_from LT ( char*)USER_RAM)1441 if (p_from LT (int8_t *)USER_RAM) 1444 1442 halt(); 1445 1443 else … … 1455 1453 } while (loc LE eloc); 1456 1454 1457 if (oldloc LT ( short *)USER_RAM)1458 rjumpto(( long)ROMADDR);1455 if (oldloc LT (int16_t *)USER_RAM) 1456 rjumpto((int32_t)ROMADDR); 1459 1457 1460 1458 return(TRUE); … … 1471 1469 */ 1472 1470 1473 int cp_go(void)1471 int16_t cp_go(void) 1474 1472 { 1475 1473 redo = FALSE; … … 1483 1481 return(FALSE); 1484 1482 1485 if (1L & ( long)p_goto)1483 if (1L & (int32_t)p_goto) 1486 1484 return(FALSE); 1487 1485 … … 1495 1493 return(FALSE); 1496 1494 1497 if (1L & ( long)tba0)1495 if (1L & (int32_t)tba0) 1498 1496 return(FALSE); 1499 1497 … … 1506 1504 return(FALSE); 1507 1505 1508 if (1L & ( long)tba1)1506 if (1L & (int32_t)tba1) 1509 1507 return(FALSE); 1510 1508 … … 1527 1525 */ 1528 1526 1529 int cx_dini(void)1527 int16_t cx_dini(void) 1530 1528 { 1531 1529 redo = TRUE; … … 1544 1542 void cx_zap(void) 1545 1543 { 1546 register short *p, *q;1547 1548 p = ( short *)USER_RAM;1549 q = ( short *)RAM_TOP;1544 register int16_t *p, *q; 1545 1546 p = (int16_t *)USER_RAM; 1547 q = (int16_t *)RAM_TOP; 1550 1548 1551 1549 setipl(7); … … 1567 1565 */ 1568 1566 1569 int cx_omap(void)1570 { 1571 register short i, width, xloc;1567 int16_t cx_omap(void) 1568 { 1569 register int16_t i, width, xloc; 1572 1570 1573 1571 printf("Pr B/C Locn Wd Xloc Flags\r\n"); … … 1586 1584 1587 1585 printf("$%08lX %2d %4d ", 1588 (( long)v_odtab[i][2] << 1), width, xloc);1586 ((int32_t)v_odtab[i][2] << 1), width, xloc); 1589 1587 1590 1588 printf("$%04X\r\n", v_odtab[i][0]); … … 1604 1602 */ 1605 1603 1606 int cx_help(void)1607 { 1608 int i, j;1604 int16_t cx_help(void) 1605 { 1606 int16_t i, j; 1609 1607 1610 1608 j = 0; … … 1643 1641 */ 1644 1642 1645 int cx_bpb(void)1643 int16_t cx_bpb(void) 1646 1644 { 1647 1645 register struct bpb *bpp; … … 1656 1654 writeln(cmdunit, "\r\n\nBPB values:\r\n"); 1657 1655 writeln(cmdunit, "\r\n recsiz "); 1658 putn(( long)bpp->recsiz, 5, cmdunit);1656 putn((int32_t)bpp->recsiz, 5, cmdunit); 1659 1657 writeln(cmdunit, "\r\n clsiz "); 1660 putn(( long)bpp->clsiz, 4, cmdunit);1658 putn((int32_t)bpp->clsiz, 4, cmdunit); 1661 1659 writeln(cmdunit, "\r\n clsizb "); 1662 putn(( long)bpp->clsizb, 5, cmdunit);1660 putn((int32_t)bpp->clsizb, 5, cmdunit); 1663 1661 writeln(cmdunit, "\r\n rdlen "); 1664 putn(( long)bpp->rdlen, 4, cmdunit);1662 putn((int32_t)bpp->rdlen, 4, cmdunit); 1665 1663 writeln(cmdunit, "\r\n fsiz "); 1666 putn(( long)bpp->fsiz, 4, cmdunit);1664 putn((int32_t)bpp->fsiz, 4, cmdunit); 1667 1665 writeln(cmdunit, "\r\n fatrec "); 1668 putn(( long)bpp->fatrec, 5, cmdunit);1666 putn((int32_t)bpp->fatrec, 5, cmdunit); 1669 1667 writeln(cmdunit, "\r\n datrec "); 1670 putn(( long)bpp->datrec, 5, cmdunit);1668 putn((int32_t)bpp->datrec, 5, cmdunit); 1671 1669 writeln(cmdunit, "\r\n numcl "); 1672 putn(( long)bpp->numcl, 5, cmdunit);1670 putn((int32_t)bpp->numcl, 5, cmdunit); 1673 1671 writeln(cmdunit, "\r\n bflags "); 1674 puthn(( long)bpp->bflags, 4, cmdunit);1672 puthn((int32_t)bpp->bflags, 4, cmdunit); 1675 1673 writeln(cmdunit, "\r\n ntracks "); 1676 putn(( long)bpp->ntracks, 4, cmdunit);1674 putn((int32_t)bpp->ntracks, 4, cmdunit); 1677 1675 writeln(cmdunit, "\r\n nsides "); 1678 putn(( long)bpp->nsides, 4, cmdunit);1676 putn((int32_t)bpp->nsides, 4, cmdunit); 1679 1677 writeln(cmdunit, "\r\n sec/cyl "); 1680 putn(( long)bpp->dspc, 5, cmdunit);1678 putn((int32_t)bpp->dspc, 5, cmdunit); 1681 1679 writeln(cmdunit, "\r\n sec/trk "); 1682 putn(( long)bpp->dspt, 5, cmdunit);1680 putn((int32_t)bpp->dspt, 5, cmdunit); 1683 1681 writeln(cmdunit, "\r\n hidden "); 1684 putn(( long)bpp->hidden, 4, cmdunit);1682 putn((int32_t)bpp->hidden, 4, cmdunit); 1685 1683 writeln(cmdunit, "\r\n\n"); 1686 1684 return(TRUE); … … 1698 1696 */ 1699 1697 1700 int cx_go(void)1698 int16_t cx_go(void) 1701 1699 { 1702 1700 redo = FALSE; … … 1711 1709 if (p_ba0) { 1712 1710 1713 if (*p_ba0 NE ( UWORD16)BPINST) {1711 if (*p_ba0 NE (uint16_t)BPINST) { 1714 1712 1715 1713 writeln(cmdunit, "\r\n\n** Breakpoint 0 at "); 1716 puthn(( long)p_ba0, 8, cmdunit);1714 puthn((int32_t)p_ba0, 8, cmdunit); 1717 1715 writeln(cmdunit, " was "); 1718 puthn(0xFFFFL & ( long)(*p_ba0), 4, cmdunit);1716 puthn(0xFFFFL & (int32_t)(*p_ba0), 4, cmdunit); 1719 1717 writeln(cmdunit, " instead of "); 1720 puthn(0xFFFFL & ( long)BPINST, 4, cmdunit);1718 puthn(0xFFFFL & (int32_t)BPINST, 4, cmdunit); 1721 1719 writeln(cmdunit, " **\r\n\n"); 1722 1720 } … … 1727 1725 p_ba0 = tba0; 1728 1726 p_bv0 = *p_ba0; 1729 *p_ba0 = ( UWORD16)BPINST;1727 *p_ba0 = (uint16_t)BPINST; 1730 1728 } 1731 1729 … … 1738 1736 if (p_ba1) { 1739 1737 1740 if (*p_ba1 NE ( UWORD16)BPINST) {1738 if (*p_ba1 NE (uint16_t)BPINST) { 1741 1739 1742 1740 writeln(cmdunit, "\r\n\n** Breakpoint 1 at "); 1743 puthn(( long)p_ba1, 8, cmdunit);1741 puthn((int32_t)p_ba1, 8, cmdunit); 1744 1742 writeln(cmdunit, " was "); 1745 puthn(0xFFFFL & ( long)(*p_ba1), 4, cmdunit);1743 puthn(0xFFFFL & (int32_t)(*p_ba1), 4, cmdunit); 1746 1744 writeln(cmdunit, " instead of "); 1747 puthn(0xFFFFL & ( long)BPINST, 4, cmdunit);1745 puthn(0xFFFFL & (int32_t)BPINST, 4, cmdunit); 1748 1746 writeln(cmdunit, " **\r\n\n"); 1749 1747 } … … 1754 1752 p_ba1 = tba1; 1755 1753 p_bv1 = *p_ba1; 1756 *p_ba1 = ( UWORD16)BPINST;1754 *p_ba1 = (uint16_t)BPINST; 1757 1755 } 1758 1756 … … 1770 1768 */ 1771 1769 1772 int cp_dump(void)1770 int16_t cp_dump(void) 1773 1771 { 1774 1772 inext = ilast; … … 1831 1829 */ 1832 1830 1833 int cp_fill(void)1831 int16_t cp_fill(void) 1834 1832 { 1835 1833 redo = FALSE; … … 1863 1861 */ 1864 1862 1865 int cp_wfil(void)1863 int16_t cp_wfil(void) 1866 1864 { 1867 1865 redo = FALSE; … … 1879 1877 return(FALSE); 1880 1878 1881 if (( long)p_from & 1L)1879 if ((int32_t)p_from & 1L) 1882 1880 return(FALSE); 1883 1881 … … 1898 1896 */ 1899 1897 1900 int cp_copy(void)1898 int16_t cp_copy(void) 1901 1899 { 1902 1900 redo = FALSE; … … 1926 1924 */ 1927 1925 1928 int cp_chek(void)1926 int16_t cp_chek(void) 1929 1927 { 1930 1928 redo = FALSE; … … 1951 1949 */ 1952 1950 1953 int cp_read(void)1951 int16_t cp_read(void) 1954 1952 { 1955 1953 redo = FALSE; … … 1970 1968 return(FALSE); 1971 1969 1972 if ((~0xFFFFL) & ( long)p_from)1970 if ((~0xFFFFL) & (int32_t)p_from) 1973 1971 return(FALSE); 1974 1972 … … 1982 1980 */ 1983 1981 1984 int cp_null(void)1982 int16_t cp_null(void) 1985 1983 { 1986 1984 return(TRUE); … … 1997 1995 */ 1998 1996 1999 int cp_rset(void)2000 { 2001 int rc;1997 int16_t cp_rset(void) 1998 { 1999 int16_t rc; 2002 2000 2003 2001 rc = 0; … … 2031 2029 */ 2032 2030 2033 int cx_chek(void)2034 { 2035 register longcsum;2036 register char*cp;2031 int16_t cx_chek(void) 2032 { 2033 register int32_t csum; 2034 register int8_t *cp; 2037 2035 2038 2036 redo = FALSE; … … 2057 2055 */ 2058 2056 2059 int cx_rset(void)2057 int16_t cx_rset(void) 2060 2058 { 2061 2059 redo = FALSE; … … 2072 2070 if (rnum < 17) { /* a0..a7 -- address register */ 2073 2071 2074 regptr->a_reg[rnum-9] = ( char*)p_value;2072 regptr->a_reg[rnum-9] = (int8_t *)p_value; 2075 2073 return(TRUE); 2076 2074 } … … 2085 2083 return(FALSE); 2086 2084 2087 regptr->reg_sr = ( UWORD16)p_value;2085 regptr->reg_sr = (uint16_t)p_value; 2088 2086 return(TRUE); 2089 2087 } … … 2094 2092 return(FALSE); 2095 2093 2096 regptr->reg_pc = ( char*)p_value;2094 regptr->reg_pc = (int8_t *)p_value; 2097 2095 return(TRUE); 2098 2096 } … … 2103 2101 return(FALSE); 2104 2102 2105 regptr->a_reg[7] = ( char*)p_value;2103 regptr->a_reg[7] = (int8_t *)p_value; 2106 2104 return(TRUE); 2107 2105 } … … 2120 2118 */ 2121 2119 2122 int cp_vrst(void)2123 { 2124 int rc;2120 int16_t cp_vrst(void) 2121 { 2122 int16_t rc; 2125 2123 2126 2124 rc = 0; … … 2178 2176 */ 2179 2177 2180 int cx_vrst(void)2178 int16_t cx_vrst(void) 2181 2179 { 2182 2180 redo = FALSE; … … 2217 2215 */ 2218 2216 2219 int cx_vreg(void)2220 { 2221 register int i, j, k, l;2222 register u nsigned*rp;2217 int16_t cx_vreg(void) 2218 { 2219 register int16_t i, j, k, l; 2220 register uint16_t *rp; 2223 2221 2224 2222 rp = &v_regs[0]; … … 2232 2230 2233 2231 writeln(cmdunit, " "); 2234 putn(( long)l++, 2, cmdunit);2232 putn((int32_t)l++, 2, cmdunit); 2235 2233 writeln(cmdunit, ":"); 2236 puthn(( long)*rp++, 4, cmdunit);2234 puthn((int32_t)*rp++, 4, cmdunit); 2237 2235 } 2238 2236 … … 2256 2254 */ 2257 2255 2258 int do_srec(char*line)2259 { 2260 register char*ldadr;2261 register int c, csum, i, len;2262 register u nsignedval;2256 int16_t do_srec(int8_t *line) 2257 { 2258 register int8_t *ldadr; 2259 register int16_t c, csum, i, len; 2260 register uint16_t val; 2263 2261 2264 2262 if ('S' NE (c = *line++)) … … 2282 2280 2283 2281 csum += (len & 0xFF); 2284 ldadr = ( char*)0;2282 ldadr = (int8_t *)0; 2285 2283 len -= 4; 2286 2284 … … 2297 2295 return(-3); 2298 2296 2299 ldadr = ( char *)(((long)ldadr << 8) + (long)val);2297 ldadr = (int8_t *)(((int32_t)ldadr << 8) + (int32_t)val); 2300 2298 csum += (val & 0xFF); 2301 2299 } … … 2364 2362 */ 2365 2363 2366 int cx_load(void)2367 { 2368 register int rc;2364 int16_t cx_load(void) 2365 { 2366 register int16_t rc; 2369 2367 2370 2368 do { … … 2383 2381 writeln(cmdunit, NACK); 2384 2382 writeln(cmdunit, "** Load error "); 2385 putn(( long)rc, 3, cmdunit);2383 putn((int32_t)rc, 3, cmdunit); 2386 2384 writeln(cmdunit, " **\r\n\n"); 2387 2385 return(FALSE); … … 2428 2426 */ 2429 2427 2430 int cx_fill(void)2431 { 2432 register char*cp = p_from;2433 register longcount;2428 int16_t cx_fill(void) 2429 { 2430 register int8_t *cp = p_from; 2431 register int32_t count; 2434 2432 2435 2433 redo = FALSE; … … 2437 2435 for (count = p_len; count > 0L; count--) { 2438 2436 2439 *cp = ( char)(0xFFL & p_value);2440 2441 if (*cp NE ( char)(0xFFL & p_value)) {2437 *cp = (int8_t)(0xFFL & p_value); 2438 2439 if (*cp NE (int8_t)(0xFFL & p_value)) { 2442 2440 2443 2441 writeln(cmdunit, "\r\n** FILL failed at "); 2444 puthn(( long)cp, 8, cmdunit);2442 puthn((int32_t)cp, 8, cmdunit); 2445 2443 writeln(cmdunit, " **\r\n"); 2446 2444 return(FALSE); … … 2463 2461 */ 2464 2462 2465 int cx_wfil(void)2466 { 2467 register UWORD16 *cp = (UWORD16*)p_from;2468 register longcount;2463 int16_t cx_wfil(void) 2464 { 2465 register uint16_t *cp = (uint16_t *)p_from; 2466 register int32_t count; 2469 2467 2470 2468 redo = FALSE; 2471 2469 2472 2470 for (count = p_len; count > 0L; count--) 2473 *cp++ = ( UWORD16)(0xFFFFL & p_value);2471 *cp++ = (uint16_t)(0xFFFFL & p_value); 2474 2472 2475 2473 return(TRUE); … … 2486 2484 */ 2487 2485 2488 int cx_copy(void)2489 { 2490 register char*from = p_from,2486 int16_t cx_copy(void) 2487 { 2488 register int8_t *from = p_from, 2491 2489 *to = p_to; 2492 register longcount = p_len;2490 register int32_t count = p_len; 2493 2491 2494 2492 redo = FALSE; … … 2508 2506 2509 2507 writeln(cmdunit, "\r\n** COPY failed from "); 2510 puthn(( long)from, 8, cmdunit);2508 puthn((int32_t)from, 8, cmdunit); 2511 2509 writeln(cmdunit, " to "); 2512 puthn(( long)to, 8, cmdunit);2510 puthn((int32_t)to, 8, cmdunit); 2513 2511 writeln(cmdunit, " with (from) = "); 2514 puthn(( long)(*from), 2, cmdunit);2512 puthn((int32_t)(*from), 2, cmdunit); 2515 2513 writeln(cmdunit, " and (to) = "); 2516 puthn(( long)(*to), 2, cmdunit);2514 puthn((int32_t)(*to), 2, cmdunit); 2517 2515 writeln(cmdunit, " **\r\n"); 2518 2516 return(FALSE); … … 2533 2531 2534 2532 writeln(cmdunit, "\r\n** COPY failed from "); 2535 puthn(( long)from, 8, cmdunit);2533 puthn((int32_t)from, 8, cmdunit); 2536 2534 writeln(cmdunit, " to "); 2537 puthn(( long)to, 8, cmdunit);2535 puthn((int32_t)to, 8, cmdunit); 2538 2536 writeln(cmdunit, " with (from) = "); 2539 puthn(( long)(*from), 2, cmdunit);2537 puthn((int32_t)(*from), 2, cmdunit); 2540 2538 writeln(cmdunit, " and (to) = "); 2541 puthn(( long)(*to), 2, cmdunit);2539 puthn((int32_t)(*to), 2, cmdunit); 2542 2540 writeln(cmdunit, " **\r\n"); 2543 2541 return(FALSE); … … 2562 2560 */ 2563 2561 2564 int cx_dump(void)2565 { 2566 register int nw, rc;2562 int16_t cx_dump(void) 2563 { 2564 register int16_t nw, rc; 2567 2565 2568 2566 redo= TRUE; 2569 2567 d_cur = p_from; 2570 2568 d_next = p_to + 1; 2571 d_last = (( long)p_to - (long)p_from) + d_next;2569 d_last = ((int32_t)p_to - (int32_t)p_from) + d_next; 2572 2570 nw = p_width; 2573 2571 rc = TRUE; … … 2612 2610 */ 2613 2611 2614 int wdump(UWORD16 *loc, UWORD16 *lastloc, int nwide, int unit)2612 int16_t wdump(uint16_t *loc, uint16_t *lastloc, int16_t nwide, int16_t unit) 2615 2613 { 2616 2614 while (nwide--) { 2617 2615 2618 puthn(( long)(0xFFFFL & *loc), 4, unit);2616 puthn((int32_t)(0xFFFFL & *loc), 4, unit); 2619 2617 BIOS(B_PUTC,unit, ' '); 2620 2618 … … 2644 2642 */ 2645 2643 2646 int ldump(long *loc, long *lastloc, int nwide, int unit)2644 int16_t ldump(int32_t *loc, int32_t *lastloc, int16_t nwide, int16_t unit) 2647 2645 { 2648 2646 while (nwide--) { … … 2676 2674 */ 2677 2675 2678 int cp_wdmp(void)2676 int16_t cp_wdmp(void) 2679 2677 { 2680 2678 inext = ilast; … … 2687 2685 } 2688 2686 2689 if (( long)p_from & 1L) {2687 if ((int32_t)p_from & 1L) { 2690 2688 2691 2689 redo = FALSE; … … 2708 2706 } 2709 2707 2710 if (( long)p_to & 1L) {2708 if ((int32_t)p_to & 1L) { 2711 2709 2712 2710 redo = FALSE; … … 2742 2740 */ 2743 2741 2744 int cp_ldmp(void)2742 int16_t cp_ldmp(void) 2745 2743 { 2746 2744 inext = ilast; … … 2753 2751 } 2754 2752 2755 if (( long)p_from & 1L) {2753 if ((int32_t)p_from & 1L) { 2756 2754 2757 2755 redo = FALSE; … … 2774 2772 } 2775 2773 2776 if (( long)p_to & 1L) {2774 if ((int32_t)p_to & 1L) { 2777 2775 2778 2776 redo = FALSE; … … 2808 2806 */ 2809 2807 2810 int cp_ilev(void)2811 { 2812 longiplevl;2808 int16_t cp_ilev(void) 2809 { 2810 int32_t iplevl; 2813 2811 2814 2812 if (argsep EQ A_CR OR argsep EQ '\0') … … 2833 2831 */ 2834 2832 2835 int cx_ilev(void)2833 int16_t cx_ilev(void) 2836 2834 { 2837 2835 if (-1 EQ setipl(iplev)) { … … 2855 2853 */ 2856 2854 2857 int cp_monc(void)2855 int16_t cp_monc(void) 2858 2856 { 2859 2857 if (getarg()) … … 2872 2870 */ 2873 2871 2874 int cp_mons(void)2872 int16_t cp_mons(void) 2875 2873 { 2876 2874 if (getarg()) … … 2893 2891 */ 2894 2892 2895 int cp_monl(void)2893 int16_t cp_monl(void) 2896 2894 { 2897 2895 if (getarg()) … … 2914 2912 */ 2915 2913 2916 int cx_mon(void)2917 { 2918 register charvc, vcc;2919 register short vs, vss, *vsp;2920 register longvl, vll, *vlp;2914 int16_t cx_mon(void) 2915 { 2916 register int8_t vc, vcc; 2917 register int16_t vs, vss, *vsp; 2918 register int32_t vl, vll, *vlp; 2921 2919 2922 2920 switch (monsw) { … … 2925 2923 2926 2924 vc = *monptr & 0x0FF; 2927 puthn(( long)vc, 2, cmdunit);2925 puthn((int32_t)vc, 2, cmdunit); 2928 2926 writeln(cmdunit, "\r\n"); 2929 2927 … … 2935 2933 2936 2934 vc = vcc; 2937 puthn(( long)vc, 2, cmdunit);2935 puthn((int32_t)vc, 2, cmdunit); 2938 2936 writeln(cmdunit, "\r\n"); 2939 2937 } … … 2945 2943 case MON_S: 2946 2944 2947 vsp = ( short *)monptr;2945 vsp = (int16_t *)monptr; 2948 2946 vs = *vsp; 2949 puthn(( long)vs, 4, cmdunit);2947 puthn((int32_t)vs, 4, cmdunit); 2950 2948 writeln(cmdunit, "\r\n"); 2951 2949 … … 2957 2955 2958 2956 vs = vss; 2959 puthn(( long)vs, 4, cmdunit);2957 puthn((int32_t)vs, 4, cmdunit); 2960 2958 writeln(cmdunit, "\r\n"); 2961 2959 } … … 2970 2968 case MON_L: 2971 2969 2972 vlp = ( long*)monptr;2970 vlp = (int32_t *)monptr; 2973 2971 vl = *vlp; 2974 2972 puthn(vl, 8, cmdunit); … … 3005 3003 */ 3006 3004 3007 int cx_wdmp(void)3008 { 3009 int nw, rc;3005 int16_t cx_wdmp(void) 3006 { 3007 int16_t nw, rc; 3010 3008 3011 3009 d_cur = p_from; 3012 3010 d_next = p_to + 2; 3013 d_last = (( long)p_to - (long)p_from) + d_next;3011 d_last = ((int32_t)p_to - (int32_t)p_from) + d_next; 3014 3012 nw = p_width; 3015 3013 rc = TRUE; … … 3048 3046 */ 3049 3047 3050 int cx_ldmp(void)3051 { 3052 int nw, rc;3048 int16_t cx_ldmp(void) 3049 { 3050 int16_t nw, rc; 3053 3051 3054 3052 d_cur = p_from; 3055 3053 d_next = p_to + 4; 3056 d_last = (( long)p_to - (long)p_from) + d_next;3054 d_last = ((int32_t)p_to - (int32_t)p_from) + d_next; 3057 3055 nw = p_width; 3058 3056 rc = TRUE; … … 3093 3091 void do_cmd(void) 3094 3092 { 3095 int rc, i;3093 int16_t rc, i; 3096 3094 3097 3095 /* prompt for a command line */ … … 3188 3186 */ 3189 3187 3190 int cx_next(void)3188 int16_t cx_next(void) 3191 3189 { 3192 3190 p_to = d_last; … … 3205 3203 */ 3206 3204 3207 int cx_read(void)3208 { 3209 longrc;3210 int ns, recno;3205 int16_t cx_read(void) 3206 { 3207 int32_t rc; 3208 int16_t ns, recno; 3211 3209 3212 3210 ns = p_len & 0x7FFFL; 3213 recno = ( long)p_from & 0xFFFFL;3211 recno = (int32_t)p_from & 0xFFFFL; 3214 3212 3215 3213 rc = BIOS(B_RDWR, 2, p_to, ns, recno, 0); … … 3238 3236 */ 3239 3237 3240 int cx_writ(void)3241 { 3242 longrc;3243 int ns, recno;3238 int16_t cx_writ(void) 3239 { 3240 int32_t rc; 3241 int16_t ns, recno; 3244 3242 3245 3243 ns = p_len & 0x7FFFL; 3246 recno = ( long)p_from & 0xFFFFL;3244 recno = (int32_t)p_from & 0xFFFFL; 3247 3245 3248 3246 rc = BIOS(B_RDWR, 3, p_to, ns, recno, 0); … … 3273 3271 void showrs(struct regs *rp) 3274 3272 { 3275 int i;3276 UWORD16srtemp;3273 int16_t i; 3274 uint16_t srtemp; 3277 3275 3278 3276 writeln(cmdunit, " "); … … 3302 3300 3303 3301 writeln(cmdunit, "\r\nPC = "); 3304 puthn(( long)rp->reg_pc, 8, cmdunit);3302 puthn((int32_t)rp->reg_pc, 8, cmdunit); 3305 3303 3306 3304 srtemp = rp->reg_sr; 3307 3305 writeln(cmdunit, ", SR = "); 3308 puthn( ( long)srtemp & 0xFFFFL, 4, cmdunit);3306 puthn( (int32_t)srtemp & 0xFFFFL, 4, cmdunit); 3309 3307 3310 3308 /* … … 3313 3311 3314 3312 writeln(cmdunit, " (IPL = "); 3315 puthn( ( long)(srtemp >> 8) & 0x7L, 1, cmdunit);3313 puthn( (int32_t)(srtemp >> 8) & 0x7L, 1, cmdunit); 3316 3314 writeln(cmdunit, ", "); 3317 3315 … … 3368 3366 void showcr(void) 3369 3367 { 3370 register int i;3371 register char*cause;3372 register UWORD16srtemp;3368 register int16_t i; 3369 register int8_t *cause; 3370 register uint16_t srtemp; 3373 3371 3374 3372 writeln(cmdunit, "BIOS Crash Area Dump\r\n"); … … 3399 3397 3400 3398 writeln(cmdunit, "\r\n\nPC = "); 3401 puthn(( long)crshpc, 8, cmdunit);3399 puthn((int32_t)crshpc, 8, cmdunit); 3402 3400 3403 3401 srtemp = crshsr; 3404 3402 writeln(cmdunit, ", SR = "); 3405 puthn(( long)srtemp & 0xFFFFL, 4, cmdunit);3403 puthn((int32_t)srtemp & 0xFFFFL, 4, cmdunit); 3406 3404 3407 3405 /* … … 3410 3408 3411 3409 writeln(cmdunit, " (IPL = "); 3412 puthn(( long)(srtemp >> 8) & 0x7L, 1, cmdunit);3410 puthn((int32_t)(srtemp >> 8) & 0x7L, 1, cmdunit); 3413 3411 writeln(cmdunit, ", "); 3414 3412 … … 3456 3454 */ 3457 3455 writeln(cmdunit, "TRAP vector number = "); 3458 putn(( long)crshvc[0], 2, cmdunit);3456 putn((int32_t)crshvc[0], 2, cmdunit); 3459 3457 3460 3458 cause = " (no handler for interrupt)"; … … 3573 3571 */ 3574 3572 3575 int cx_crsh(void)3573 int16_t cx_crsh(void) 3576 3574 { 3577 3575 if (!wzcrsh) … … 3593 3591 */ 3594 3592 3595 int bphit(void)3596 { 3597 int rc;3593 int16_t bphit(void) 3594 { 3595 int16_t rc; 3598 3596 3599 3597 rc = FALSE; 3600 3598 3601 if (( char*)p_ba0 EQ regptr->reg_pc) {3599 if ((int8_t *)p_ba0 EQ regptr->reg_pc) { 3602 3600 3603 3601 if (*p_ba0 EQ BPINST) { … … 3613 3611 puthn(p_ba0, 8 , cmdunit); 3614 3612 writeln(cmdunit, " was "); 3615 puthn(0xFFFFL & ( long)(*p_ba0), 4, cmdunit);3613 puthn(0xFFFFL & (int32_t)(*p_ba0), 4, cmdunit); 3616 3614 writeln(cmdunit, " instead of "); 3617 puthn(( long)BPINST, 4, cmdunit);3615 puthn((int32_t)BPINST, 4, cmdunit); 3618 3616 writeln(cmdunit, " **\r\n\n"); 3619 3617 rc = TRUE; … … 3625 3623 */ 3626 3624 3627 if (( char*)p_ba1 EQ regptr->reg_pc) {3625 if ((int8_t *)p_ba1 EQ regptr->reg_pc) { 3628 3626 3629 3627 if (*p_ba1 EQ BPINST) { … … 3637 3635 3638 3636 writeln(cmdunit, "** Breakpoint word at "); 3639 puthn(( long)p_ba0, 8 , cmdunit);3637 puthn((int32_t)p_ba0, 8 , cmdunit); 3640 3638 writeln(cmdunit, " was "); 3641 puthn(0xFFFFL & ( long)(*p_ba1), 4, cmdunit);3639 puthn(0xFFFFL & (int32_t)(*p_ba1), 4, cmdunit); 3642 3640 writeln(cmdunit, " instead of "); 3643 puthn(( long)BPINST, 4, cmdunit);3641 puthn((int32_t)BPINST, 4, cmdunit); 3644 3642 writeln(cmdunit, " **\r\n\n"); 3645 3643 rc = TRUE; … … 3663 3661 puthn(p_ba0, 8 , cmdunit); 3664 3662 writeln(cmdunit, " was "); 3665 puthn(0xFFFFL & ( long)(*p_ba0), 4, cmdunit);3663 puthn(0xFFFFL & (int32_t)(*p_ba0), 4, cmdunit); 3666 3664 writeln(cmdunit, " instead of "); 3667 puthn(( long)BPINST, 4, cmdunit);3665 puthn((int32_t)BPINST, 4, cmdunit); 3668 3666 writeln(cmdunit, " **\r\n\n"); 3669 3667 rc = TRUE; … … 3687 3685 3688 3686 writeln(cmdunit, "** Breakpoint word at "); 3689 puthn(( long)p_ba0, 8 , cmdunit);3687 puthn((int32_t)p_ba0, 8 , cmdunit); 3690 3688 writeln(cmdunit, " was "); 3691 puthn(0xFFFFL & ( long)(*p_ba1), 4, cmdunit);3689 puthn(0xFFFFL & (int32_t)(*p_ba1), 4, cmdunit); 3692 3690 writeln(cmdunit, " instead of "); 3693 puthn(( long)BPINST, 4, cmdunit);3691 puthn((int32_t)BPINST, 4, cmdunit); 3694 3692 writeln(cmdunit, " **\r\n\n"); 3695 3693 rc = TRUE; … … 3714 3712 */ 3715 3713 3716 int cx_regs(void)3714 int16_t cx_regs(void) 3717 3715 { 3718 3716 showrs(regptr); … … 3730 3728 */ 3731 3729 3732 void rompbp( long d0, long d1, long d2, long d3, long d4, long d5, long d6, long d7, char *a0, char *a1, char *a2, char *a3, char *a4, char *a5, char *a6, char *a7, char *pc, UWORD16 sr0, UWORD16sr)3733 { 3734 register int i;3730 void rompbp(int32_t d0, int32_t d1, int32_t d2, int32_t d3, int32_t d4, int32_t d5, int32_t d6, int32_t d7, int8_t *a0, int8_t *a1, int8_t *a2, int8_t *a3, int8_t *a4, int8_t *a5, int8_t *a6, int8_t *a7, int8_t *pc, uint16_t sr0, uint16_t sr) 3731 { 3732 register int16_t i; 3735 3733 3736 3734 regptr = (struct regs *)&d0; /* make registers accessable */ … … 3746 3744 3747 3745 for (i = 0; i < 7; i++) /* clear a0..a6 */ 3748 regptr->a_reg[i] = ( char*)0L;3746 regptr->a_reg[i] = (int8_t *)0L; 3749 3747 3750 3748 regptr->a_reg[7] = ISTACK; /* setup initial stack */ … … 3788 3786 void progid(void) 3789 3787 { 3790 register char*pcptr;3788 register int8_t *pcptr; 3791 3789 3792 3790 #if TINYMSG … … 3810 3808 3811 3809 writeln(cmdunit, "\r\n BIOS Version "); 3812 pcptr = ( char*)PRM_VERS;3813 putn(( long)*pcptr++, 2, cmdunit);3810 pcptr = (int8_t *)PRM_VERS; 3811 putn((int32_t)*pcptr++, 2, cmdunit); 3814 3812 BIOS(B_PUTC, cmdunit, '.'); 3815 putn(( long)*pcptr++, 2, cmdunit);3813 putn((int32_t)*pcptr++, 2, cmdunit); 3816 3814 writeln(cmdunit, promdate); 3817 3815 … … 3832 3830 */ 3833 3831 3834 short pclr(void)3835 { 3836 register short i;3832 int16_t pclr(void) 3833 { 3834 register int16_t i; 3837 3835 3838 3836 ftimer = FIFOLIM; … … 3872 3870 */ 3873 3871 3874 short pscan(void)3875 { 3876 register short i, c;3872 int16_t pscan(void) 3873 { 3874 register int16_t i, c; 3877 3875 3878 3876 if (0 EQ ledcntr--) { … … 3976 3974 void main(void) 3977 3975 { 3978 register short i;3979 register char*pdptr, *pcptr;3976 register int16_t i; 3977 register int8_t *pdptr, *pcptr; 3980 3978 3981 3979 /* unpack PROM date */ 3982 3980 3983 pcptr = ( char*)PRM_DATE; /* prom date: yyyymmdd */3981 pcptr = (int8_t *)PRM_DATE; /* prom date: yyyymmdd */ 3984 3982 pdptr = promdate; /* -- yyyy-mm-dd */ 3985 3983 *pdptr++ = ' '; … … 4017 4015 b1flag = FALSE; 4018 4016 4019 p_goto = ( char*)ROMADDR;4017 p_goto = (int8_t *)ROMADDR; 4020 4018 p_len = 0L; 4021 4019 p_width = 16L; … … 4047 4045 4048 4046 sprintf(idbuf, "BIOS Version %02d.%02d%s", 4049 *( char *)PRM_VERS, *(char*)(PRM_VERS+1), promdate);4047 *(int8_t *)PRM_VERS, *(int8_t *)(PRM_VERS+1), promdate); 4050 4048 GLCtext(5, 30, idbuf); 4051 4049 … … 4054 4052 GLCcrc(0, 0); 4055 4053 4056 ( char*)BIOS(B_SETV, 47, trap15); /* set ROMP trap vec */4054 (int8_t *)BIOS(B_SETV, 47, trap15); /* set ROMP trap vec */ 4057 4055 4058 4056 for (i = 0; i < 128; i++) { … … 4079 4077 progid(); /* identify the program */ 4080 4078 4081 ( char*)BIOS(B_SETV, 47, trap15); /* set ROMP trap vec */4079 (int8_t *)BIOS(B_SETV, 47, trap15); /* set ROMP trap vec */ 4082 4080 writeln(cmdunit, "\r\n\n"); 4083 4081
Note:
See TracChangeset
for help on using the changeset viewer.