Re: Base Address's, etc...

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

 



On Wed, Apr 17, 2002 at 06:21:28AM -0400, Dan Erickson wrote:
> int x;
> x = 5;
> 
>         X is just a place in memory that we have named x for human
> readability purposes. Now x (the place in memory we have named x) holds 
> the value five. How does it accomplish this??

Consider the similar code:

register int x;
x = 5;

'5' is stored in the machine, but without a memory location.

My understanding of outb() and friends, is that the memory address (say)
0x243, is simply a register in an I/O controller that is accessed as if
it were a memory location. (i.e., exactly opposite the 'register int x'
scenario.)

Of course, I'm free to be wrong about how outb() works. :)

(Note that in your original 0000 0000 0100 0000 or whatever example ..
that is highly dependent upon how the CPU treats data. Google for big
endian and little endian, that ought to describe that separate problem
sufficiently..)

Cheers :)

-- 
http://sardonix.org/

Attachment: pgp00064.pgp
Description: PGP signature


[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