BIOS Serial Data Transmission INT Services

  • Published on
    22-Nov-2014

  • View
    236

  • Download
    1

DESCRIPTION

interrupt servive 14h

Transcript

<p>BIOS Serial Data Transmission INT ServicesPresented by</p> <p>NIKHIL N PATHAK(ME-MSA-207) M.S.UNIVERSITY,VADODARA 2010-2011</p> <p>BIOS Interrupt Services</p> <p>BIOS Interrupt services(cont.)o Types of Interrupts o Vector Table o BIOS INT Services</p> <p>Serial Data Transmission INT Service (INT 14 h)o Initialization of interrupt Invoking an interrupt can be done using the INT x86 assembly instruction. For example, to execute any function using BIOS interrupt 14h we perform the following x86 assembly instructions: mov ah, function code mov al, '!' int 14h</p> <p>Routines for communicating via the serial port.CODE 00h 01h 02h 03h DESCRIPTION Serial Port Initialization Transmit Character Receive Character Status</p> <p>Note:- The code is loaded in AH.</p> <p>Serial port Initialization Function code (00h):Setting parameters necessary for communicationParameter Description Word Size 10 = 7 11 = 8 Stop Bits 0 = 1 stop bit 1 = 2 stop bits Parity 00 = None 01 = Odd 11 = Even Baud Rate 000 = 110 baud 001 = 150 baud 010 = 300 baud 011 = 600 baud 100 = 1200 baud 101 = 2400 baud 110 = 4800 baud 111 = 9600 baud</p> <p>Bit 0 1 2 3 4 5 6</p> <p>Dec 1 2 4 8 16 32 64</p> <p>Hex01h 02h 04h 08h 10h 20h 40h</p> <p>7</p> <p>128</p> <p>80h</p> <p>Serial port Initialization Function code (00h)(conti) (00h)(conti)o Accordingly the parameter is selected and loaded in AL register o The Function code is loaded in AH register</p> <p>Data transmission function code (01h)oFunction code is loaded in AH register. oThe character to be transmitted is loaded in AL register</p> <p>Data Receiver Function code (02h)o The AH register is loaded with function code 02h. o After execution the received character is stored in AL register.</p> <p>Get Status Function code (03h)o Load AH with Function code 03h o On execution ,the status of modem and RS-232 are loaded onto AX register</p> <p>Get Status Function code (03h) conti. conti.o BIOS Serial port Status , returned in AH</p> <p>o BIOS Modem port Status , returned in AL</p> <p>Program code for transmitter.data string1 'N','I','K','H','I','L' .code .startup mov ax,@data mov ds,ax mov dx,0000h mov cx,06h mov AH,ooh mov AL,0E7h int 14h Loop1: lea si,string1 mov AH,01h mov AL,[si] int 14h inc si loop loop1 .end ;Data segment initialization ;comport 1 selection ;load string lenght ;function code for initialization ;parameter set up ;bios interrupt call ;load effective address of string ;function code for transmitting</p> <p>Program code for receiver.data string2 db 6dup(?) .code .startup mov ax,@data mov ds,ax mov dx,0000h mov ah,00h mov al,0E7h int 14h mov cx,06h mov ah,02h lea di,string2 int 14h mov[di],al inc di loop l2 ;Data segment initialization ;comport 1 selection ;function code for initialization ;parameter set up ;bios interrupt call</p> <p>l2:</p> <p>;load effective address of string2 ;the received character is copied to ;destination address</p> <p>end</p> <p>QUESTIONS ?</p>

Recommended

View more >