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:
parent
5784c6d0aa
commit
0ba63fe7fa
2 changed files with 2 additions and 0 deletions
BIN
doc/simh.doc
BIN
doc/simh.doc
Binary file not shown.
2
scp.c
2
scp.c
|
@ -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->buf);
|
||||||
WRITE_I (uptr->capac); /* [V3.5] capacity */
|
WRITE_I (uptr->capac); /* [V3.5] capacity */
|
||||||
fprintf (sfile, "%.0f\n", uptr->usecs_remaining);/* [V4.0] remaining wait */
|
fprintf (sfile, "%.0f\n", uptr->usecs_remaining);/* [V4.0] remaining wait */
|
||||||
|
WRITE_I (uptr->pos);
|
||||||
if (uptr->flags & UNIT_ATT) {
|
if (uptr->flags & UNIT_ATT) {
|
||||||
fputs (uptr->filename, sfile);
|
fputs (uptr->filename, sfile);
|
||||||
if ((uptr->flags & UNIT_BUF) && /* writable buffered */
|
if ((uptr->flags & UNIT_BUF) && /* writable buffered */
|
||||||
|
@ -7478,6 +7479,7 @@ for ( ;; ) { /* device loop */
|
||||||
if (v40) {
|
if (v40) {
|
||||||
READ_S (buf);
|
READ_S (buf);
|
||||||
sscanf (buf, "%lf", &uptr->usecs_remaining);
|
sscanf (buf, "%lf", &uptr->usecs_remaining);
|
||||||
|
READ_I (uptr->pos);
|
||||||
}
|
}
|
||||||
if (!v32)
|
if (!v32)
|
||||||
flg = ((flg & UNIT_UFMASK_31) << (UNIT_V_UF - UNIT_V_UF_31)) |
|
flg = ((flg & UNIT_UFMASK_31) << (UNIT_V_UF - UNIT_V_UF_31)) |
|
||||||
|
|
Loading…
Add table
Reference in a new issue