Skip to content

1620 printer crash #584

Description

@rms47

If the user prints, or more precisely, does carriage control to the 1620 while the printer is unattached, the simulator crashes. This is because the lpt_space routine is not guardbanded against an unattached file. The fix is simple:

t_stat lpt_space (int32 count, int32 sflag)
{
int32 i, cc;
--- add these lines ---
if ((lpt_unit.flags & UNIT_ATT) == 0) {                 /* not attached? */
    ind[IN_PRCHK] = 1;                                  /* pri check */
    return SCPE_UNATT;
}
--- end added lines ---
cct_ptr = (cct_ptr + count) % cct_lnt;                  /* adv cct, mod lnt */

Bob Supnik

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions