uart8250
asked on
getvet(),setvector() how were made in assembler language??
hi!
i need know how the getvect() and setvec() "C/C++" functions were made in assembly language ??
(by example MS-Macro Assembler , MASM)
please writte the assembly code!!!!
Thanks again!!
i need know how the getvect() and setvec() "C/C++" functions were made in assembly language ??
(by example MS-Macro Assembler , MASM)
please writte the assembly code!!!!
Thanks again!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Example:
To get the address of interrupt 21h
mov ax, 3521h
int 21h
; DS is the segment
; DX is the offset
To set the address of interrupt 21h
mov ax, 2521h
; NewISR21 is the ISR you want to use instead of the current handler
mov es, seg NewISR21
mov bx, ofs NewISR21
int 21h
To get the address of interrupt 21h
mov ax, 3521h
int 21h
; DS is the segment
; DX is the offset
To set the address of interrupt 21h
mov ax, 2521h
; NewISR21 is the ISR you want to use instead of the current handler
mov es, seg NewISR21
mov bx, ofs NewISR21
int 21h
ASKER
Thanks Bonev... Now, what I can do?? becouse, I use Visual C/C++ 5.0 (32bits) and
I need the setvect( ) , getvect( ) functions.
Thanks Again!!
I need the setvect( ) , getvect( ) functions.
Thanks Again!!
ASKER
Thanks nietod... Now, What I can do?? becouse , I use Visual C/C++ (32bits) and
I need the setvect( ), getvect( ) functions!! any idea??
Thanks Again!!
I need the setvect( ), getvect( ) functions!! any idea??
Thanks Again!!
Is your program MS-DOS based or not?
What can I do? Well for a start, you can try to obtain a working answer rather than accepting one that is useless...
The problem is that interrupts really can't be used by an application in a protected mode environment. The OS won't allow you to alter the interrupt dispatch table. And even if you could alter it, your program (and most likely the whole system) would crash when the interrupt is called anyways. The operating system and device drivers can use interrupts, but that is a different matter. They are designed to be able to handle them.
What is it that you are hoping to do.?
The problem is that interrupts really can't be used by an application in a protected mode environment. The OS won't allow you to alter the interrupt dispatch table. And even if you could alter it, your program (and most likely the whole system) would crash when the interrupt is called anyways. The operating system and device drivers can use interrupts, but that is a different matter. They are designed to be able to handle them.
What is it that you are hoping to do.?
The program is a 32 bit windows program. That is the only thing that VC 5 can produce. If it wasn't a 32 bit program, then he could just use the getvect.setvect functions.
I have no documenation for the functions since they are not available in win32, but if you describe them I could write them for you. Note however, that they can't be run from win32.