flat assembler
Message board for the users of flat assembler.

Index > Windows > How get motherboard name and model ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1969
Roman 31 May 2025, 04:58
I want print model motherboard.
How do this ?
Using win api or cpuid ?

I tested cpuid not show motherboard info.
Post 31 May 2025, 04:58
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4249
Location: vpcmpistri
bitRAKE 31 May 2025, 18:31
Use the GetSystemFirmwareTable function and find the SMBIOS type two structure. Should be the same information returned by PowerShell:
Code:
Get-WmiObject Win32_BaseBoard | Format-List Product,Manufacturer,Version,SerialNumber    
... or, the baseboard information in msinfo.

There is a related example recently posted. It finds the CPU table (4) instead of the baseboard table (2). (Edit: Work continues on SMBIOS reader.)
Post 31 May 2025, 18:31
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1969
Roman 02 Jun 2025, 12:26
Thanks.
Post 02 Jun 2025, 12:26
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1969
Roman 02 Jun 2025, 12:28
My code:
Code:
macro Msg txt { invoke MessageBox,0,txt,0,0 }

         mov     eax,'RSMB'
         bswap   eax
         invoke  GetSystemFirmwareTable,eax,0,buff,4096 ;from kernel32.dll
         mov ebp,2
         mov edi,tmpBufr
         mov esi,buff+8
.1:      movzx   ebx,byte[esi+1]
         add esi,ebx
.2:      
         cinvoke  sprintf,edi,ptutx,esi
         add edi,eax
         lea esi,[esi+eax-1]
         ;add      esi,eax
         ;dec esi
         cmp     byte[esi],0
         jnz     .2
         inc     esi
         dec ebp
         test ebp,ebp
         jnz .1
         Msg tmpBufr
         invoke ExitProcess, 0

;data
ptutx db 10,' %s',0
               tmpBufr       rd      512
               buff          rd      512*4
    


Last edited by Roman on 03 Jun 2025, 10:22; edited 2 times in total
Post 02 Jun 2025, 12:28
View user's profile Send private message Reply with quote
Core i7



Joined: 14 Nov 2024
Posts: 111
Location: Socket on motherboard
Core i7 02 Jun 2025, 13:19
The name of the motherboard can also be read in the system registry:
HKLM\HARDWARE\DESCRIPTION\System\BIOS
Post 02 Jun 2025, 13:19
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.