8086 memory Organization 8086 Microprocessor by Ravinder Nath Rajotiya - March 30, 2022March 30, 20220 8086 supports 1M byte of memory. To address 1MB, we need 20 address lines and the 20 bit address ranges from 00000000000000000000 –to- 11111111111111111111 i.e. 00000h to FFFFFh. The memory is constructed using RAM and ROM /EEPROM chips. 1MB memory can be contagiously organized as memory or can be organized in banks of odd and even address memory so as to access 8 or 16 bit of data. The 8-bit data thus we can either access bytes from even address on data lines D0-D7 and data from odd address on the data bus D8-D15. Approached to Memory organization: i. As one contiguous block: Memory can be organized as one contiguous block of memory as in 8085 based systems. In this case 8-bit data
INT 21h DOS interrupt 8086 Microprocessor by Ravinder Nath Rajotiya - April 19, 2021May 10, 20210 INT 21h / AH=1 - read Character from standard input, with echo, result is stored in AL. INT 21h Service no. 01h Description Example MOV AH, 1 INT 21h read Character from standard input, with echo, result is stored in AL. if there is no Character in the keyboard buffer, the function waits until any key is pressed INT 21h / AH=2 - write Character to standard output. INT 21h Service no. 02h Description Example MOV AH, 2 MOV DH, 'a' INT 21h Write Character to standard output. entry: DH = Character to write, after executionAL = DH. INT 21h / AH=5 - output Character to printer. INT 21h Service no. 05h Description Example MOV AH, 5 MOV DH, 'a' INT 21h output Character to printer. entry: DH = Character to print, after execution AL = DH. INT 21h / AH=6 - Direct console input or output. INT 21h Service no. 06h Description Example MOV AH, 6 MOV DH, 'a' INT 21h; output Character. MOV AH, 6 MOV DH, 255 INT 21h; get Character from keyboard buffer (if
INT 11, INT 12, INT 16, INT 19 8086 Microprocessor by Ravinder Nath Rajotiya - April 19, 20210 INT 11h - get BIOS equipment list. INT 11h D15-14 D13 D12 D11-9 D8 D7-6 D5-4 D3 D2 D1 D0 Get BIOS equipment list. No. of // device Res Game port yes/ no No. of serial device Res. No. of FDD-1 Initial vedio mode res PS/2 mouse installed Math uP installed Set if booted from FDD Return Bios list word in AX; details given here for All bits D15-0 from memory 0040:0010h 00 - 1 01 - 2 10 - 3 11 - 4 0 no 1yes 000 001 010 011 100 101 110 111 00 -1 01 -2 10- 3 11-4 00 EGA/ VGA/PGA 01 - 40x25 CGA color 10 - 80x25 CGA color 11 - 80x25 mono txt 1 yes 0 no 1-enabled 2- Diabled INT 12h - Get Memory Size. INT 12h Service no. NIL Returns Description Example Get memory Size. AX = kilobytes of contiguous memory starting at absolute address 00000h, this call returns the contents of the word at 0040h:0013h INT 16h / AH = 00h - get keystroke from keyboard (no echo). INT 16h Service no. 00h Returns Description Example Get keystroke from keyboard (no echo). AH = BIOS scan code. AL = ASCII
Interrupt number 10h (INT 10h) 8086 Microprocessor by Ravinder Nath Rajotiya - April 19, 20210 INT 10h / AH = 00h - Set Video Mode INT 10h Service no. 00 Inputs any Description Example AH=00 Set Video Mode AL=00 Text mode 40x25, 16 color, 8 pages AL=03 text mode. 80x25. 16 colors. 8 pages. AL=13h Graphical mode. 40x25. 256 colors. 320 x 200 pixels. 1 page. MOV AL, 13h MOV AH, 0 INT 10h AH=01h Set text-mode cursor shape. INT 10h / AH = 01h - set text-mode cursor shape. INT 10h Service no. 01h Inputs any Description Example AH=01h Set text mode cursor shape CH Cursor start line(bit 0-4) and option (bit 5-7) Cursor is visible if Bit 5 =0 else cursor is invisible ; hide Blinking text cursor: MOV CH, 32 MOV AH, 1 INT 10h ; show standard Blinking text cursor: MOV CH, 6 MOV CL, 7 MOV AH, 1 INT 10h show box-shaped Blinking text cursor: MOV CH, 0 MOV CL, 7 MOV AH, 1 INT 10h CL Bottom cursor line(Bit 0-4) INT 10h / AH = 2 - Set cursor position. INT 10h Service no.02h Inputs any Description Example AH=02h set
Interrupts in 8086 8086 Microprocessor by Ravinder Nath Rajotiya - April 19, 20210 INTERRUPT Services: On the systems running on DOS based platform, certain i/o services are provided by hardware and the operating system. These services are called ROM-BIOS services and DOS services and are the form of interrupts. Need for Interrupt: Interrupts are particularly useful when interfacing I/O devices, that provide or require data at relatively low data transfer rate. Types of Interrupts: There are two types of Interrupts in 8086. They are: (i)Hardware Interrupts and (ii)Software Interrupts (i) Hardware Interrupts (External Interrupts). 8086 microprocessors support hardware interrupts through: Two pins (17 and 18) that Allow interrupt requests, NMI and INTR One pin that acknowledges, INTA, the interrupt requested on INTR. INTR and NMI INTR;is a maskable hardware interrupt. The interrupt can be enabled/Diabled using STI/CLI instructions or using more complicated method