SCP: Automatically Save and Restore unit pos variable

Update writing simulator doc to describe proper use of unit pos variable.
This commit is contained in:
Mark Pizzolato 2018-12-12 09:34:49 -08:00
parent 5784c6d0aa
commit 0ba63fe7fa
2 changed files with 2 additions and 0 deletions

Binary file not shown.

2
scp.c
View file

@ -7223,6 +7223,7 @@ for (i = 0; i < (device_count + sim_internal_device_count); i++) {/* loop thru d
WRITE_I (uptr->buf);
WRITE_I (uptr->capac); /* [V3.5] capacity */
fprintf (sfile, "%.0f\n", uptr->usecs_remaining);/* [V4.0] remaining wait */
WRITE_I (uptr->pos);
if (uptr->flags & UNIT_ATT) {
fputs (uptr->filename, sfile);
if ((uptr->flags & UNIT_BUF) && /* writable buffered */
@ -7478,6 +7479,7 @@ for ( ;; ) { /* device loop */
if (v40) {
READ_S (buf);
sscanf (buf, "%lf", &uptr->usecs_remaining);
READ_I (uptr->pos);
}
if (!v32)
flg = ((flg & UNIT_UFMASK_31) << (UNIT_V_UF - UNIT_V_UF_31)) |