;fixvdos.ipl 6/14/11 - patch existing VDOS to not glitch command ;fix VOWCHECK and UFSIZE if present to work when lots of files ;NOTE - experimental! save results to a test build before making default "Applying FIXVDOS patch..." $PRINT CRLF OCTAL DEFINE FIXVDOS "VDOS" $DEFADR DUP IFZ DROP "!VDOS" $DEFADR ENDIF DUP IFZ "VDOS or !VDOS not found" $PRINT CRLF DROP ELSE ;VDOS word address on stack #0 ;replace with address of 1025xx LIA instruction OVER DUP 50 ADD +DO ;scan memory INDEX GET 177700 AND 102500 SUB IFZ ;if LIA found DROP INDEX ;replace stack with LIA address ENDIF +LOOP DUP IFZ "LIA not found" $PRINT CRLF DROP ELSE DUP 3 SUB GET 177700 AND 102700 SUB IFNZ "Not an original version" $PRINT CRLF DROP ELSE "Patching VDOS word... " $PRINT DUP GET S>Z ;save LIA instruction DEC DUP PNUM DUP #0 PUT ;nop in preceeding instruction DEC DUP PNUM DUP Z>S DUP S>Z PUT ;LIA in instruction before that DEC DUP PNUM Z>S PUT ;LIA in instruction before that ;dup LIA's to keep patch code intact "done." $PRINT CRLF ENDIF ENDIF DROP ;VDOS word address ;now patch VOWCHECK if it exists ;need addresses of