TMXR: Enforce output rate limiting when output is produced by instructions
Calls to tmxr_putc_ln() executed directly within instruction simulation code (as opposed to during event servicing) will delay reasonable times
This commit is contained in:
parent
1e8af71081
commit
d0bd4fbdff
2 changed files with 5 additions and 0 deletions
BIN
doc/simh.doc
BIN
doc/simh.doc
Binary file not shown.
|
@ -2056,6 +2056,11 @@ if ((lp->txbfd && !lp->notelnet) || (TXBUF_AVAIL(lp) > 1)) {/* room for char (+
|
||||||
sim_oline = save_oline; /* resture output socket */
|
sim_oline = save_oline; /* resture output socket */
|
||||||
}
|
}
|
||||||
sim_exp_check (&lp->expect, chr); /* process expect rules as needed */
|
sim_exp_check (&lp->expect, chr); /* process expect rules as needed */
|
||||||
|
if ((sim_interval > 0) && /* not called within sim_process_event? */
|
||||||
|
(lp->txbps) && (lp->txdelta > 1000)) { /* and rate limiting output slower than 1000 cps */
|
||||||
|
tmxr_send_buffered_data (lp); /* put data on wire */
|
||||||
|
sim_os_ms_sleep((lp->txdelta - 1000) / 1000); /* wait an approximate character delay */
|
||||||
|
}
|
||||||
return SCPE_OK; /* char sent */
|
return SCPE_OK; /* char sent */
|
||||||
}
|
}
|
||||||
++lp->txdrp; lp->xmte = 0; /* no room, dsbl line */
|
++lp->txdrp; lp->xmte = 0; /* no room, dsbl line */
|
||||||
|
|
Loading…
Add table
Reference in a new issue