How to get information about the processor in biose FASM?

Hello to all fans!
I create a program to boot from USB drive via BIOS.
Found this
Example

proc GetCPUString lpBuff:DWORD, dFixString:DWORD
pusha

 ; A pointer to a string-receiver
 mov esi,[lpBuff]
 mov edi,esi
cld

 ; Read processor information
 mov eax,80000002h
@@:
 push eax
cpuid
stosd
 xchg eax,ebx
stosd
 xchg eax,ecx
stosd
 xchg eax,edx
stosd
 pop eax
 inc eax
 cmp eax,80000004h
 jbe @b

 ; Cast the string to ASCIIZ format
 xor eax,eax 
stosb

 ; Do I need to clean the string?
 cmp [dFixString],0
 je .loc_ret

 ; Clean line of unnecessary and incorrect characters
 mov edi,esi
@@:
 ; Remove leading spaces, if any
 cmp byte [esi],' '
 jne @f
 inc esi
 jmp @b
@@:
 xor ebx,ebx
.loc_clean_string:
lodsb

 cmp al,' '
 jnz @f

 ; Remove multiple spaces
 cmp bl,1
 je .loc_clean_string

 ; Set the flag that started the gaps
 mov bl,1
 jmp .loc_store_char
@@:
 ; Reset the flag spaces
 mov bl,0

 ; Convert the characters "(R)" one
 cmp al,'('
 jne @f
 cmp word [esi],'R)'
 jne @f

 ; ESI + 2
lodsw
 ; The Symbol (R)
 mov al,0AEh
 jmp .loc_store_char
@@:
 ; Convert the characters "(TM)" one
 cmp dword [esi-1],'(TM)'
 je @f
 ; The spelling may be different
 cmp dword [esi-1],'(tm)'
 jne .loc_store_char
@@:
 ; ESI + 3
lodsw
lodsb
 ; The symbol (TM)
 mov al,099h

.loc_store_char:
 ; Write the character in a string
stosb
 ; End of line reached?
 or al,al
 jnz .loc_clean_string

 ; To remove the final space if there is
 cmp byte [edi-1],' '
 jne .loc_ret
 mov byte [edi-1],0

.loc_ret:
popa
ret
endp



But he does not seem to FASM and without comment.
I beg cordially to adapt it to FASM specifically for the BIOS.
Please comment every line.
The kernel itself is ready, it is advisable to arrange the code in a function.
Here is what I have at the moment

;FASM###########################################################################################################################################################################
org 7c00h ;BIOS reads the first 512 bytes of the MBR into RAM at address 0x00007C00
 ;(0x07C0:0x0000 in real mode), then read the code control is transferred
;Point whoda###############################################################################################################################################################
start
 cli ;disallow interrupts
 xor ax,ax ;zero register Ah
 mov ds,ax ;custom data segment to a null address
 mov es,ax ;es is segment of custom zero address
 mov ss,ax ;stack segment custom to the zero address
 mov sp,07C00h ;segment sp points to current top of the stack
 sti ;allow interrupts

;Set ekrana###############################################################################################################################################################
 mov ax, 03h ;
 int 10h ;interrupt 10h
;Main programm#############################################################################################################################################################
 call user_print_title ;call function call
 mov ax, 1301h ;function 13h of interrupt 10h
 int 10h

 call user_print_author
 mov ax, 1301h ;function 13h of interrupt 10h
 int 10h

 call user_print_continue
 mov ax, 1301h ;function 13h of interrupt 10h
 int 10h

 call user_print_cpu_info
 mov ax, 1301h ;function 13h of interrupt 10h
 int 10h



 jmp $

;Phdprogramme###################################################################################################################################################################
user_print_cpu_info:
 ; pointer to string
 mov esi, cpu_info
 mov edi,esi
cld

 ; read processor information
 mov eax, 80000002h
 push eax
stosd
 xchg eax,ebx
stosd
 xchg eax,ecx
stosd
 xchg eax,edx
stosd
 pop eax
 inc eax
 cmp eax,80000004h

 ;print setup
 mov cx, 24 ;cx number of output symbols
 mov bx, 50h ;bx 0 the background color, 9 color text
 mov dx, 0100h ;dx the coordinates for where to insert the cursor y=00, x=00
 mov bp, cpu_info ;bp output line
ret

user_print_title:
 mov cx, 26 ;cx number of output symbols
 mov bx, 09h ;bx 0 the background color, 9 color text
 mov dx, 0019h ;dx the coordinates for where to insert the cursor y=00, x=00
 mov bp, title ;bp output line
ret
;*******************************************************************************************************************************************************************************
user_print_author:
 mov cx, 24 ;cx number of output symbols
 mov bx, 50h ;bx 0 the background color, 9 color text
 mov dx, 1738h ;dx the coordinates for where to insert the cursor y=00, x=00
 mov bp, author ;bp output line
ret
;*********************************************************************************************************************************************************************
user_print_continue:
 mov cx, 26 ;cx number of output symbols
 mov bx, 06h ;bx 0 the background color, 9 color text
 mov dx, 1700h ;dx the coordinates for where to insert the cursor y=00, x=00
 mov bp, continue ;bp output line
ret

title db '<<<Hardware information>>>', 0
author db 'Author: Aleksandr Lynnik', 0
continue db 'Press Enter to continue...', 0
cpu_info db 100, "$"

times(512-2-($-07C00h)) db 0 ;remnants of space to fill with zeros
db 055h,0AAh ;the signature, symbolizing the completion of the boot sector
April 19th 20 at 12:11
1 answer
April 19th 20 at 12:13
I create a program

"Developing", you are our Creator.

I beg cordially to adapt it to FASM specifically for the BIOS.
Please comment every line.

Why don't you do it yourself, and we honor and say whether you understood everything or where I messed up?
:-)Trying, thought to speed up the process.
Apparently I have the answer he will write. - chri commented on April 19th 20 at 12:16
And please tell me information about the video card so you get?
And yet to know which build of the Windows OS on the hard drive? - chri commented on April 19th 20 at 12:19
information about the video card so you get?

Using cpuid? No.

and to know which build of the Windows OS on the hard drive?

I suspect that it will have, at least, to learn to read from the partition in which it is installed. Start maybe with something easy? - christop_Schultz commented on April 19th 20 at 12:22
@christop_Schultz, )
Start maybe with something easy?

At the foot of the processor, the voltage to apply?)
Okay, do not want to help...
He will understand you I think this particular difficulty would not be.
Using cpuid? No.

Not using cpuid, and using FASM at a low level. - chri commented on April 19th 20 at 12:25
He will understand you I think this particular difficulty would not be.

To understand-not be made. But you want
I beg cordially to adapt it to FASM specifically for the BIOS.
Please comment every line.

And it looks like you want us for you lab did.

Not using cpuid, and using FASM at a low level.

@chri, in assembler you can write everything you can write in principle, how can there be questions? - christop_Schultz commented on April 19th 20 at 12:28
@christop_Schultz, Hello, Yes I understand)
By the way yesterday turned out to know the manufacturer) - chri commented on April 19th 20 at 12:31
Just a few years I studied Python and now realizing that for a week maybe a month
will not be able to grasp the essence very annoying, I understand that the assembler will have to learn from scratch(
He taught me how to comment code))))
Every line in detail
In Python I didn't have not one comment on 250 lines of code - chri commented on April 19th 20 at 12:34

Find more questions by tags Assembler