1
1
/* pdp10_fe.c: PDP-10 front end (console terminal) simulator
3
Copyright (c) 1993-2004, Robert M Supnik
3
Copyright (c) 1993-2006, Robert M Supnik
5
5
Permission is hereby granted, free of charge, to any person obtaining a
6
6
copy of this software and associated documentation files (the "Software"),
26
26
fe KS10 console front end
28
17-Oct-06 RMS Synced keyboard to clock for idling
28
29
28-May-04 RMS Removed SET FE CTRL-C
29
30
29-Dec-03 RMS Added console backpressure support
30
31
25-Apr-03 RMS Revised for extended file support
56
58
#define feo_unit fe_unit[1]
59
{ UDATA (&fei_svc, 0, 0), KBD_POLL_WAIT },
61
{ UDATA (&fei_svc, 0, 0), 0 },
60
62
{ UDATA (&feo_svc, 0, 0), SERIAL_OUT_WAIT }
64
66
{ ORDATA (IBUF, fei_unit.buf, 8) },
65
67
{ DRDATA (ICOUNT, fei_unit.pos, T_ADDR_W), REG_RO + PV_LEFT },
66
{ DRDATA (ITIME, fei_unit.wait, 24), REG_NZ + PV_LEFT },
68
{ DRDATA (ITIME, fei_unit.wait, 24), PV_LEFT },
67
69
{ ORDATA (OBUF, feo_unit.buf, 8) },
68
70
{ DRDATA (OCOUNT, feo_unit.pos, T_ADDR_W), REG_RO + PV_LEFT },
69
71
{ DRDATA (OTIME, feo_unit.wait, 24), REG_NZ + PV_LEFT },
142
sim_activate (&fei_unit, fei_unit.wait); /* continue poll */
144
sim_activate (uptr, KBD_WAIT (uptr->wait, tmxr_poll)); /* continue poll */
143
145
if ((temp = sim_poll_kbd ()) < SCPE_KFLAG) return temp; /* no char or error? */
144
146
if (temp & SCPE_BREAK) return SCPE_OK; /* ignore break */
145
fei_unit.buf = temp & 0177;
146
fei_unit.pos = fei_unit.pos + 1;
147
M[FE_CTYIN] = fei_unit.buf | FE_CVALID; /* put char in mem */
147
uptr->buf = temp & 0177;
148
uptr->pos = uptr->pos + 1;
149
M[FE_CTYIN] = uptr->buf | FE_CVALID; /* put char in mem */
148
150
apr_flg = apr_flg | APRF_CON; /* interrupt KS10 */
156
158
fei_unit.buf = feo_unit.buf = 0;
157
159
M[FE_CTYIN] = M[FE_CTYOUT] = 0;
158
160
apr_flg = apr_flg & ~(APRF_ITC | APRF_CON);
159
sim_activate (&fei_unit, fei_unit.wait); /* start input poll */
161
sim_activate_abs (&fei_unit, KBD_WAIT (fei_unit.wait, tmxr_poll));