Re: Base Address's, etc...(reply from Dan to David)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 17 Apr 2002, David Stroupe wrote:
> That is correct Dan.  Most times I do something like this:
> 
> #define CTRLREG 3
> #define ANOTHERREG 5
> 
> and then do
> 
> writeb(value, io + CTRLREG);
> writeb(anothervalue, io + ANOTHERREG);
> 
> HTH

	Ah ok, thx for clearing that up for me, at least addition of 
addresses worked the way I thought. What I am also confussed about is 
HOW this works.

For instance, 0x240 expands to 0000 0010 0100 0000 in binary 
(note... I have put the spaces in for readability purposes).

    Now... how does the computer store a "value" in this address space?

    Also.. as I said earlier, 0x240 expands to 0000 0010 0100 0000. 
So... if you say something like writeb(value, io + 3), then you are 
writing a value to 0000 0010 0100 0011 instead of the orginal 0x240, which 
is what you want to do... but highly confusses me on how it works.

Thanks alot

-Dan Erickson-
-ColdOneKnight@rogers.com

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux