Click to See Complete Forum and Search --> : Interrupts
Fatboy
May 8th, 2005, 04:48 PM
Could some one give me or direct me to a simple interrupt list please? I'm looking for all the interrupts that directly control hardware such as keyboard, mouse and uh.......does there exist interrupts which directly control networks hardwares such as firewire port and even wireless LAN? I still only know the basics of assembly, still have a lot to learn.
NoHero
May 9th, 2005, 03:12 AM
Which system? Which CPU? And which mode? DOS/BIOS Interrupts? Port I/O?
Fatboy
May 9th, 2005, 06:00 AM
Sorry, 32-bit windows, intel 32 bit CPU's (anything compatible with 80386 through to Pentium Centrino I suppose), could you give me all the port I/O interrupts first please?
NoHero
May 9th, 2005, 06:48 AM
The problem is that Win32 does not allow you to write on ports. But to use limited interrupts. You should install a DOS in Bochs or something like that on programm on this. In DOS you have full access to everything.
Ralph Brown's Interrupt list:
http://www.ctyme.com/intr/int.htm
The IRQ's
http://www.osdever.net/tutorials/irqs.php?the_id=37
Fatboy
May 10th, 2005, 05:31 AM
Thanks man!
I would like to learn about interfacing NetBIOS. I've read quite a few introductions about what it is, what it does, and about its history. Some of them said this:
Calling the Net Bios is accomplished by building a Net Bios
Control Block (NCB), and execute an INT 5Ch with registers ES:BX
containing the address of the NCB. When control is returned,
only AX is changed.
The question is, how do I build an NCB?
Fatboy
May 10th, 2005, 05:34 AM
Oh! And I don't quite understand this table:
NoHero
May 10th, 2005, 11:29 AM
This table is the best you can have... ;) .. It shows you how a NCB packet should look like!
Just pack into a C structure... Notice to archieve that the alignment of your compiler is set to 1! Old turbo C compilers do not have a alignment feature but the newer (gnu, msvc) do.
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
typedef struct tag_NCB_PACKET
{
BYTE Command;
BYTE RetCode;
BYTE LSN;
BYTE Num;
DWORD BufAdr;
WORD BufLen;
BYTE CallName[16];
BYTE Name[16];
BYTE RTO;
BYTE STO;
DWORD Post;
BYTE LANA_Num;
BYTE CMD_Done;
BYTE Reserved[14];
} NCB_PACKET;
typedef FAR *NCB_PACKET LP_NCB_PACKET;
typedef const FAR * NCB_PACKET LPC_NCB_PACKET;
Fatboy
May 10th, 2005, 12:54 PM
Yeah cool! Thank you!
One of the tutorials I read ages ago showed me how to draw graphics with and without using interrupts. I've learnt a lot from it and can do it myself now. The one thing I don't like about that tutorial is that it concentrates too much on what I'm supposed to do technically, but way too little on the theory behind it all. It said that, to draw without interrupts, point ES register to A000h and DI register to the offset of the pixel. My question is, how did the author of that tutorial know that ES has to be pointed to A000h for VGA of that mode? Is there a list of what ES should be pointed to for a range of hardware e.g. graphics, network, human interface, etc.?
NoHero
May 10th, 2005, 01:07 PM
Yeah cool! Thank you!
One of the tutorials I read ages ago showed me how to draw graphics with and without using interrupts. I've learnt a lot from it and can do it myself now. The one thing I don't like about that tutorial is that it concentrates too much on what I'm supposed to do technically, but way too little on the theory behind it all. It said that, to draw without interrupts, point ES register to A000h and DI register to the offset of the pixel. My question is, how did the author of that tutorial know that ES has to be pointed to A000h for VGA of that mode? Is there a list of what ES should be pointed to for a range of hardware e.g. graphics, network, human interface, etc.?
Exactly this stuff has been normed by IBM and Intel several years ago. The norm (which you can view by downloading Intel's Programming Reference to 386) tells which memory resources are reserved for which uses. for example 0x8C00h supposed to be the default memory for characteroutput on memory for non-monochrome displays.
Fatboy
May 11th, 2005, 04:03 AM
I can't seem to be able to find the norm.....maybe I'm not searching with the right keywords.....could you give me a direction?
Fatboy
May 11th, 2005, 05:42 AM
And another thing, my masm doesn't seem to be able to handle 32-bit stuff. Whenever I use 32-bit registers, masm32 gives an error saying:
Intruction or register not allowed in current processor mode.
Something like that. That error was given in the compilation stage, why?
Fatboy
May 11th, 2005, 05:51 AM
sorry, the exact error was this:
error A2085: instruction or register not accepted in current CPU mode.
Fatboy
May 11th, 2005, 06:01 AM
Sorry, ignore my last post, I solved it by putting .386 before my code.
Still can't find the norm though...
Fatboy
May 11th, 2005, 06:06 AM
When I go into control panel and check out my hardware for example my graphics adapter, I can see, under its resources, its I/O range and memory range, what are they? Are they useful to me if I want to control the hardware in assembly? How do I make sense of them?
NoHero
May 11th, 2005, 09:27 AM
Yes, both are address namespaces when accessing a device in DMA mode. More important is the IRQ number of the hardware...
I have included the resource and norm from Intel... (http://www.freepgs.com/bboard/data/flo/386INTEL.TXT)
darwen
May 11th, 2005, 05:13 PM
You should be putting .486 at the top of MASM files. I always do.
Darwen.
NoHero
May 12th, 2005, 01:41 PM
Not when you plan to design a 16bit Operating System. And you won't use MASM when do low level stuff such as interrupt handling etc. You better go for nasm or fasm (flat assembler).
Fatboy
May 27th, 2005, 05:08 PM
In the resources tab of my graphics card's properties, I'm given the following information:
Memory range: D0000000 - D7FFFFFF
I/O range: C800 - C8FF
Memory range: FFCF0000 - FFCFFFFF
IRQ: 11
I/O range: 03B0 - 03BB
I/O range: 03C0 - 03DF
Memory range: 000A0000 - 000BFFFF
Could you give me a brief explanation of what they are and how I can use them to interface with the hardware in assembly? Thank you.
NoHero
May 28th, 2005, 09:53 AM
Memory range: D0000000 - D7FFFFFF
This is the primary range of the video memory. Mainly used to display extended graphics over 640x480.
I/O range: C800 - C8FF
This is the port addresses to use when using assembler out instruction and in instructrion.
Memory range: FFCF0000 - FFCFFFFF
This may be an extended memory buffer maybe for some 3d stuff but I do not know exactly maybe you should contact your manufactorer for more information and white papers.
IRQ: 11
This is the Interrupt Request handle where the data of this hardware comes in. As you can see in my previous post the IRQ list you can see that this line (11) is primarly mapped to interrupt 0x73. But you can also remap it.
I/O range: 03B0 - 03BB
I/O range: 03C0 - 03DF
Memory range: 000A0000 - 000BFFFF
Since those are in low memory I guess these are the address of the text video memory. Used in every terminal application, and for graphic support under and for 640x480. And the port addresses of this one, also for uses of "out" and "in" instructions.
Fatboy
May 28th, 2005, 01:21 PM
Thank you very much.
NoHero
May 29th, 2005, 04:46 AM
Thank you very much.
You are welcome!
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.