mirror of
https://github.com/simh/simh.git
synced 2026-05-04 15:05:39 +00:00
Bob Supnik's state as of 5/9/2015 after backporting some things from the master branch
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
extern uint32 xfr_req;
|
||||
extern int32 stop_invins, stop_invdev, stop_inviop;
|
||||
int32 ptr_sor = 0; /* start of rec */
|
||||
int32 ptr_stopioe = 1; /* stop on err */
|
||||
int32 ptr_stopioe = 0; /* no stop on err */
|
||||
int32 ptp_ldr = 0; /* no leader */
|
||||
int32 ptp_stopioe = 1;
|
||||
DSPT std_tplt[] = { { 1, 0 }, { 0, 0 } }; /* template */
|
||||
@@ -63,10 +63,9 @@ t_stat tti_reset (DEVICE *dptr);
|
||||
t_stat tto (uint32 fnc, uint32 inst, uint32 *dat);
|
||||
t_stat tto_svc (UNIT *uptr);
|
||||
t_stat tto_reset (DEVICE *dptr);
|
||||
|
||||
extern const char ascii_to_sds[128];
|
||||
extern const char sds_to_ascii[64];
|
||||
extern const char odd_par[64];
|
||||
int8 ascii_to_sds(int8 ch);
|
||||
int8 sds_to_ascii(int8 ch);
|
||||
extern const int8 odd_par[64];
|
||||
|
||||
/* PTR data structures
|
||||
|
||||
@@ -277,7 +276,7 @@ if ((temp = getc (ptr_unit.fileref)) == EOF) { /* end of file? */
|
||||
ptr_set_err (); /* yes, err, disc */
|
||||
if (feof (ptr_unit.fileref)) { /* end of file? */
|
||||
if (ptr_stopioe)
|
||||
printf ("PTR end of file\n");
|
||||
sim_printf ("PTR end of file\n");
|
||||
else return SCPE_OK;
|
||||
}
|
||||
else perror ("PTR I/O error"); /* I/O error */
|
||||
@@ -395,7 +394,7 @@ t_stat r = SCPE_OK;
|
||||
|
||||
if (ptp_ldr) { /* need leader? */
|
||||
for (i = 0; i < 12; i++) { /* punch leader */
|
||||
if (r = ptp_out (0))
|
||||
if ((r = ptp_out (0)))
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -505,8 +504,8 @@ if (temp & SCPE_BREAK) /* ignore break */
|
||||
return SCPE_OK;
|
||||
temp = temp & 0177;
|
||||
tti_unit.pos = tti_unit.pos + 1;
|
||||
if (ascii_to_sds[temp] >= 0) {
|
||||
tti_unit.buf = ascii_to_sds[temp]; /* internal rep */
|
||||
if (ascii_to_sds(temp) >= 0) {
|
||||
tti_unit.buf = ascii_to_sds(temp); /* internal rep */
|
||||
sim_putchar (temp); /* echo */
|
||||
if (temp == '\r') /* lf after cr */
|
||||
sim_putchar ('\n');
|
||||
@@ -588,7 +587,7 @@ else if (uptr->buf == TT_BS)
|
||||
asc = '\b';
|
||||
else if (uptr->buf == TT_TB)
|
||||
asc = '\t';
|
||||
else asc = sds_to_ascii[uptr->buf]; /* translate */
|
||||
else asc = sds_to_ascii(uptr->buf); /* translate */
|
||||
if ((r = sim_putchar_s (asc)) != SCPE_OK) { /* output; error? */
|
||||
sim_activate (uptr, uptr->wait); /* retry */
|
||||
return ((r == SCPE_STALL)? SCPE_OK: r); /* !stall? report */
|
||||
|
||||
Reference in New Issue
Block a user