flat assembler
Message board for the users of flat assembler.
Index
> DOS > Hardware vs. Software Interrupts |
Author |
|
vid 23 Feb 2004, 19:12
Keypress generates signal for PIC which triggers interrupt, but it also writes byte value at port 60, which says which key was pressed / released. For some keys, like shifts or printscreen or sys request there are more bytes buffered at port 60. For extended keys byte E0h appears on port 60 first.
That is the reason of PIC - when it gets signal from some device it stops code execution and triggers interrupt. But I just can't remember whether it is 60d or 60h |
|||
23 Feb 2004, 19:12 |
|
Paul6253 23 Feb 2004, 23:17
thanks...that helped a bit
_________________ Plez xcuce mi spelng |
|||
23 Feb 2004, 23:17 |
|
f0dder 24 Feb 2004, 07:13
The keyboard is port 60h - but iirc, port 61h is used in conjunction with the keyboard IRQ, too - something about reading byte, setting high bit, and writing back, to reset the keyboard before EOI. I could be wrong though, it's been a while since I messed with it.
Also, you can get 'hardware interrupts' not only from various devices, but from the CPU itself... single step (int1) and breakpoint (int3) interrupts/exceptions, and (in protected mode) things like page faults, doublefault, machine check exception. All these aren't (and shouldn't) be generated with INT xx, but by the CPU itself. |
|||
24 Feb 2004, 07:13 |
|
Paul6253 24 Feb 2004, 21:14
Correct me if im wrong but an irq line and an int number are not the same.
The line is a wire along the bus which is used to, which on modern systems consist of a 16 line bus. The int number is just an offset shifted twice to derive a double pointer to the handler routine. And the system nmi from the cpu have no wires to the bus-- so they cannnot be accessed(???)-- no sure if they can... _________________ Plez xcuce mi spelng |
|||
24 Feb 2004, 21:14 |
|
vid 25 Feb 2004, 16:59
you are right about IRQ and int num
about NMI - you can "invoke" NMI interrupt (forgot number) with int instruction, but it is different from normal NMI caused by power lack or whatever, because in that case processor also sets some internal stuff. |
|||
25 Feb 2004, 16:59 |
|
Paul6253 25 Feb 2004, 19:19
ok vid--- i GOT YOUR POINT _________________ Plez xcuce mi spelng |
|||
25 Feb 2004, 19:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.