bl791/IFDB / games /vms /mmm16fix.txt
bl791's picture
download
raw
1.52 kB
The RESTORE command is not working in MMM.EXE rev 16 for VMS.
For example:
> suspend
ENTER FILENAME TO STORE IT UNDER (0 TO ABORT REQUEST)
?a.sav
YOUR CURRENT SITUATION IS SAVED AND WILL BE GOOD FOR ANY REVISION 16
YOU CAN NOW QUIT OR CONTINUE. ENTER RESTORE, AT ANY TIME, TO LOAD THE
SITUATION YOU SUSPENDED
WHEN YOU ARE FINISHED, PURGE THE FILE.
> restore
ENTER FILENAME IT WAS SUSPENDED UNDER (0 TO ABORT REQUEST)
?a.sav
%FOR-F-INPSTAREQ, input statement requires too much data
unit 55 file DUA0:[GAMES]A.SAV;1
user PC 0002278B
$
This can be fixed by changing a byte in mmm.exe:
$ patch mmm.exe
PATCH>depo/long
LOC>0002278B
NEW>5901043D
NEW>exit
old: 0002278B: 5901283D
new: 0002278B: 5901043D
PATCH>update
%PATCH-I-WRTFIL, updating image file DUA0:[GAMES]MMM.EXE;2
Using the new mmm.exe:
> restore
ENTER FILENAME IT WAS SUSPENDED UNDER (0 TO ABORT REQUEST)
?a.sav
YOU ARE NOW IN THE SAME SITUATION YOU WERE IN WHEN YOU SUSPENDED THIS DATA
WHEN YOU ARE FINISHED, PURGE THE FILE.
=== Explanation
The program was trying to read 40 words from a record with only 4 words.
Most likely a copy/paste mistake in the vms source code, since the previous record is 40 words long.
Reading from the record is done with a loop, i.e.
00022779: MOVW #01,R9
;read 40 words
0002277C: CVTWL R9,R0
0002277F: PUSHAW W^0DB6(R7)[R0]
00022784: CALLS #01,L^000288F8
0002278B: ACBW #28,#01,R9,0002277C
where #28 (i.e. 40) is the number of iterations.
Changing that to 4 fixes the bug.

Xet Storage Details

Size:
1.52 kB
·
Xet hash:
4286ab23367be3781cf9b549b462051a115d57f3209aba03cf691257b95cf8fe

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.