Accessing Hiword/Loword of an extern reference
Posted: Sun Nov 17, 2002 11:33 am
Hi,
I want to set up a IDT in assembler, but the
handlers are programmed in C. So i need to put the
address of the C functions into the IDT. But since the address of the handler is splitted into the Loword and the Highword in an IDTE, i have to access the Loword and Highword of the address seperately. I already tried this:
dw (int0_handler & FFFF0000)
and this
dw (int0_handler >> 16)
and this
dw word int0_handler
to access just the Highword of the 32-bit address int0_handler, which is an extern reference to the C-function.
but it gives me a compiler error by nasm. I already searched the NASM Documentation and google for a solution, but couldn?t find anything about that.
Do you know of any NASM - Instruction to access the Hiword/Loword of an external 32-bit reference?
Thanks in advance,
Elfredo
I want to set up a IDT in assembler, but the
handlers are programmed in C. So i need to put the
address of the C functions into the IDT. But since the address of the handler is splitted into the Loword and the Highword in an IDTE, i have to access the Loword and Highword of the address seperately. I already tried this:
dw (int0_handler & FFFF0000)
and this
dw (int0_handler >> 16)
and this
dw word int0_handler
to access just the Highword of the 32-bit address int0_handler, which is an extern reference to the C-function.
but it gives me a compiler error by nasm. I already searched the NASM Documentation and google for a solution, but couldn?t find anything about that.
Do you know of any NASM - Instruction to access the Hiword/Loword of an external 32-bit reference?
Thanks in advance,
Elfredo