티스토리 뷰


1. Insert following routines int your program

1) 프로그램 종료를 위한 interrupt vector 9의 주소를 저장하자. 현제 interrupt 주소는 윈도우 시스템을 위한 것입니다.

 mov ax, 0
 mov ds, ax

 mov bx, 09h * 04h ;find the int 9

 mov dx, word ptr [bx]
 push dx
 mov dx, word ptr [bx]+2
 push dx


2) 프로그램을 사용을 위해 interrupt vector 9를 새로운 주소로 바꾸자.

 mov ax, 0
 mov dx, ax

 mov bx, 09h * 04h

 cli ; disable an interrupt
 mov word ptr [bx], offset kbd_handler ; load your keyboard ISR
 mov word ptr [bx]+2, seg kbd_handler
 sti ;enable interrupts


3) 보통의 절차로 실행하기위한 프로그램을 작성하자.
 For this lab, 화면의 문자들을 표시하기위한 코드를 작성하자.

4) 프로그램을 종료하기전에 스택의 컨텐츠를 pop하자. 만약 안되면, 너의 키보드는 프로그램이 종료한 후에 작동하지 않을 것이다.

 mov ax, 0
 mov dx, ax

 mov bx, 09h * 04h

 cli ; disable interrupt
 pop dx
 mov word ptr [bx], dx ;back to normal address
 pop dx
 mov word ptr [bx]+2, dx
 sti ; enalbe interrupts


2. Define ISR routine and program as follows.
 The ISR address is the sane as the step #2.

 1) ...



인터럽트와 ISR 개념이 잘 안잡혔다면,
http://kkamagui.springnote.com/pages/339544
이곳 정보를 참고해보시길...

인트럽트 관련2
http://rusy.tistory.com/9


인텔 명령어 메뉴얼입니다.
용량이 크므로 조심..
http://download.intel.com/design/intarch/manuals/24319101.pdf

int 21h 관련
http://spike.scu.edu.au/~barry/interrupts.html#ah2c
 

ㅇㅇ