Está en la página 1de 45

ARQUITECTURA DE COMPUTADORAS II

Interrupciones en la IBM PC
Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

POLLING (SONDEO)

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

TIPOS DE INTERRUPCIONES TIPOS DE INTERRUPCIONES EN LA IBM PC EN LA IBM PC

Internas o excepciones

Externas Externas o de hardware o de hardware

Software

No Enmascarables NMI
Carlos Canto Q.

Enmascarables INTR

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

TABLA DE VECTORES DE INTERRUPCIN

La tabla de vectores de interrupcin contiene las direcciones de las rutinas de servicio de las interrupciones que realizan las funciones asociadas con las interrupciones. Las rutinas del POST del BIOS inicializa la tabla de vectores, al momento de bootear, con las direcciones de las rutinas suministradas por el cdigo en la ROM BIOS y despus el DOS y nuestros programas de aplicacin agregan sus respectivos vectores a los vectores de esta tabla, conforme son cargados..

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

3FFF

LA TABLA DE VECTORES DE INTERRUPCIN

Se ubica en 1024 localidades de RAM en la parte ms baja de la memoria que permiten 256 vectores de interrupcin de 4 bytes cada uno.
Tabla de vectores de interrupcin

Vector 0

CSL CSH IPL IPh

0003 0002 0001 0000

Un vector de interrupcin est formado por la direccin de inicio de la rutina de servicio de la interrupcin ISR ( 2 bytes para CS y 2 bytes para IP)

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

LA TABLA DE VECTORES DE INTERRUPCIN

Error de divisin por 0 Ejecucin paso a paso NMI (No enmascarable) Instruccin INT Desbordamiento (INTO) Reservadas por INTEL (modo protegido)

Utilizables por el usuario Cada vector: 4 bytes Direccin del vector: 0: INT x 4 La tabla ocupa 256x4 = 1024 bytes (1 Kbyte)
Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

Cuando una interrupcin ocurre, independientemente de la fuente, el 80x86 realiza lo siguinte: 1) El CPU carga (push) el registro de banderas al STACK 2) La CPU carga al STACK la direccin de retorno lejano ( segmento:offset ) primero el valor del segmento. 3) La CPU determina la causa de la interrupcin ( esto es, lee el nmero o tipo de la interrupcin) y toma los 4 bytes del vector de interrupcin de la direccin 0000:vector*4. 4) La CPU transfiere el control a la rutina especificada por la tabla de vectores de interrupcin. Despus de completados estos pasos,la rutina de servicio de la interrupcin toma el control. Cuando la interrupcin desea regresar el control , debe ejecutar una instruccin IRET ( Interrupt Return). El retorno de una interrupcin recupera del STACK la direccin de retorno lejano y las banderas.

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II Operacin de las instrucciones INT e IRET


PROGRAMA INVOCANTE INT 16h produce un FAR CALL a la direccin Int 0915:0002 contenida en el vector 16H de la interrupcin 16h, 0915:0003 la direccin de retorno 0915:0004 se carga al STACK TABLA DE VECTOR 1 DE INTERRUPCIONES 0000:0000 0000:0058 0000:0059 0000:005A 0000:005B 2E EB 00 F0

INTERRUPCIONES EN LA IBM PC

STACK

04 00 15 09 FLAGS

RUTINA DE LA ROM BIOS

2
F000:EB2E F000:E82F

IRET

IRET produce un retorno de la rutina de interrupcin al programa invocante, recuperando del STACK la direccin CS:IP de la instruccn que qued pendiente

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

DESCRIPCIN DE LA TABLA DE VECTORES DE INTERRUPCIN Y SU TIPO


Int. Num. Address in I.V.T. Description

0 1 2 3 4 5 6 7 8 9 A B C

00-03 04-07 08-0B 0C-0F 10-13 14-17 18-1B 1C-1F 20-23 24-27 28-2B 2C-2F 30-33

CPU divide by zero Debug single step Non Maskable Interrupt (NMI input on processor) Debug breakpoints Arithmetic overflow BIOS provided Print Screen routine Reserved Reserved IRQ0, Time of day hardware services IRQ1, Keyboard Interface IRQ2, ISA Bus cascade services for second 8259 IRQ3, Com 2 hardware IRQ4, Com1 hardware

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

D E F 10 11 12 13 14 15 16 17 18 19 1A

34-37 38-3B 3C-3F 40-43 44-47 48-4B 4C-4F 50-53 54-57 58-5B 5C-5F 60-63 64-67 68-6B

IRQ5, LPT2, Parallel port hardware (Hard Disk on XT) IRQ6, Floppy Disk adaptor IRQ7, LPT1, Parallel port hardware Video services, see note 1 Equipment check Memory size determination Floppy I/O routines Serial port I/O routines PC used for Cassette tape services Keyboard I/O routines Printer I/O routines Points to basic interpreter in a "real" IBM PC Bootstrap loader Time of day services

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

1B 1C 1D 1E 1F 20 21 22 23 24 25

6C-6F 70-73 74-77 78-7B 7C-7F 80-83 84-87 88-8B 8C-8B 90-93 94-97

Services Ctrl-Break service Timer tick (provides 18.2 ticks per second) Video parameters Disk parameters Video graphics Program termination (obsolete) All DOS services available through this Interrupt Terminate address Ctrl-Break exit address Critical error handler Read logical sectors

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

26 27 28 to 3F 40 to 4F 50 51 52 to 59 5A 5B 5D 5E 5F 60 to 66 67

98-9B 9C-9F A0-A3 to FC-FF 100-103 to 13C-13F 140-143 144-147 148-14B to 164-167 168-16B 16C-16F 174-177 178-17B 17C-17F 180-183 to 198-19B 19C-19F

Write logical sectors Terminate and stay resident routines (obsolete) Reserved for DOS Reserved for BIOS Reserved for BIOS Mouse functions Reserved for BIOS Reserved for BIOS Reserved for BIOS Reserved for BIOS Reserved for BIOS Reserved for BIOS Reserved for User programs Used for EMS functions

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

68 to 6F 70 71 72 73 74 75 76 77 78 to 7F 80 to 85 86 to F0 F1 to FF

1A0-1A3 to 1BC-1BF 1C0-1C3 1C4-1C7 1C8-1CB 1CC-1CF 1D0-1D3 1D4-1D7 1D8-1DB 1DC-1DF 1E0-1E3 to 1FC-1FF 200-203 to 214-217 218-21B to 3C0-3C3 3C4-3C7 to 3C4-3FF

Unused IRQ8, ISA bus Real time clock IRQ9, takes the place of IRQ2 IRQ10 (available hardware interrupt) IRQ11 (available hardware interrupt) IRQ12 (available hardware interrupt) IRQ13, maths co-processor IRQ14, ISA bus hard disk controller IRQ15, (available hardware interrupt) Unused Reserved for basic Used by basic Unused

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

EN GENERAL:
La
familia de microprocesadores 8086 pueden reconocer 256 diferentes interrupciones, cada una con un cdigo nico de TIPO (nmero) con el que el microprocesador lo identifica. entre 00 y FF en hexadecimal ) para apuntar a una localidad dentro de la tabla de vectores de interrupcin.

El procesador usa este cdigo de TIPO ( un nmero

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

Termina la Termina la instruccin instruccin en curso en curso


Interrupcin Interrupcin interna interna

La CPU no puede dejar una instruccin a medio ejecutar, sensa las interrupciones en el ltimo ciclo de mquina de la instruccin en curso y responde al finalizar la instruccin en curso
SI

Call ISR Call ISR SI NMI NMI 1

NMI NMI

SI TEMP TEMP SI IF IF 0 1 Interrupcin Interrupcin reconocida reconocida Lee cdigo Lee cdigo de tipo de tipo Push flags Push flags Let temp=TF Let temp=TF Clear IF&TF Clear IF&TF Push CS&IP Ejecuta ISR Ejecuta ISR Pop IP&CS Pop IP&CS Pop flags Pop flags Continua con Continua con el programa el programa

INTR INTR

TF TF 0 Ejecuta la Ejecuta la Siguiente Siguiente instruccin instruccin

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES INTERNAS O EXCEPCIONES: INTERRUPCIONES INTERNAS O EXCEPCIONES:


Las genera la propia CPU cuando se produce una situacin anormal o cuando llega el caso. Por desgracia, IBM se salt olmpicamente la especificacin de Intel que reserva las interrupciones 0-31 para el procesador.

INT 0: error de divisin, generada automticamente cuando el cociente no cabe en


el registro o el divisor es cero. Slo puede ser generada mediante DIV o IDIV.

INT 1:

paso a paso, se produce tras cada instruccin cuando el procesador est en modo traza (utilizada en depuracin de programas).

INT 2: interrupcin no enmascarable, tiene prioridad absoluta y se produce incluso


aunque estn inhibidas las interrupciones (con CLI) para indicar un hecho muy urgente (fallo en la alimentacin o error de paridad en la memoria).

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES INTERNAS O EXCEPCIONES: INTERRUPCIONES INTERNAS O EXCEPCIONES:

INT 3: utilizada para poner puntos de ruptura en la depuracin de programas,


debido a que es una instruccin de un solo byte muy cmoda de utilizar.

INT 4: desbordamiento, se dispara cuando se ejecuta un INTO y haba


desbordamiento.

INT 5: rango excedido en la instruccin BOUND (slo 286 y superiores). Ha sido


incorrectamente empleada por IBM para volcar la pantalla por impresora.

INT 6: cdigo de operacin invlido (slo a partir del 286). Se produce al ejecutar
una instruccin indefinida, en la pila se almacena el CS:IP de la instruccin ilegal.

INT 7: dispositivo no disponible (slo a partir del 286).

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES DE SOFTWARE: INTERRUPCIONES DE SOFTWARE:

Producidas por el propio programa usando la instruccin INT para invocar ciertas subrutinas. La BIOS y el DOS utilizan algunas interrupciones a las que se puede llamar con determinados valores en los registros para que realicen ciertos servicios.

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES EXTERNAS O DE HARDWARE: INTERRUPCIONES EXTERNAS O DE HARDWARE:

Son generadas por dispositivos perifricos externo a travs de una seal elctrica. Se solicita la atencin de la CPU aplicndole la seal a sus terminales INT y NMI Las Enmascarables por INT : activa a nivel alto Las No Enmacarables por NMI: activa en flanco de subida

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES EXTERNAS O DE HARDWARE: INTERRUPCIONES EXTERNAS O DE HARDWARE:

INTR NMI

CPU
La CPU genera dos impulsos de reconocimiento de interrupcin

INTA

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES EXTERNAS O DE HARDWARE: INTERRUPCIONES EXTERNAS O DE HARDWARE:

INTERRUPCIONES ENMASCARABLES SE HABILITAN O DESHABILITAN POR PROGRAMA: Con la instruccin SETI se habilitan las interrupciones y pone la
bandera IF a 1 Con la instruccin CLI se inhiben todas las posibles interrupciones de este tipo y se pone la bandera IF a 0.

LA CPU RESPONDE AL SER ACEPTADA LA INTERRUPCIN,


CON UNA SEAL EN SU TERMINAL INTA ( INTERRUPT ACNOWLWDGE)

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES EXTERNAS O DE HARDWARE: INTERRUPCIONES EXTERNAS O DE HARDWARE: INTERRUPCIONES ENMASCARABLES:


son solicitadas por perifricos externos, a travs de un Controlador de interrupciones programable ( Programmable Interrupts Controller : PIC) que se conecta a la terminal INT del procesador, La aceptacin o no depende del status de la bandera de interrupciones IF

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

La IBM PC original us el controlador de interrupciones 8259. Este permita que se pudieran generen hasta 8 seales de interrupcin ( numeradas de 0 a 7). Estas lneas de interrupcin son llamadas lneas de Interrupt Request ( requerimiento de interrupcin) o IRQs

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

A partir de la IBM AT se incluyen 2 controladores de interrupcin, donde el segundo controlador (ESCLAVO) est conectado en cascada a la lnea de interrupcin 2 del primer controlador ( MAESTRO) . L a lneas de interrupcin del segundo controlador estn numeradas de 8 a 15. Debido a este cascadeo, la lnea de interrupcin 2 no est disponible. Sin embargo ; para compatibilidad con la PC original, la lnea de interrrupcin 2 es conectada a al lnea 9 del segundo controlador ( tal que, si un dispositivo en la PC es configurado para la interrupcin 2, en realidad ste usa la interrupcin 9)

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

Interrupciones reservadas:
IRQ0 Temporizador (Timer) IRQ1 Teclado IRQ8 Reloj de tiempo real IRQ13 Errores del coprocesador IRQ14 Controlador de disco duro IRQ3 Puerto serie COM1 IRQ4 Puerto serie COM2 IRQ6 Controlador de diskette IRQ7 Puerto paralelo

Al inicio del sistema se especifica:


PIC MAESTRO INT = IRQ + 8 PIC ESCLAVO INT = IRQ + 70h
Carlos Canto Q.

PIC MAESTRO Dir E/S = 20h, 21h PIC ESCLAVO Dir E/S = A0h, A1h

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

Entradas del controlador programable de interrupciones PIC 8259

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

El PIC 8259 (Programmable Interrupt Controller)

ESQUEMA INTERNO DE BLOQUES


Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

El PIC 8259 (Programmable Interrupt Controller)

El registro de mscara

Permite enmascarar individualmente cada entrada: 1 Prohibe interrupciones por esa lnea 0 Permite interrupciones por esa lnea
Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

El PIC 8259 (Programmable Interrupt Controller) Proceso de una interrupcin en el PIC


1. Un perifrico solicita interrupcin

2. El PIC solicita interrupcin a la CPU (INT) 3. La CPU reconoce la peticin con un primer pulso de INTA 4. Se activa el bit correspondiente de ISR y se desactiva en IRR

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

El PIC 8259 (Programmable Interrupt Controller) Proceso de una interrupcin en el PIC (continuacin)

5. La CPU enva el segundo pulso de INTA 6. El PIC coloca un puntero de 8 bits en el bus de datos El valor del puntero es distinto para cada entrada IRQ Es programable 7. A partir de entonces comienza a ejecutarse la rutina de atencin

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

El PIC 8259 (Programmable Interrupt Controller)

Fin de interrupcin (EOI) Los bits activos de ISR bloquean futuras peticiones por esa lnea

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

El PIC 8259 (Programmable Interrupt Controller)

Fin de interrupcin (EOI)

Deben ponerse a 0 al terminar la rutina de servicio: (EOI) Formas de poner a 0 el bit de ISR: 1. Programar el modo automtico (AEOI) colocar el El bit se pone a 0 automticamente al puntero en el bus de datos No especfico : pone a 0 el de ms prioridad Especfico: pone a 0 el que se le indica
Carlos Canto Q.

2. Enviar al PIC el comando EOI:

Generalmente se enva el EOI justo antes del

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

El PIC 8259 (Programmable Interrupt Controller)

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

CONEXIN DE LOS CONTROLADORES PROGRAMABLES DE INTERRRUPCIN (PIC) 8259 A LA PC

Los PICs se conectan al sistema a travs de Los puertos de E/S


20h/A0h y 21h/A1h.

La primera direccin es la direccin del PIC maestro (IRQ0-IRQ7), la


segunda corresponde al PIC esclavo (IRQ8-IRQ15).

La 20h/A0h es una localidad de lectura/escritura a la cual se escriben


comandos al PIC y se lee su status, nos referiremos a ste como el registro de comandos o el registro de status.

EL registro de comandos es de slo escritura y el de status es de slo


lectura . Ellos solo comparten la misma localidad de E/S. Las lneas de READ/WRITE del PIC determina que registro va a accesar el CPU.

EL puerto 21h/A1h es una localidad de lecto/escritura que contiene el


registro mscara de interrupcin.
Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

Registro de mscara de Interrupcin del PIC


El registro de mscara del PIC es un registro de 8 bits que nos permite habilitar y deshabilitar individualmente las interrupciones de los dispositivos del sistema. Esto es similar a las acciones de las instrucciones CLI y STI, pero sobre un dispositivo

Para deshabilitar la interrupcin de algn dispositivo especfico, escriba un uno al registro de mscara Para habilitar la interrupcin de algn dispositivo especfico, escriba un cero al registro de mscara

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES DEL BIOS

SERVICIO A DISPOSITIVOS PERIFRICOS..............(6) SERVICIO A DISPOSITIVOS PERIFRICOS..............(6) STATUS DEL EQUIPO..................................................(2) STATUS DEL EQUIPO..................................................(2) HORA Y FECHA...........................................................(1) HORA Y FECHA...........................................................(1) PRINT SCREEN...........................................................(1) PRINT SCREEN...........................................................(1) SERVICIOS ESPECIALES............................................(2) SERVICIOS ESPECIALES............................................(2)

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES DEL BIOS


SERVICIO A DISPOSITIVOS PERIFRICOS: SERVICIO A DISPOSITIVOS PERIFRICOS:

INT 10H............................................SERVICIO DEL VIDEO INT 10H............................................SERVICIO DEL VIDEO INT 13H............................................SERVICIOS DE DISKETTE INT 13H............................................SERVICIOS DE DISKETTE INT 14H............................................COMUNICACIONES INT 14H............................................COMUNICACIONES INT 15H............................................SERVICIOS DEL SISTEMA INT 15H............................................SERVICIOS DEL SISTEMA INT 16H............................................SERVICIOS DEL TECLADO INT 16H............................................SERVICIOS DEL TECLADO INT 17H............................................SERVICIOS DE IMPRESORA INT 17H............................................SERVICIOS DE IMPRESORA

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

INTERRUPCIONES DEL BIOS


STATUS DEL EQUIPO: STATUS DEL EQUIPO:


Carlos Canto Q.

INT 11H............................................LISTADO DEL EQUIPO INT 11H............................................LISTADO DEL EQUIPO INT 12H............................................TAMAO DE MEMORIA INT 12H............................................TAMAO DE MEMORIA

HORA Y FECHA: HORA Y FECHA:


INT 1AH............................................HORA Y FECHA INT 1AH............................................HORA Y FECHA

PRINT SCREEN: PRINT SCREEN:


INT 5H.............................................IMPRESIN DE PANTALLA INT 5H.............................................IMPRESIN DE PANTALLA INT 18H...........................................ACTIVAR LA BASIC-ROM INT 18H...........................................ACTIVAR LA BASIC-ROM

SERVICOS ESPECIALES: SERVICOS ESPECIALES:


INT 19H...........................................ACTIVAR RUTINA DE INT 19H...........................................ACTIVAR RUTINA DE ARRANQUE CARGADO ARRANQUE CARGADO

ARQUITECTURA DE COMPUTADORAS II
Rengln 0 Rengln 0 Columna 0 Columna 0 0 1 2 0123

INTERRUPCIONES EN LA IBM PC

Funcin 02 de la INT 10H del BIOS


DL
76 77 78 79

Colocacin del cursor Colocacin del cursor


Rengln 0 Rengln 0 Columna 79 Columna 79

DH
22 23 24 Rengln 24 Rengln 24 Columna 0 Columna 0 Rengln 12 Rengln 12 Columna 40 Columna 40

Rengln 24 Rengln 24

Ejemplo:Colocar al cursor en las Columna 79 Ejemplo:Colocar al cursor en las Columna 79 posiciones (DL,DH)=(12,40) posiciones (DL,DH)=(12,40) MOV AH,02H MOV AH,02H ;invocar a la ;invocar a la funcin 2 de la INT funcin 2 de la INT 10h 10h MOV BH,00 MOV BH,00 pgina 0 pgina 0 ;trabajar con la ;trabajar con la

AH=02 BH=00 DH = rengln DL = columna

INT INT 10H 10H DEL DEL BIOS BIOS

Colocacin del cursor

MOV DH,12 ;cargar el #de MOV DH,12 ;cargar el #de columna en DH columna en DH MOV DL,40 MOV DL,40 rengln en DL rengln en DL INT 10H INT 10H rutina del BIOS ;cargar el # de ;cargar el # de ;Invocar a la ;Invocar a la

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

Funcin 06 de la INT 10H del BIOS


Limpiar la pantalla Limpiar la pantalla
AH=06 AL=00 BH=# de atributo CX=rengln:columna(inicio) DX=rengln:columna ( final ) AL=00; Pantalla completa
00:00

INT 10H INT 10H DEL BIOS DEL BIOS

Limpiar la pantalla

Cx posicin Cx posicin inicial inicial

18:4F

Dx Dx posicin posicin final final

BH=atributo de la pantalla ejemplo: 7=blanco 1=azul

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

Atributos de la pantalla Atributos de la pantalla


Cada carcter de la
pantalla monocromtica tiene su propio atributo: no no parpadeante o intensificado o

El atributo se carga al registro BH BH: b7 b6 b5 b4 b3 b2 b1 b0


Background 000=negro 001=azul 010=verde 011=cian 100=rojo 101=magenta 110=caf 111=blanco Parpadeo 0= normal 1=parpadeante Intensidad 0= normal 1=intensificado Foreground 000=negro 001=azul 010=verde 011=cian 100=rojo 101=magenta 110=caf 111=blanco

Cada posicin de un video normal o inverso. en la pantalla carcter (25X80=2000 ) es representado por 2 bytes: El primero es el ASCII del caracter El segundo es el byte que contiene el atributo
Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

SERVICIOS DE LA INT 14H DEL BIOS


MANEJO DEL PUERTO SERIAL

__________________________________________ __________________________________________

Servicio Servicio
00 00 01 01 02 02 03 03 04 04 05 05

Descripcin Descripcin


Carlos Canto Q.

Inicializa el puerto serial Inicializa el puerto serial Enva un carcter Enva un carcter Recibe un carcter Recibe un carcter Lee el status del puerto serie Lee el status del puerto serie Inicializa el puerto serie extra Inicializa el puerto serie extra Control del puerto de comunc. Control del puerto de comunc.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

SERVICIO 00 DE LA INT 14H :


INICIALIZACIN DEL PUERTO SERIAL

ACTIVA LOS PARAMETROS SIGUIENTES: ACTIVA LOS PARAMETROS SIGUIENTES: _________________________________________ _________________________________________

EL BAUDAJE EL BAUDAJE LA PARIDAD LA PARIDAD EL NMERO DE STOPS BITS EL NMERO DE STOPS BITS EL TAMAO EN BITS DEL DATO EL TAMAO EN BITS DEL DATO

Carlos Canto Q.

ARQUITECTURA DE COMPUTADORAS II

INTERRUPCIONES EN LA IBM PC

SERVICIOS DE LA INT 14H DEL BIOS


SERVICIO 00h:INICIALIZACIN DEL PUERTO SERIAL
b7 b6 b5 b4 b3 b2 b1 b0 Tamao del dato
Baudaje Baudaje _________ _________ 765 765 bps bps Paridad Paridad ________________ ________________ 43 significado 43 significado ________________ ________________ 00 ninguna 00 ninguna 01 Paridad impar 01 Paridad impar 10 ninguna 10 ninguna 11 Paridad par 11 Paridad par Stop bits Stop bits _____________ _____________ bit2 significado bit2 significado _____________ _____________ 0 1stop bit 0 1stop bit 1 2 stops bits 1 2 stops bits _________ _________ 000 110 000 110 001 150 001 150 010 300 010 300 011 600 011 600 100 1200 100 1200 101 2400 101 2400 110 4800 110 4800 111 9600 111 9600 Carlos Canto Q.

# de stops bits Cdigo de paridad Cdigo de baudaje


Tamao del dato Tamao del dato ____________ ____________ 10 significado 10 significado ____________ ____________ 00 No usado 00 No usado 01 No usado 01 No usado 10 7 bits 10 7 bits 11 8 bits 11 8 bits

También podría gustarte