well [of Sydney Linux Users Group] wrote: > Hello everyone > > I am not familiar with low level programming, > I find some driver function's pointer argument is called far pointer, > and others is called near pointer. > I just know this is about different memory section form web
I presume this is on x86 arch? There is a lot of history on intel's x86 arch. They made some interesting (yet disturbing) design decisions in order to maintain upward compatability. On "legacy" CPU's, memory is usually addressed as an absolute address. ie. Memory is addressed as a fully qualified address, from base zero. Intel's first x86 [8086] processor had a 20-bit address bus and 16-bit general purpose registers. Addressing memory within a 16 bit address space [64K], you need only specify an offset. This is what normally happens when you create a pointer to some memory (a near pointer). To address anything outside of this 16-bit address space, you need to specify a base pointer + an offset [segment:offset]. This is your far pointer. Hope this makes ;-) Cheers, Grant -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
