1
0
mirror of https://github.com/simh/simh.git synced 2026-02-13 19:35:20 +00:00

TT2500: Debugging and reduce type slice warnings.

- Debug: Output the character received, if printable.
- Eliminate type slicing warnings (uint32 -> uint16)
This commit is contained in:
B. Scott Michel
2024-04-15 09:58:11 -07:00
committed by Mark Pizzolato
parent 9f595c066c
commit b9553f672a
4 changed files with 8 additions and 7 deletions

View File

@@ -113,7 +113,7 @@ uart_r_svc(UNIT *uptr)
if (uptr->fileref != NULL) {
unsigned char buf;
if (sim_fread (&buf, 1, 1, uptr->fileref) == 1) {
sim_debug (DBG_RX, &uart_dev, "Received character %03o\n", buf);
sim_debug (DBG_RX, &uart_dev, "Received character %03o (%c)\n", buf, isprint(buf) ? buf : ' ');
RBUF = buf;
flag_on (INT_RRD);
}
@@ -122,7 +122,7 @@ uart_r_svc(UNIT *uptr)
ch = tmxr_getc_ln (&uart_ldsc);
if (ch & TMXR_VALID) {
RBUF = sim_tt_inpcvt (ch, TT_GET_MODE (uart_unit[0].flags));
sim_debug (DBG_RX, &uart_dev, "Received character %03o\n", RBUF);
sim_debug (DBG_RX, &uart_dev, "TMXR received character %03o (%c)\n", RBUF, isprint(RBUF) ? RBUF : ' ');
flag_on (INT_RRD);
return SCPE_OK;
}