Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:15
                                                             Page     1-1


				;0
				page 80,132
				
				;**********************************************************************
				;*
				;*   MODULE:   set_int24_vector
				;*
				;*   Critical error handler for C programs BACKUP and RESTORE
				;*
				;*********************************************************************
				;------------------------------------------------------------;;;;AN000;
 0000				databuff  segment   public  'databuff'                       ;;;;AN000;
 0000				databuff   ends 					     ;;;;AN000;
				;------------------------------------------------------------;;;;AN000;
				
				
 0000				dosxxx	segment byte public 'dos'                               ;AN000;
					assume	cs:dosxxx,ds:nothing,es:nothing,ss:nothing	;AN000;
				
				
					    public   set_int24_vector				;AN000;
					    .sall						;AN000;
					    .list						;AN000;
				
				str	    struc						;AN000;
 0000  0000			old_bp	    dw	     ?						;AN000;
 0002  00000000			Return	    dd	     ?						;AN000;
 0006  0000			Flag	    dw	     ?						;AN000;
 0008				str	    ends						;AN000;
				
				
 0000				set_int24_vector   proc  far					;AN000;
					Enter	set_int24_vector				;AN000;
				
 000C  B8 ---- R			mov	ax,seg databuff 				;AN000;
 000F  8E D8				mov	ds,ax						;AN000;
					assume	ds:databuff					;AN000;
				
 0011  B8 3524				mov	ax,03524h		;Get Int24 Vector	;AN000;
 0014  CD 21				int	21h						;AN000;
									;Save it
 0016  2E: 89 1E 003D R			mov	word ptr cs:OldInt24,bx 			;AN000;
 001B  2E: 8C 06 003F R			mov	word ptr cs:OldInt24+2,es			;AN000;
				
									;Get address of my Int24 Handler
 0020  8C CA				mov	dx,cs						;AN000;
 0022  8E DA				mov	ds,dx						;AN000;
 0024  BA 0041 R			mov	dx,offset AppErrorHandler			;AN000;
				
 0027  B8 2524				mov	ax,02524H	       ;Set new INT24 vector	;AN000;
 002A  CD 21				int	21h						;AN000;
				
 002C  33 C0				xor	ax,ax		       ;Set good error return	;AN000;
				
 002E				exit:	mexit			       ; pop all registers	;AN000;
 003A  CA 0002				ret	size str - 6	       ; return 		;AN000;
				
 003D				set_int24_vector    endp					;AN000;
				
				
				
				
				
				;-------------------------------------------------------
				;
				;	    ****   Error Handler  ******
				;
				;-------------------------------------------------------
 = 0000				Ignore		equ	0		;AN000;
 = 0001				Retry		equ	1		;AN000;
 = 0002				Abort		equ	2		;AN000;
 = 0003				Fail		equ	3		;AN000;
				
 003D  00000000			OldInt24   dd	?			;AN000; ;save old interrupt handler address  ;;;
				
 0041				AppErrorHandler    proc    near 	;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:15
                                                             Page     1-2


 0041  9C				pushf				;AN000;
 0042  2E: FF 1E 003D R			call	dword ptr cs:OldInt24	;AN000; Get user to respond
 0047  3C 02				cmp	al,Abort		;AN000; For any resonse other than Abort
 0049  75 02				jne	rett			;AN000;  retry the operation
				
 004B  CD 23				int	023h			;AN000;
				
 004D				rett:					;AN000;
 004D  CF				iret				;AN000; return to caller
 004E				AppErrorHandler 	endp		;AN000;
				;-------------------------------------------------------
				;-------------------------------------------------------
				
 004E				dosxxx	    ends			;AN000;
					   end				;AN000;

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:15
                                                             Symbols-1


Macros:

		N a m e			Lines

ENTER  . . . . . . . . . . . . .  	   3
MEXIT  . . . . . . . . . . . . .  	   3
POPAL  . . . . . . . . . . . . .  	   9
PUSHAL . . . . . . . . . . . . .  	   9

Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

STR  . . . . . . . . . . . . . .  	0008	0003
  OLD_BP . . . . . . . . . . . .  	0000
  RETURN . . . . . . . . . . . .  	0002
  FLAG . . . . . . . . . . . . .  	0006

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

DATABUFF . . . . . . . . . . . .  	0000	PARA	PUBLIC	'DATABUFF'
DOSXXX . . . . . . . . . . . . .  	004E	BYTE	PUBLIC	'DOS'

Symbols:            

                N a m e         	Type	 Value	 Attr

ABORT  . . . . . . . . . . . . .  	NUMBER	0002	
APPERRORHANDLER  . . . . . . . .  	N PROC	0041	DOSXXX	Length = 000D

EXIT . . . . . . . . . . . . . .  	L NEAR	002E	DOSXXX

FAIL . . . . . . . . . . . . . .  	NUMBER	0003	

IGNORE . . . . . . . . . . . . .  	NUMBER	0000	

OLDINT24 . . . . . . . . . . . .  	L DWORD	003D	DOSXXX

RETRY  . . . . . . . . . . . . .  	NUMBER	0001	
RETT . . . . . . . . . . . . . .  	L NEAR	004D	DOSXXX

set_int24_vector . . . . . . . .  	F PROC	0000	DOSXXX	Global	Length = 003D

@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  setint24		
@VERSION . . . . . . . . . . . .  	TEXT  510		


    139 Source  Lines
    163 Total   Lines
     25 Symbols

  47430 + 280678 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
