Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this experiment is to utilize the power of the 80x86 interrupt system. Procedure 1. Open a DOS window and enter this command

The purpose of this experiment is to utilize the power of the 80x86 interrupt system. Procedure 1. Open a DOS window and enter this command to start DEBUG and echo all its output to the file INTS.TXT: DEBUG > INTS.TXT 2. You will not be able to see what you are typing, but enter this command next: d 0:0 3ff DEBUG will write a copy of the interrupt vector table to the INTS.TXT file. 3. Again, typing blind, enter a q to quit DEBUG. 4. Examine the INTS.TXT file and comment on anything interesting you discover. As an example, here is the INTS.TXT file created on my home computer. 5. Based on your INTS.TXT file, what are the CS:IP addresses for the following interrupts? (a) INT 10H (Video BIOS) (b) INT 13H (Disk Services) (c) INT 21H (DOS Functions) 6. Examine Section 8.5 (pages 293 through 296). Then download VECTORS.ASM and assemble, link, and run. 7. To get a hardcopy of the VECTORS output, enter this DOS command: VECTORS > VECS.TXT You will need to hit 'Enter' four times to get back to the DOS prompt. Here is the sample VECS.TXT file from my computer. 8. Compare the INTS.TXT file with the results written to VECS.TXT. 9. Submit both TXT files with your comments. ;Program VECTORS.ASM: View entire interrupt vector table. ; .MODEL SMALL .DATA WMSG DB 0DH,0AH,'Hit any key to continue...',0DH,0AH,0DH,0AH,'$' .CODE .STARTUP SUB AL,AL ;begin with vector 0 NEWV: PUSH AX ;save vector number CALL DISPHEX ;display it MOV DL,' ' ;load blank character MOV AH,2 ;display character function INT 21H ;DOS call MOV DL,'=' ;load equal sign INT 21H ;and output MOV DL,' ' ;load another blank INT 21H ;and output POP AX ;get vector number back PUSH AX ;and save it again MOV AH,35H ;get interrupt vector function INT 21H ;DOS call MOV AX,ES ;get interupt segment CALL DISPHEX_16 ;display it MOV DL,':' ;load colon character MOV AH,2 ;display character function INT 21H ;DOS call MOV AX,BX ;get interrupt offset CALL DISPHEX_16 ;display it MOV DL,' ' ;load blank character MOV AH,2 ;display character function INT 21H ;DOS call INT 21H ;output a second blank POP AX ;get vector number back MOV DL,AL ;make a copy of it AND DL,3 ;should we output a new line? CMP DL,3 JNZ NNL PUSH AX ;save vector number MOV DL,0DH ;load carriage return MOV AH,2 ;display character function INT 21H ;DOS call MOV DL,0AH ;also output a line feed INT 21H POP AX ;get vector number back NNL: MOV DL,AL ;make copy of vector number CMP DL,255 ;finished? JZ NNP AND DL,63 ;should we pause here? CMP DL,63 JNZ NNP PUSH AX ;save vector number LEA DX,WMSG ;set up pointer to pause message MOV AH,9 ;display string function INT 21H ;DOS call MOV AH,8 ;character input function INT 21H ;DOS call POP AX ;get vector number back NNP: INC AL ;advance to nect vector CMP AL,0 ;did we wrap from 255 to 0? JNZ NEWV .EXIT DISPHEX_16 PROC NEAR PUSH AX ;save number MOV AL,AH ;load upper byte CALL DISPHEX ;go display in hex POP AX ;get number back CALL DISPHEX ;go display lower byte RET DISPHEX_16 ENDP DISPHEX PROC NEAR PUSH AX ;save number SHR AL,1 ;get upper nybble SHR AL,1 SHR AL,1 SHR AL,1 CALL HEXOUT ;display hex character POP AX ;get number back AND AL,0FH ;preserve lower nybble CALL HEXOUT ;display hex character RET DISPHEX ENDP HEXOUT PROC NEAR CMP AL,10 ;is AL greater than 10? JC NHA1 ;yes ADD AL,7 ;no, add alpha bias NHA1: ADD AL,30H ;add ASCII bias MOV DL,AL ;load output character MOV AH,2 ;display character function INT 21H ;DOS call RET HEXOUT ENDP END

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions