Assembly Langauge Interrupts

Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2008
Posts: 5
Reputation: Lilith24 is an unknown quantity at this point 
Solved Threads: 0
Lilith24 Lilith24 is offline Offline
Newbie Poster

Assembly Langauge Interrupts

 
0
  #1
Jan 8th, 2009
So assembly language interrupts are signals to the OS asking it to perform an action based on what is in the register. I was thinking, what would happen if there is no OS on the device you are programming. If you can't use interrupts from the OS would you have to make a large piece of code for a simple thing such as telling the computer to end the program?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 150
Reputation: sDJh is an unknown quantity at this point 
Solved Threads: 13
sDJh sDJh is offline Offline
Junior Poster

Re: Assembly Langauge Interrupts

 
0
  #2
Jan 9th, 2009
Not directly. To shutdown the computer or reboot it, you can simply use direct hexcodes. Reboot for example is
  1. DB 0EAh
  2. DW 0000h
  3. DW 0FFFFh

When you run your programme without an OS you can put your code in the interruptvector (should be many tuts in the net). But if you use your programme yourself (so if you don't intent to write your own OS ) it's not neccessary.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 10
Reputation: iyercb is an unknown quantity at this point 
Solved Threads: 1
iyercb iyercb is offline Offline
Newbie Poster

Re: Assembly Langauge Interrupts

 
0
  #3
Jan 16th, 2009
There are a lot of peripherals that one has to use including printers, disk drives, com ports, etc., etc.

For example, when you read/write something to the disk, you need to know if space is available on the said device, an appreciation of how the disk has tracks and segments, a lot of low level hardware related things including timing etc. When you read/write from the disk, do not think that the data is read or written on the very first try even though it may look so. How do you buffer the data read or to be written when you have many actions happening at the same time. On the COM port, how do you recover from an error, how many times do you retry before giving up. If you were to handle all these scenarios yourself, you will end up writing close to the DOS system we have. DOS has been around for a few years developed by a major corporation and used and critiqued by the world. Would you want to do it yourself?

What can be done is for special pursposes implement a non used interrupt in the interrupt vector (low memory area) and code you functionality. Even there you may fall back on many DOS provided functions.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Assembly Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC