Search found 8 matches

by Mohsen47
Tue Feb 18, 2014 7:32 pm
Forum: Assembler
Topic: Mtdbg and in out instructions.
Replies: 10
Views: 10432

Re: Mtdbg and in out instructions.

Thanks Mario_r4.
Actually I don't have all the source code on my computer but when I have it I will try what you said, really thanks a lot.
by Mohsen47
Tue Feb 18, 2014 5:22 pm
Forum: Assembler
Topic: Mtdbg and in out instructions.
Replies: 10
Views: 10432

Re: Mtdbg and in out instructions.

Thanks for your interest guys. This is my simple code: mov eax,46 mov ebx,0 mov ecx,0xcf8 mov edx,0xcfd int 0x40 cmp eax,1 je exit mov eax,0x80001800 ;get the vendor and device id for device number 3 in pci bus number 0 which is my network interface. mov dx,0xcf8 out dx,eax mov dx,0xcfc in dx,eax ex...
by Mohsen47
Tue Feb 18, 2014 11:38 am
Forum: Assembler
Topic: Mtdbg and in out instructions.
Replies: 10
Views: 10432

Re: Mtdbg and in out instructions.

art_zh Thanks for the tip it worked well, but there is a little problem I tried to reserve the io port range for pci from 0xcf8 to 0xcfc and I was able to write a double word to pci config register but when I try to read a double word from pci data register I get the same exception, I am only able ...
by Mohsen47
Tue Feb 18, 2014 9:23 am
Forum: Assembler
Topic: Mtdbg and in out instructions.
Replies: 10
Views: 10432

Re: Mtdbg and in out instructions.

This means I cannot debug my code if it contains these instructions?There is no way to do that?
by Mohsen47
Mon Feb 17, 2014 8:02 pm
Forum: Assembler
Topic: Mtdbg and in out instructions.
Replies: 10
Views: 10432

Mtdbg and in out instructions.

If my program contains in out instructions and I want debug it using kolibri debugger Mtdbg, I get ??? at memory locations where I have thses instructions and when exection reaches these instructions I get this message Debugged Program Caused an exception 0D.Suspended. Why is this heppening? Could a...
by Mohsen47
Sat Feb 15, 2014 10:08 am
Forum: Assembler
Topic: understanding function calls in assembly files
Replies: 5
Views: 7432

Re: understanding function calls in assembly files

Should I search all the files in kernel directory to find this function? I searched in pci32.inc but nothing, my goal is to find the io base address and irq line of the rtl8029 network card so I can write my own driver, so please would you give me a hint on how can I find those functions so I can un...
by Mohsen47
Fri Feb 14, 2014 9:53 am
Forum: Assembler
Topic: understanding function calls in assembly files
Replies: 5
Views: 7432

Re: understanding function calls in assembly files

How are they imported into the file so they are used in it? format MS COFF defines the output format, it doesn't import them right? Also the syntax of imports.inc is hard to undertsand I cannot tell what is this file for, and I cannot find exports.inc in kernel code.
by Mohsen47
Thu Feb 13, 2014 10:57 pm
Forum: Assembler
Topic: understanding function calls in assembly files
Replies: 5
Views: 7432

understanding function calls in assembly files

Hi everyone, I am trying to understand the code in kolibriOS and how it works to help me write my own hobby OS but sometimes I encounter calls to functions that I can't understand or find the implementation of the function for example I was reading rtl8029.asm and I saw the call PCI_Find_IO I found ...