8)Hi,
   I used to develop 8051 like embeded processor firmware yet a newbie to 8x86 system programming ,
You see that for those 8051 like MCU, generally there is a special functionregister(SFR) map and memory map such as...
0x80-0xff  RAM(Indirect AddressingOnly)
0x30-0x7f  Byte direct and indirect accessble ram
0x20-0x2F Bit Addressable ram
0x00-0x1f R0-R7

SP 's adr. is 0x80,
IE's adr is 0x8F,
...
etc

so, for 8x86 architecture processor,where can I get the information/documents about the Memory Info(map),and register map
(I does find many ,those most only tell you : mov al, 01h, but where is AL, AH in the processor?)

Txs & BGS!

Posted on 2005-10-03 13:00:10 by Luckrock

somebody?
anybody?
Posted on 2005-10-03 13:37:43 by Luckrock
Well,
I very much doubt that the 80C51 microcontroller is 32bits or that it can run Windows 98, 2000 or Windows XP
So even if there are some minor similarities since both chips are made by Intel (or 8051 used to be)... they are completly diferent leagues...

To quickly answer your questions:

You can get Pentium IV specifications and datasheets from Intel site... You will find all the info you need in there...
The registers are inside CPU -- but not exactly at a specific address, they just are :D--  Yeah technically speaking you could say that they are located at some address inside CPU but it is not your concern and things are not that simple or non evolved in big CPU's as it is in small cheap microcontrolers. You just use registers by their names and not by their address... simple.

For windows user mode applications a "memory map" is kind of non-relevant --for a start-- since this is under the OS control and you have little up to none to say about it. Basically user mode application can use from 4M up to 2Gigabyte of RAM but only if they ask nicely from the OS. The upper 2G up to 4G is reserved for the OS usage (kernel drivers etc). The area between 0 and 4M is kind of blured since it can contain non writeable BIOS and low memory data mapped as read only in the address space of the current application -->so the OS might throw in an exception if you atempt to write there... and to read is mostly useless also.

The Stack is pointed by the ESP (stack pointer) regiser and it is located in RAM memory not inside CPU or a "bank"
You do not deal with hardware or interupts... the OS deals with this... you just code applications :P

Windows uses a flat memory layout with paging. This means that basically each application is tricked to belive it runs at the exact same location while the OS keeps track of their real physical location an theoretically you can acess the whole 0...4G memory range. Normally applications do not care about this. They just ask for some memory via an API call and receive a pointer as a result. The application uses that pointer without exceeding the requested size or elese the OS will terminate the offending application...


But this is all just for Windows... and BTW WIndows 2003 Server versions have a slightly diffrent memory map.

Besides other OSes thats still use Intel CPU's could have many other memory maps since this is not hardwired into the CPU...



Posted on 2005-10-03 14:12:45 by BogdanOntanu
Thanks for your kindly answer.
        Yes , I know that for Application Program ,we don't care how to allocate memory and manage them ,which is done by OS.
But,Now I want to write SYSTEM program ,which need to control Hardware ,Such as Speaker, Serial Port,Parall. Port,... Most will say those will call Windows API(ddk...), But I want to get a clear understand of what those I/O port or memory related work while perform those operations.
      Many Thanks ,Anyway.
        Best Regards.
Posted on 2005-10-03 22:29:56 by Luckrock
Do you want to do this under windows, or do you want to code your own (mini) OS?
Posted on 2005-10-03 22:33:42 by f0dder

so, for 8x86 architecture processor,where can I get the information/documents about the Memory Info(map),and register map
(I does find many ,those most only tell you : mov al, 01h, but where is AL, AH in the processor?)


AL, AH, and all the other registers are extrapolations of physical bit (x-bits wide) registers, the things that do the work in the real world with electrical logic.

As for the memory map, it has been covered in another post (http://www.asmcommunity.net/board/index.php?topic=15123.0), please utilize the forum search function.

With the rest, take f0dder's suggestion and get your hand on as many architecture manuals (free PDF files) as possible, and start reading.
Posted on 2005-10-03 23:24:38 by SpooK
The "special function registers" of the Pentium are not mapped into any "memory" space. There are special instructions for handling some of them, and others (such as EIP) are not directly accessible by name or address.

The major I/O devices (serial/parallel ports, USB, PS/2 mouse, PS/2 keyboard, video, hard/floppy/optical disk, etc.) are not defined by Intel or AMD. Some I/O have been defined by Microsoft and its partners, and some others are legacies from IBM. These are accessed via memory-mapped or port-mapped interfaces, not through SFRs. You will find most of the "standard" device and memory mappings in documents on PCs, not in documents on the "x86" processors.
Posted on 2005-10-04 00:53:47 by tenkey

But,Now I want to write SYSTEM program ,which need to control Hardware ,Such as Speaker, Serial Port,Parall. Port,... Most will say those will call Windows API(ddk...), But I want to get a clear understand of what those I/O port or memory related work while perform those operations.


IF you want to talk directly to the hardware you will need to learn Kernel mode drivers programming.
But honestly with you curent level of expertize it will be a suicide.

My honest advice is to learn to develop a few normal user mode application just to get a hold on the Windows API and Intel CPU ASM programming first.

Then you will need to learn about the device you want to program and this is NOT an easy task since they are different for each and every device out there... understanding hardware and bus interactions and then the interaction with the spcific OS architecture: aka Windows kernel mode operations and IRP's and virtualizations will be chalenging.

Aquote : "... the nice thing about human race standards it: there are so many standards to choose from on every issue"

There are a few kernel mode drivers tutorials available as links on this board IMHO...
Posted on 2005-10-04 01:19:50 by BogdanOntanu
Hi,all.
    Many many thanks for all of your kind advice and guidence for me ,a newbie to Win-Intel arichitechture system programming.You have given me the direction for next step...
    Also Truely sorry for my delay for reading these reply for my offline these days.
   
    I have written serveral WIN32 App. program with the Microsoft MFC ,or purely WIN32 API seraval years ago.Those mostly deal with "WM_COMMAND" message such WM_MouseMove, WM_LeftMouseKeyPressed ,and some GDI function added sometime.  This is mainly C/C++ code.  You don't even need to know how the message is produced.

    Now I turn to system development: make and program a MCU based(8051 like) board (which connect to PC via PCI,or USB, or Serial Port),write a Windows GUI Program to communicates with the Board,write the windows Driver for the board. I nearly finished  the first 2 parts /programming. While it's much more complex to communicate the board to PC than what I used to think ,which could be done in 2~3 months.

    I have to reading materials such <<IA-32 software programmer's reference manual >>,<<The Art Of Assembly >> ,etc. And also start to pratice the Kadasm Tutorial. Those are huge books and a timelasting and  paintful experience ,I think.

    In my first view , the instruction set  are almost same for the 80x86 and 8051 architecture and easy to be familar .But the Difficulty lies that Memory Model(Flat,segment,virtual ),while for 8051 like MCU, only SFR need to be cared .and Also I/O ports.Interrupt Routines...

    So,stop here.I need deeper WINTEL ARCH to understand.
 
  With My Best And Truely Regards.
                                                                              0ct.10th,2005
Posted on 2005-10-10 03:27:19 by Luckrock