Library /sys$common/syshlp/helplib.hlb  —  PATCH  Examples
    1.$ PATCH/ABSOLUTE IMAGE.EXE
      PATCH>EX/INS 604
      00000604:  BBSS    #07,R1,00000608
      PATCH>REPLACE/INS 604='BBSS #07,R1,0608'
      NEW>  'BBSS #07,R1,0608'
      NEW>  'CLRL R0'
      NEW>  EXIT
      old: 00000604:  BBSS    #07,R1,00000608
      %PATCH-E-DATTOOLNG, length of new data may not exceed length of
      old data
      PATCH>EX/INS 684
      00000684:  MOVB    #01,(R5)+
      PATCH>REPLACE/INS 684='MOVB #01,(R5)+'
      NEW>  'MOVB #02,(R5)+'
      NEW>  EXIT
      old: 00000684:  MOVB    #01,(R5)+
      new: 00000684:  MOVB    #02,(R5)+
      PATCH>EX/INS 687
      00000687:  MOVB    #00,(R5)+
      PATCH>DEPOSIT/INS 687
      NEW>  'CLRB (R5)+'
      NEW>  EXIT
      old: 00000687:  MOVB    #00,(R5)+
      new: 00000687:  CLRB    (R5)+
      PATCH>INSERT/INS 68D
      OLD>  'MOVB #10,(R5)+'
      NEW>  'MOVB #20,(R5)+'
      NEW>  EXIT
      old: 0000068D:  MOVB    #10,(R5)+
      %PATCH-E-DATTOOLNG, length of new data may not exceed length of
      old data
      PATCH>UPDATE
      %PATCH-I-WRTFIL, updating image file
      DISK$STARWORK01:[NASR.PATCH]IMAGE.EXE;2
      PATCH>EXIT

      Example of the /ABSOLUTE qualifier with /NEW_VERSION as the
      default. Note the error messages returned when the command
      tries to expand the file.

    2.$ PATCH/ABSOLUTE/NONEW_VERSION  LOGIN.COM
      PATCH>EX/ASCII 57
      00000057:  'MANA'
      PATCH>REPLACE/ASCII 57='MANA'
      NEW>  'mana'
      NEW>  'test'
      NEW>  exit
      old: 00000057:  'MANA'
      %PATCH-E-REPLACEERR, replacement value too large for location
      PATCH>replace/ascii 57='MANA'
      NEW>  'mana'
      NEW>  exit
      old: 00000057:  'MANA'
      new: 00000057:  'mana'
      PATCH>EX/ASCII 24
      00000024:  'F$MO'
      PATCH>INSERT/ASCII 24='F$MO'
      NEW>  'test'
      NEW>  exit
      %PATCH-E-INVCMD, invalid command
      PATCH>UPDATE
      %PATCH-I-OVERLAY, DISK$STARWORK01:[NASR.PATCH]LOGIN.COM;1 being
      overwritten
      PATCH>EX 68:75
      00000068:  4349544F
      0000006C:  58542E45
      00000070:  00010054
      00000074:  00100024
      PATCH>REPLACE 68
      OLD>  4349544F
      OLD>  58542E45
      OLD>  00010054
      OLD>  EXIT
      NEW>  6369746F
      NEW>  68642E65
      NEW>  00010074
      NEW>  EXIT
      old: 00000068:  4349544F
      old: 0000006C:  58542E45
      old: 00000070:  00010054
      new: 00000068:  6369746F
      new: 0000006C:  68642E65
      new: 00000070:  00010074
      PATCH>EX/ASCII 68
      00000068:  'otic'
      PATCH>UPDATE
      %PATCH-I-OVERLAY, DISK$STARWORK01:[NASR.PATCH]LOGIN.COM;1 being
      overwritten
      PATCH>EXIT
      %PATCH-I-OVERLAY, DISK$STARWORK01:[NASR.PATCH]LOGIN.COM;1 being
      overwritten
      $

      Example of a PATCH/ABSOLUTE/NONEW_VERSION command. Note the
      error messages that are returned when the command tries to
      expand the file, and when the commands UPDATE and EXIT are
      performed, that is, (file) "being overwritten."

    3.$ PATCH AVERAGE /JOURNAL=TEST /OUTPUT=TEST

      This command invokes PATCH for an interactive PATCH session
      with the image file AVERAGE.EXE. The journal file and output
      image file created by this session are both named TEST and
      reside in the default device and directory. The journal file
      has a file type of JNL, and the output image file has a file
      type of .EXE.

    4.$ PATCH /UPDATE=(100,102) @ORION
      $

      This PATCH command executes the command procedure ORION.COM.
      The /UPDATE qualifier requests that only the patches identified
      by the ECO levels 100 and 102, contained in ORION.COM, be
      processed. The first record in ORION.COM must specify the
      input image file. The second DCL prompt ($) indicates that
      the patches were successfully applied.
Close Help