[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

getvet(),setvector() how were made in assembler language??

Posted on 1998-09-10
8
Medium Priority
?
321 Views
Last Modified: 2011-09-20
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!!
0
Comment
Question by:uart8250
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1172477
Why?  If you are running on a platform that supports them (like I suspect win16 does) then use the C/C++ version.  If not, you can't use assembly version either.

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.
0
 
LVL 1

Accepted Solution

by:
Bonev earned 60 total points
ID: 1172478
These functions are useful generally in MS-DOS based programs.
There are two ways to implement them:
1) Using the MS-DOS functions 35h (get) and 25h (set).
2) Direct access to the interrupt vector table, that is located at memory location 0x0000:0x0000. Each vector occupies 2 16-bit words representing the segment (2nd word) and the offset (1st word) of the interrupt service routine.

0
 
LVL 1

Expert Comment

by:Bonev
ID: 1172479
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

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:uart8250
ID: 1172480
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!!
0
 

Author Comment

by:uart8250
ID: 1172481
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!!
0
 
LVL 1

Expert Comment

by:Bonev
ID: 1172482
Is your program MS-DOS based or not?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1172483
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.?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1172484
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.  
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question