Implement an int19 hook (from Japheth's JEMFBHLP.ASM).

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1326 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2007-05-26 17:34:12 +00:00
parent dc840d98f4
commit eeef2f7efd
4 changed files with 26 additions and 0 deletions

View File

@ -189,6 +189,25 @@ reloc_call_int6_handler:
mov si,invalid_opcode_message mov si,invalid_opcode_message
jmp short zero_message_loop jmp short zero_message_loop
global reloc_call_int19_handler
reloc_call_int19_handler:
; from Japheth's public domain code (JEMFBHLP.ASM)
; restores int 10,13,15,19,1b and then calls the original int 19.
cld
xor ax,ax
mov es,ax
mov al,70h
mov ds,ax
mov si,100h
mov cx,5
nextitem: lodsb
mov di,ax
shl di,2
movsw
movsw
loop nextitem
int 19h
; ;
; Terminate the current process ; Terminate the current process
; ;

View File

@ -200,6 +200,7 @@ VOID ASMCFUNC FAR int21_entry(iregs UserRegs);
VOID ASMCFUNC int21_service(iregs far * r); VOID ASMCFUNC int21_service(iregs far * r);
VOID ASMCFUNC FAR int0_handler(void); VOID ASMCFUNC FAR int0_handler(void);
VOID ASMCFUNC FAR int6_handler(void); VOID ASMCFUNC FAR int6_handler(void);
VOID ASMCFUNC FAR int19_handler(void);
VOID ASMCFUNC FAR empty_handler(void); VOID ASMCFUNC FAR empty_handler(void);
VOID ASMCFUNC FAR int20_handler(void); VOID ASMCFUNC FAR int20_handler(void);
VOID ASMCFUNC FAR int21_handler(void); VOID ASMCFUNC FAR int21_handler(void);

View File

@ -844,6 +844,11 @@ _int0_handler: jmp 0:reloc_call_int0_handler
_int6_handler: jmp 0:reloc_call_int6_handler _int6_handler: jmp 0:reloc_call_int6_handler
call near forceEnableA20 call near forceEnableA20
global _int19_handler
extern reloc_call_int19_handler
_int19_handler: jmp 0:reloc_call_int19_handler
call near forceEnableA20
global _cpm_entry global _cpm_entry
extern reloc_call_cpm_entry extern reloc_call_cpm_entry
_cpm_entry: jmp 0:reloc_call_cpm_entry _cpm_entry: jmp 0:reloc_call_cpm_entry

View File

@ -239,6 +239,7 @@ STATIC void setup_int_vectors(void)
{ 0x1, FP_OFF(empty_handler) }, /* single step */ { 0x1, FP_OFF(empty_handler) }, /* single step */
{ 0x3, FP_OFF(empty_handler) }, /* debug breakpoint */ { 0x3, FP_OFF(empty_handler) }, /* debug breakpoint */
{ 0x6, FP_OFF(int6_handler) }, /* invalid opcode */ { 0x6, FP_OFF(int6_handler) }, /* invalid opcode */
{ 0x19, FP_OFF(int19_handler) },
{ 0x20, FP_OFF(int20_handler) }, { 0x20, FP_OFF(int20_handler) },
{ 0x21, FP_OFF(int21_handler) }, { 0x21, FP_OFF(int21_handler) },
{ 0x22, FP_OFF(int22_handler) }, { 0x22, FP_OFF(int22_handler) },