macro number3 num,x,y
{
	mov eax,num
	call hextoascii
	mov ebx,[gs:topofbuffer]
	mov [txt3.x],x
	mov [txt3.y],y
	call txt3
}
;        org 100h
	org 7c00h
	mov ax,cs
	mov ds,ax
	mov ss,ax
	mov eax,1
	cpuid
	mov [cpuid?.1],eax
	mov [cpuid?.2],ebx
	mov [cpuid?.3],ecx
	mov [cpuid?.4],edx
	mov ax,0b800h
	mov es,ax
	mov ax,8000h
	mov gs,ax
	mov edi,10h
@@:
	mov dword[gs:edi*4],0
	dec edi
	jnl @b
	mov ebx,[cpuid?.1]
	number3 ebx,10,10
	mov ebx,[cpuid?.2]
	number3 ebx,10,11
	mov ebx,[cpuid?.3]
	number3 ebx,10,12
	mov ebx,[cpuid?.4]
	number3 ebx,10,13
@@:
	in al,60h
	cmp al,1
	jne @b
	ret
txt3:
	mov ecx,[.x]
.adapt:
	mov edi,[.y]
	shl edi,2
	add edi,[.y]
	shl edi,5
	add edi,[.x]
	add edi,[.x]
.load:
	mov al,[gs:ebx]
	cmp al,0
	je .fin
.pasdebleme:
	mov ah,71h
	mov [es:edi],ax
.ignore:
	inc [.x]
	add edi,2
	inc ebx
	jmp .load
.fin:
	ret
.x rd 1
.y rd 1
.maskb rb 1
hextoascii:
	mov esi,endofbuffer
	dec esi
	mov dl,[datatype]
	mov cx,8
.next:
	mov bl,al
	mov bh,bl
	and bl,0fh
	add bl,'0'
	cmp bl,'9'
	jle @f
	sub bl,'9'+1
	add bl,'A'
@@:
	mov [gs:esi],bl
	dec esi
	shr bh,4
	add bh,'0'
	cmp bh,'9'
	jle @f
	sub bh,'9'+1
	add bh,'A'
@@:
	mov [gs:esi],bh
	dec esi
	shr eax,8
	dec dl
	jne .next
	inc esi
	mov [gs:topofbuffer],esi
	ret
topofbuffer=0
buffer=4
endofbuffer=4+33
datatype db 4

cpuid?:
.1 dd 0
.2 dd 0
.3 dd 0
.4 dd 0
rb 510-($-$$)
dw 0aa55h
