cleaner push immediate from Arkady and note big bug to be fixed

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1157 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Kenneth J Davis 2005-11-20 19:03:17 +00:00
parent 19d6cbe3fe
commit f9f2a082c1
2 changed files with 7 additions and 8 deletions

View File

@ -50,6 +50,7 @@ reloc_call_int13_handler:
stc ; force error unless BIOS clears
push dx ; store BIOS drive # for error handling usage
;TODO FIX this alters DS which is used by some subfunctions!!!
push ds ; get segment of kernel DATA
mov ds, [cs:_DGROUP_]
pushf ; simulate int call so returns back here (flags+cs:ip on stack)
@ -61,7 +62,6 @@ reloc_call_int13_handler:
int13iret:
inc sp ; clean up stack
inc sp
sti ; ensure int's are renabled
retf 2 ; return to caller leaving flags asis
int13err:
@ -78,11 +78,10 @@ int13err:
int13wrap:
%IF XCPU < 186
push ax ; preserve registers, setup stack frame
push bp
push bp
mov bp, sp
mov ax, 13h ; want to push 0x13 onto stack
xchg ax, [bp+2] ; so restore pushed ax value and put 0x13 on stack
mov [bp+2], word 13h ; do the push 0x13 onto stack
pop bp ; clean up stack frame (leaving just 0x13 pushed on stack)
%ELSE
push 13h ; the 186+ way to push a constant on the stack
@ -141,7 +140,7 @@ intWrapCall:
#if 0
%IF 0
; receives int 19h request, resets various int values,
; clears hma if in use, and finally invokes original handler,
@ -158,4 +157,4 @@ reloc_call_int19_handler:
mov ax, 19h ; handler for int 19h
push ax
jmp intWrapCall
#endif
%ENDIF

View File

@ -867,12 +867,12 @@ __HMARelocationTableStart:
_int13_handler: jmp 0:reloc_call_int13_handler
call near forceEnableA20
#if 0
%IF 0
global _int19_handler
extern reloc_call_int19_handler
_int19_handler: jmp 0:reloc_call_int19_handler
call near forceEnableA20
#endif
%ENDIF
global _int2f_handler
extern reloc_call_int2f_handler