community.borland.com

Article #15089: Microstar critical error handler corrections

 Technical Information Database

TI89D.txt - Microstar critical error handler corrections

Category   :Turbo Pascal
Platform   :All
Product    :

Description:
This handout addresses a problem reported by users  of  the Turbo
Pascal Editor Toolbox version 4.0 for use with Turbo Pascal 4.0.

Users  have  found  that  MicroStar  cannot  recover  from a  DOS
Critical Error.  DOS Critical  Errors  occur  when  attempting to
write or read  a  disk  file  with  the disk door open, the drive
empty, or the printer  out  of paper, etc.  MicroStar reports the
Critical E

The problem lies with the  Interrupt 24 Handler (the DOS Critical
Error Handler) implemented within MicroStar;  its  source  may be
found in the file INT24.ASM of the MicroStar source  code.    The
INT24.ASM correctly identifies Critical Errors but does not rese

   1.   Load INT24.ASM  into  an  ASCII  editor  (Turbo  Pascal's
        editor will do).

   2.   Find Line 68 which should read as follows:

        MOV  CS:Int24ErrCode,0  ;Reset Int24ErrCode to 0

   3.   Replace this text with the following line.

        MOV  CS:Int24Err,0      ;Reset Int24Err to 0

   4.   Use the Microsoft or a compatible  assembler  to assemble
        the code to an  object  format  (.OBJ). This must replace
        the INT24.OBJ supplied with the distribution disks.

   5.   Set the compiler destination to disk (Compile/Destination
        option). Load  MS.PAS into the editor and perform a build
        (Compile/Build  option)  on  the entire application. Make
        sure  the  entire   MicroStar  source  is  available  for
        recompilation.

For  those  without  an  assembler,  the  following  Turbo Pascal
program corrects the unmodified MicroStar  EXE  file.    From the
directory containing MicroStar, enter the following lines of code
into the Turbo Pascal editor and run from either memory or disk.

program ChMS;

var
  f : file of byte;
  b : byte;

begin

Assign(f,'MS.EXE');
reset(f);

seek( f, 129626);   b := 30;   write( f, b);
seek( f, 154257);   b := 101;  write( f, b);
seek( f, 154305);   b := 4;    write( f, b);
seek( f, 154401);   b := 103;  write( f, b);
seek( f, 154431);   b := 115;  write( f, b);
seek( f, 154701);   b := 108;  write( f, b);
seek( f, 154827);   b := 108;  write( f, b);

close(f);

end.


Reference:
 

3/30/99 3:55:36 PM
 

Last Modified: 01-SEP-99