1 / 8

SET 21 OPERATING SYSTEM USE OF ASSEMBLY LANGUAGE

SET 21 OPERATING SYSTEM USE OF ASSEMBLY LANGUAGE. SYSTEM USES OF ASSEMBLY LANGUAGE For drivers for external devices connected to the computer, such as printers, digital cameras, etc.

saman
Download Presentation

SET 21 OPERATING SYSTEM USE OF ASSEMBLY LANGUAGE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SET 21OPERATING SYSTEMUSE OF ASSEMBLY LANGUAGE

  2. SYSTEM USES OF ASSEMBLY LANGUAGE • For drivers for external devices connected to the computer, such as printers, digital cameras, etc. • In operating system software to control internal devices such as the interrupt controller, DMA controller, timer, etc

  3. INTERNAL DEVICE USE • Many of the chips on the motherboard are made for general use, including circuits that are not connected to computers • These chips generally need to be programmed in order to carry out the specific functions required in a computer’s circuitry.

  4. EXAMPLES • The interrupt controller chip has to be programmed in order to give some interrupts precedence over others. • For instance the interrupt for the timer (to update the time of day) cannot itself be interrupted by the keyboard, but the keyboard interrupt can be interrupted by the timer.

  5. Reading and writing from the hard disk requires numerous commands sent to the DMA controller chip and the hard drive controller • The timer chip has to be programmed in order, among other functions, to produce interrupts at the desired frequency for use in updating the time of day.

  6. Commands to devices, to get them to perform various functions, or to initialize them, are made by sending one or more bytes to special addresses associated with the devices, called ports • To send a byte to a port, one needs to put the byte in AL, and assuming that the port number is (say) 43h, employ the instruction OUT 43h, AL

  7. Depending on the device, one can also send words, or double words to a device, employing e.g. OUT port no., AXor OUT port no., EAX • To input a byte from a device, e.g. to obtain status information, one employs IN port no., AL

  8. A SIMPLE EXAMPLE OF USING ASSEMBLER TO WRITE PROGRAMS FOR DEVICES We will consider in the example following this slide set how one can program the timer, and another chip called a Programmable Peripheral Interface (PPI), to play music on the computer’s speakers

More Related