Something weard is happening. I'm trying (for debugging) to put the correct offset in the 33rd interrupt gate of the IDT. I intialize a variable called IDT33_offset.
This code doesn't work :
Chg_Init_Int33 proc near
push eax
push ebx
push edx
sidt fword ptr IDT_Limit
mov eax, IDT_BaseAddress
mov ebx, 033h
shl ebx, 3
add eax, ebx
mov IDT33_offset, eax
cli
mov dx, 8046h
mov word ptr [IDT33_offset+6], dx
mov dx, 332Eh
mov word ptr [IDT33_offset], dx
sti
pop edx
pop ebx
pop eax
ret
Chg_Init_Int33 endp
while this works (only difference : I use directly eax instead of passing his value in INT33_offset) :
Chg_Init_Int33 proc near
push eax
push ebx
push edx
sidt fword ptr IDT_Limit
mov eax, IDT_BaseAddress
mov ebx, 033h
shl ebx, 3
add eax, ebx
mov IDT33_offset, eax
cli
mov dx, 8046h
mov word ptr [eax+6], dx
mov dx, 332Eh
mov word ptr [eax], dx
sti
pop edx
pop ebx
pop eax
ret
Chg_Init_Int33 endp
I'm puzzled...
Any help?
Thanks in advance.
Nico.
This code doesn't work :
Chg_Init_Int33 proc near
push eax
push ebx
push edx
sidt fword ptr IDT_Limit
mov eax, IDT_BaseAddress
mov ebx, 033h
shl ebx, 3
add eax, ebx
mov IDT33_offset, eax
cli
mov dx, 8046h
mov word ptr [IDT33_offset+6], dx
mov dx, 332Eh
mov word ptr [IDT33_offset], dx
sti
pop edx
pop ebx
pop eax
ret
Chg_Init_Int33 endp
while this works (only difference : I use directly eax instead of passing his value in INT33_offset) :
Chg_Init_Int33 proc near
push eax
push ebx
push edx
sidt fword ptr IDT_Limit
mov eax, IDT_BaseAddress
mov ebx, 033h
shl ebx, 3
add eax, ebx
mov IDT33_offset, eax
cli
mov dx, 8046h
mov word ptr [eax+6], dx
mov dx, 332Eh
mov word ptr [eax], dx
sti
pop edx
pop ebx
pop eax
ret
Chg_Init_Int33 endp
I'm puzzled...
Any help?
Thanks in advance.
Nico.