t_stat dqc_reset (DEVICE *dptr) { int32 drv; DIB *dibptr = (DIB *) dptr->ctxt; /* DIB pointer */ hp_enbdis_pair (dptr, /* make pair cons */ (dptr == &dqd_dev)? &dqc_dev: &dqd_dev); if (sim_switches & SWMASK ('P')) { /* initialization reset? */ dqd_ibuf = 0; /* clear buffers */ dqd_obuf = 0; dqc_obuf = 0; /* clear buffer */ dqc_rarc = dqc_rarh = dqc_rars = 0; /* clear RAR */ } IOPRESET (dibptr); /* PRESET device (does not use PON) */ dqc_busy = 0; /* reset controller state */ dqd_xfer = 0; dqd_wval = 0; dq_ptr = 0; sim_cancel (&dqd_unit); /* cancel dch */ for (drv = 0; drv < DQ_NUMDRV; drv++) { /* loop thru drives */ sim_cancel (&dqc_unit[drv]); /* cancel activity */ dqc_unit[drv].FNC = 0; /* clear function */ dqc_ucyl[drv] = dqc_uhed[drv] = 0; /* clear drive pos */ dqc_sta[drv] = 0; /* clear status */ } return SCPE_OK; }
t_stat lpt_reset (DEVICE *dptr) { IOPRESET (&lpt_dib); /* PRESET device (does not use PON) */ sim_cancel (&lpt_unit); /* deactivate unit */ return SCPE_OK; }
t_stat clk_reset (DEVICE *dptr) { if (sim_switches & SWMASK ('P')) { /* initialization reset? */ clk_error = 0; /* clear error */ clk_select = 0; /* clear select */ clk_ctr = 0; /* clear counter */ } IOPRESET (&clk_dib); /* PRESET device (does not use PON) */ return SCPE_OK; }
t_stat tty_reset (DEVICE *dptr) { if (sim_switches & SWMASK ('P')) /* initialization reset? */ tty_buf = 0; /* clear buffer */ IOPRESET (&tty_dib); /* PRESET device (does not use PON) */ tty_unit[TTI].wait = POLL_WAIT; /* reset initial poll */ sim_rtcn_init (tty_unit[TTI].wait, TMR_POLL); /* init poll timer */ sim_activate (&tty_unit[TTI], tty_unit[TTI].wait); /* activate poll */ sim_cancel (&tty_unit[TTO]); /* cancel output */ return SCPE_OK; }
t_stat clk_reset (DEVICE *dptr) { if (sim_switches & SWMASK ('P')) { /* initialization reset? */ clk_error = 0; /* clear error */ clk_select = 0; /* clear select */ clk_ctr = 0; /* clear counter */ if (clk_dev.lname == NULL) /* logical name unassigned? */ clk_dev.lname = strdup ("TBG"); /* allocate and initialize the name */ } IOPRESET (&clk_dib); /* PRESET device (does not use PON) */ return SCPE_OK; }