[완료] 어디서 시작해야 될찌 모르겟네요.

red10won의 이미지

Computer Systems

School of Electrical Engineering and Computer Science

Assignment #4

Due Date: Nov 1, 07

Purpose: To understand Interrupt concept for IBM PC

References: Intel 80x86 Reference Manual or Textbook

Modify your program of assignment #3 and program to display your name randomly on the monitor. The cahracter might be displayed bold, highlighted, or normal.

When you input a character from the keyboard, stop displaying your name and display the red blinking character for 5 seconds. And then return to normal counting routine.

But you type in Character "X", your have to finish your program and back to the DOS.

You have to modify the vector address of interrupt service routine. Refer to the class web site for detail information.

Submission:

1. This assignment paper

2. Algorithm and or flowchart

2. Compiled program list

3. TA Signature of the program

Grade:

Assembly program operation ............... = 20

Program operation and TA signature....... 5

Documentation .................................................. 5

------

30

1. Insert following routines in your program

1) Save the address of Interrupt Vector 9 to use to exit the program.

The present Interrupt address is for the Windows system.

mov ax, 0

mov ds, ax

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

mov dx, word ptr [bx]; Save it on the stack

push dx

mov dx, word ptr [bx]+2

push dx

2) Change the new address for Interrupt Vector 9 to use your program.

mov ax, 0

mov ds, 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) Write your program to perform normal procedure.

For this lab, write code to display characters on the screen.

4) Pop the content of the stack before your program exits. If not, your keyboard is not working after it exits.

mov ax, 0

mov ds, ax

mov bx, 09h * 04h ; find Int 9 address again

cli; disable interrupt

pop dx

mov word ptr [bx], dx; back to normal address

pop dx

mov word ptr [bx]+2, dx

sti; enable interrupts

2. Define ISR routine and program as follows.

The ISR address is the sane as the step #2.

1) Save present general purpuse registers and flags such as.

push ax

push bx

................

2) Check the data ready for the keyboard status address: Port 64h.

in al, 64h

test al, 01h ; set 1 means ready for data

3) Read data from the keyboard data address : Port 60h

in al, 60h

4) Before exit, send the exit signal to Programmable Interrupt Control.

mov al, 20h

out 20h, al

5) Before exit, store back all registers you saved for interrupt.

pop bx

pop ax

................
=====================================

이런글 올리기 죄송하지만
레포트인데 해달라는건 아니고

대락적으로 멀하라는건지

설명만 좀 해주시면 안될까 해서 부탁드리는검니다.

익명 사용자의 이미지

IBM PC의 Keyboard Hardware Interrupt Vector인 INT 9 Vector를 재 정의하여
Keyboard 입력을 받고 (port 64h와 port 60h를 읽어서 키 값을 읽고 port 20h
를 조작하여 PIC에 Interrupt 종료를 알려주는 방법까지 문제에 나와 있습니다)
X 키를 제외한 키 입력에 대해서는 입력한 문자를 붉은색 반짝이 속성으로 5초간
출력하고 X키를 입력하면 종료하라고 적혀 있군요. Interrupt Vector 재정의와
복원 방법 역시 문제에 나와 있습니다. (종료 전에 Interrupt Vector를 복원하지
않으면 키보드를 입력했을 때 DOS가 폭주할 수 있습니다)

문자 출력은 INT 10h를 사용하거나 VGA의 Video RAM Mapping 영역에 직접 데이터
를 입력하면 될 듯하고 DOS로 종료하는 것은 INT 21h로 해결할 수 있겠죠.

red10won의 이미지

좋은 주말 보내시기 바람니다

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.