CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Other Programming > Assembly
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Assembly Questions and Answers for Assembly here!

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old February 23rd, 2005, 11:48 PM
    k.vamsi k.vamsi is offline
    Junior Member
     
    Join Date: Dec 2004
    Posts: 22
    k.vamsi is an unknown quantity at this point (<10)
    Read the Total System RAM

    Hi

    i am facing a problem like how to read system physical RAM size from the BIOS.
    can anyone please suggest me.

    regards

    vamsi.k
    Reply With Quote
      #2    
    Old February 24th, 2005, 05:52 AM
    japheth japheth is offline
    Junior Member
     
    Join Date: Dec 2002
    Location: Germany
    Posts: 7
    japheth is an unknown quantity at this point (<10)
    Re: Read the Total System RAM

    use

    int 15h, ax=e820h

    or (for older bioses):

    int 15h, ax=e801h

    for details see RBIL
    Reply With Quote
      #3    
    Old February 26th, 2005, 06:08 AM
    k.vamsi k.vamsi is offline
    Junior Member
     
    Join Date: Dec 2004
    Posts: 22
    k.vamsi is an unknown quantity at this point (<10)
    Post Re: Read the Total System RAM

    Hi

    ok fine but the problem is for 16 bit i got Total Memory Size using following program.

    outportbyte(0X70,0X15);
    MEMORYSIZE = inportbyte(0x71); //retrieve low byte
    outportbyte(0X70,0X16);
    MEMORYSIZE += inportbyte(0x71) << 8; //retrive high byte

    but problem is i want to read 32 bit Total ram size
    what is meaning of RBIL
    Reply With Quote
      #4    
    Old February 26th, 2005, 06:13 AM
    Hobson's Avatar
    Hobson Hobson is offline
    Senior Member
     
    Join Date: Dec 2004
    Location: Poland
    Posts: 1,163
    Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)
    Re: Read the Total System RAM

    'RBIL' stands for Ralph Brown's Intterupt List, great resource for all assembly programmers.

    For 32-bit Windows program use GlobalMemoryStatus or GlobalMemoryStatusEx API function

    Hob
    __________________
    B+!
    'There is no cat' - A. Einstein

    Use [code] [/code] tags!

    Did YOU share your photo with us at CG Members photo gallery ?
    Reply With Quote
      #5    
    Old February 26th, 2005, 06:54 AM
    japheth japheth is offline
    Junior Member
     
    Join Date: Dec 2002
    Location: Germany
    Posts: 7
    japheth is an unknown quantity at this point (<10)
    Re: Read the Total System RAM

    I attached an (old) source (MASM) showing how to use int 15, ax=e801h

    it wont compile since the includes are missing, but you may get the idea.
    Attached Files
    File Type: zip geti15ex.zip (552 Bytes, 152 views)
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Other Programming > Assembly


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 08:29 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009