;;;;;;;

.386p

_TEXT	segment byte public use16 'CODE'
_TEXT	ends
DGROUP	group	_DATA,_BSS
	assume	cs:_TEXT,ds:DGROUP
_DATA	segment word public use16 'DATA'
_DATA	ends
_BSS	segment word public use16 'BSS'
_BSS	ends


;extrn _nInt15_Flag, _cKeyCode2, _cKeyCode
extrn _old_15
extrn _nInt15_Skip_Flag:word
extrn _Process_Int15:near


_TEXT	segment byte public use16 'CODE'
	assume	cs:_TEXT,ds:DGROUP

public _int15

_TEXT	segment byte public use16 'CODE'
	assume	cs:_TEXT,ds:DGROUP
_int15	proc	far
   ;
   ;	void interrupt int15( void )
   ;
	push	eax
	push	ebx
	push	ecx
	push	edx
	push	es
	push	ds
	push	esi
	push	edi
	push	bp
	mov	bp,DGROUP
	mov	ds,bp
	mov	bp,sp

	pushf

  cmp ah,04Fh
  je	short @1@13

	call	dword ptr DGROUP:_old_15
	pop	bp
	pop	edi
	pop	esi
	pop	ds
	pop	es
	pop	edx
	pop	ecx
	pop	ebx
	pop	eax
	iret

@1@13:

  popf

  call _Process_Int15

  test word ptr DGROUP:_nInt15_Skip_Flag, 0FFFFh
  je	short @1@14

	pop	bp
	pop	edi
	pop	esi
	pop	ds
	pop	es
	pop	edx
	pop	ecx
	pop	ebx
	pop	eax

  CLC
  retf 2

@1@14:

	pop	bp
	pop	edi
	pop	esi
	pop	ds
	pop	es
	pop	edx
	pop	ecx
	pop	ebx
	pop	eax

  STC
  retf 2

_int15	endp


_TEXT	ends

;;;;;;;

end

