/programs/system/cpuid/trunk/MOS_UZEL.INC |
---|
File deleted |
\ No newline at end of file |
/programs/system/cpuid/trunk/CPUID.ASM |
---|
28,22 → 28,15 |
dd 0x0 |
dd 0x0 |
macro udata |
{ |
} |
include '..\..\..\macros.inc' ; useful macroses |
include 'draw.inc' |
include 'brand.inc' ;Brand ID decoding |
include 'caches.inc' ;(L1 and L2 cashes decoding for Intel) |
include 'multipli.inc' ;(multiplier decoding) |
include 'features.inc' ;(features decoding) |
include 'mos_uzel.inc' |
; useful macroses and Brand ID decoding |
include 'caches.inc' |
;(L1 and L2 cashes decoding for Intel) |
include 'multipli.inc' |
;(multiplier decoding) |
include 'features.inc' |
;(features decoding) |
include 'gif2img.inc' ;macros to convert gif to img |
include 'gif2img.inc' |
; include macros to convert gif to img |
include 'rsatest.inc' |
include 'variable.inc' |
55,7 → 48,7 |
; CPU speed |
mov eax, 18 |
mov ebx,5 |
int 0x40 |
mcall |
mov [total1],eax ;in Hz, example 1600490000 |
xor edx,edx |
mov ebx,1000000 |
464,7 → 457,7 |
mov esi, amd |
call load_gif |
PutImage 125,107,201,49,img_area+8 |
PutImage 135,97,201,49,img_area+8 |
; place size |
; Relax, man. AMD made PRETTY SIMPLE cache detection routine |
1065,7 → 1058,7 |
; mov ecx,dword 0x00000000 |
; mov edx,PF0c |
; mov esi,PF0clen-PF0c |
; int 0x40 |
; mcall |
;jmp MMXtest |
;.ppF1: |
Text 110,70,0x00000000,PF0, PF0len-PF0 |
1580,7 → 1573,7 |
mov eax, 18 |
mov ebx, 16 |
int 0x40 |
mcall |
shr eax, 10 |
1588,7 → 1581,7 |
mov eax, 18 |
mov ebx, 17 |
int 0x40 |
mcall |
shr eax, 10 |
1603,12 → 1596,10 |
;============================== |
mov ebx,50 ; æäåìñ 1 ñåê |
mov eax,23 ; ôóíêöèÿ 23: îæèäàíèå ñîáûòèÿ |
int 0x40 |
mov ebx,50 ; æäåìñ 0.5 ñåê |
mcall |
; mov eax,10 |
; int 0x40 ; |
cmp eax,1 ; |
je red ; redraw |
cmp eax,2 ; |
1618,11 → 1609,11 |
jmp still ; |
key: ; |
mov eax,2 ; |
int 0x40 ; |
mcall ; |
jmp still ; |
button: ; |
mov eax,17 ; |
int 0x40 ; |
mcall ; |
cmp ah,1 ; = 1 ? |
je close ; close |
1681,7 → 1672,7 |
close: |
mov eax,-1 |
int 0x40 |
mcall |
;**************************** THREAD-SECOND WINDOW |
thread_start: |
1700,12 → 1691,12 |
;length of module - 256 bit |
mov eax,26 |
mov ebx,9 |
int 0x40 |
mcall |
add eax,100 ;test lasts 1 second. |
push eax |
.loop: |
mov ecx,4 ;do 4 iterations |
push ecx ;this reduces number of calls int 0x40. |
push ecx ;this reduces number of calls mcall. |
.loop1: |
call rsa_test ;this procedure change all registers |
dec dword [esp] |
1713,7 → 1704,7 |
pop ecx |
mov eax,26 |
mov ebx,9 |
int 0x40 |
mcall |
cmp eax,dword [esp] ;Is time changed? |
jl .loop |
pop eax |
1733,7 → 1724,7 |
still_2: |
mov eax,10 |
int 0x40 |
mcall |
cmp eax,1 |
je window_2 ; window_2 |
1746,12 → 1737,12 |
key_2: ; |
mov eax,2 ; 2 |
int 0x40 ; |
mcall ; |
jmp still_2 ; |
button_2: ; |
mov eax,17 ; 17 |
int 0x40 ; |
mcall ; |
cmp ah,1 ; = 1 ? |
jne noclose_2 ; noclose |
1759,7 → 1750,7 |
mov [num_win2],0 ; |
or eax,-1 ; |
int 0x40 |
mcall |
noclose_2: |
1768,7 → 1759,7 |
draw_window_2: |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1h ; 1, start of draw |
int 0x40 |
mcall |
Window 250,250,420,390, 0x33FFFFFF, 0x805080d0, standard |
1874,7 → 1865,7 |
mov eax,12 |
mov ebx,2h |
int 0x40 |
mcall |
ret |
1885,9 → 1876,9 |
draw_window: |
mov eax,12 |
mov ebx,1h |
int 0x40 |
mcall |
Window 150,150,350,385, 0x33FFFFFF, 0x805080d0, header |
Window 150,150,350,385, 0x33FFFFFF, 0x805080d0, title |
; place size |
Button 15,330,92,23,2,0x03FFFFFF ; button "press for more" |
1901,7 → 1892,7 |
mov eax,12 |
mov ebx,2h |
int 0x40 |
mcall |
Text 130,270,0x00000000,instruct, instructlen-instruct |
1987,7 → 1978,7 |
; DATA AREA |
header db 'CPUID 2.19 by S.Kuzmin & the KolibriOS team',0 |
title db 'CPUID 2.2 by S.Kuzmin & the KolibriOS team',0 |
tsum: |
db 'Frequency: . MHz' |
2512,7 → 2503,7 |
mynamelen: |
align 4 |
udata |
thread2_stack_area rb 64 |
thread2_esp = $ |
U_END: |
/programs/system/cpuid/trunk/amd.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/system/cpuid/trunk/brand.inc |
---|
0,0 → 1,278 |
;////////////////////////////////////////////// |
;Decoding Brand ID for Intel |
decodebrand: |
cmp dword[smallvendor], 'cAMD' |
jz amd_br |
cmp dword[smallvendor], 'ntel' |
jz intel_br |
jmp Bi00 ; if not AMD or Intel |
amd_br: ;;;;;;;;;;;;;;;;;;;;; amd brand |
xor eax,eax |
inc eax |
cpuid |
cnnn0: |
cmp bl, 00h |
ja rr |
je cnnn1 |
rr: |
mov byte [brand], bl ; |
Text 60,250,0x00000000,abrand00, abrand00len-abrand00 |
jmp B000 |
;jmp comppp |
cnnn1: |
mov eax, 0x80000001 ; CPUID ext. function 0x80000001 |
cpuid |
cmp ebx, 0 |
je Bi00 |
mov word [brand], bx ; |
comppp: |
cmp [brand], 400h |
jl res1 |
cmp [brand], 500h |
jl res2 |
jae res3 |
res1: |
Text 60,250,0x00000000,abrand0, abrand0len-abrand0 |
jmp B000 |
res2: |
Text 60,250,0x00000000,abrand1, abrand1len-abrand1 |
jmp B000 |
res3: |
Text 60,250,0x00000000,abrand2, abrand2len-abrand2 |
jmp B000 |
;;;;;;;;;;;;;;;;;;;;; intel brand |
intel_br: |
xor eax,eax |
inc eax |
cpuid |
cmp0: |
cmp bl, 00h |
je Bi00 |
cmp1: |
cmp bl, 01h |
je Bi01 |
cmp2: |
cmp bl, 02h |
je Bi02 |
cmp3: |
cmp bl, 03h |
je Bi03 |
cmp4: |
cmp bl, 04h |
je Bi04 |
cmp6: |
cmp bl, 06h |
je Bi06 |
cmp7: |
cmp bl, 07h |
je Bi07 |
cmp8: |
cmp bl, 08h |
je Bi08 |
cmp9: |
cmp bl, 09h |
je Bi09 |
cmpA: |
cmp bl, 0Ah |
je Bi0A |
cmpB: |
cmp bl, 0Bh |
je Bi0B |
cmpC: |
cmp bl, 0Ch |
je Bi0C |
cmpE: |
cmp bl, 0Eh |
je Bi0E |
cmpF: |
cmp bl, 0Fh |
je Bi0F |
cmp11: |
cmp bl, 11h |
je Bi11 |
cmp12: |
cmp bl, 12h |
je Bi12 |
cmp13: |
cmp bl, 13h |
je Bi13 |
cmp14: |
cmp bl, 14h |
je Bi14 |
cmp15: |
cmp bl, 15h |
je Bi15 |
cmp16: |
cmp bl, 16h |
je Bi16 |
cmp17: |
cmp bl, 17h |
je Bi17 |
jne Bi00 |
;------------------ |
Bi00: |
mov byte [brand], bl ;00h |
Text 60,250,0x00000000,brand0, brand0len-brand0 |
;Number 270,180,1*256,2,dword [brand],0x000000 was in v. 1.11 |
jmp B000 |
Bi01: |
mov [brand], 01h |
Text 60,250,0x00000000,brand01, brand01len-brand01 |
jmp B000 |
Bi02: |
mov [brand], 02h |
Text 60,250,0x00000000,brand02, brand02len-brand02 |
jmp B000 |
Bi03: |
mov [brand], 03h |
cmp [m], 8 |
je E3 |
Text 60,250,0x00000000,brand03, brand03len-brand03 |
jmp B000 |
E3: |
Text 60,250,0x00000000,brand03d, brand03dlen-brand03d |
jmp B000 |
Bi04: |
mov [brand], 04h |
Text 60,250,0x00000000,brand04, brand04len-brand04 |
jmp B000 |
Bi06: |
mov [brand], 06h |
Text 60,250,0x00000000,brand06, brand06len-brand06 |
jmp B000 |
Bi07: |
mov [brand], 07h |
Text 60,250,0x00000000,brand07, brand07len-brand07 |
jmp B000 |
Bi08: |
mov [brand], 08h |
Text 60,250,0x00000000,brand08, brand08len-brand08 |
jmp B000 |
Bi09: |
mov [brand], 09h |
Text 60,250,0x00000000,brand09, brand09len-brand09 |
jmp B000 |
Bi0A: |
mov [brand], 0Ah |
Text 60,250,0x00000000,brand0A, brand0Alen-brand0A |
jmp B000 |
Bi0B: |
mov [brand], 0Bh |
cmp [m], 13 |
jl Eb |
Text 60,250,0x00000000,brand0B, brand0Blen-brand0B |
jmp B000 |
Eb: |
Text 60,250,0x00000000,brand0Bd, brand0Bdlen-brand0Bd |
jmp B000 |
Bi0C: |
mov [brand], 0Ch |
Text 60,250,0x00000000,brand0C, brand0Clen-brand0C |
jmp B000 |
Bi0E: |
mov [brand], 0Eh |
cmp [m], 13 |
jl Ed |
Text 60,250,0x00000000,brand0E, brand0Elen-brand0E |
jmp B000 |
Ed: |
Text 60,250,0x00000000,brand0Ed, brand0Edlen-brand0Ed |
jmp B000 |
Bi0F: |
mov [brand], 0Fh |
Text 60,250,0x00000000,brand0F, brand0Flen-brand0F |
jmp B000 |
Bi11: |
mov [brand], 11h |
Text 60,250,0x00000000,brand11, brand11len-brand11 |
jmp B000 |
Bi12: |
mov [brand], 12h |
Text 60,250,0x00000000,brand12, brand12len-brand12 |
jmp B000 |
Bi13: |
mov [brand], 13h |
Text 60,250,0x00000000,brand13, brand13len-brand13 |
jmp B000 |
Bi14: |
mov [brand], 14h |
Text 60,250,0x00000000,brand14, brand14len-brand14 |
jmp B000 |
Bi15: |
mov [brand], 15h |
Text 60,250,0x00000000,brand15, brand15len-brand15 |
jmp B000 |
Bi16: |
mov [brand], 16h |
Text 60,250,0x00000000,brand16, brand16len-brand16 |
jmp B000 |
Bi17: |
mov [brand], 17h |
Text 60,250,0x00000000,brand17, brand17len-brand17 |
jmp B000 |
B000: |
ret |
/programs/system/cpuid/trunk/cyrix.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/system/cpuid/trunk/draw.inc |
---|
0,0 → 1,96 |
; Interface |
macro Window xStart,yStart,xSize,ySize,bColor,gColor,fColor |
{ |
mov ebx,xStart |
shl ebx,16 |
add ebx,xSize |
mov ecx,yStart |
shl ecx,16 |
add ecx,ySize |
mov edx,bColor |
mov esi,gColor |
mov edi,fColor |
xor eax,eax |
mcall |
} |
;WriteTextToWindow |
macro Text xStart,yStart,rgbColor,pText,nTextLen |
{ |
mov ebx,xStart |
shl ebx,16 |
add ebx,yStart |
mov ecx,rgbColor |
mov edx,pText |
mov esi,nTextLen |
mov eax,4 |
mcall |
} |
;DisplayNumber |
macro Number xStart,yStart,nPrintType,noOfDigits,Data,rgbColor |
{ |
mov edx,xStart |
shl edx,16 |
add edx,yStart |
mov ebx,noOfDigits |
shl ebx,16 |
or ebx,nPrintType |
mov ecx,Data |
mov esi,rgbColor |
mov eax,47 |
mcall |
} |
macro DrawLine xStart,xEnd,yStart,yEnd,rgbColor |
{ |
mov ebx,xStart |
shl ebx,16 |
add ebx,xEnd |
mov ecx,yStart |
shl ecx,16 |
add ecx, yEnd |
mov edx,rgbColor |
mov eax,38 |
mcall |
} |
macro PutImage xPos,yPos,xImage,yImage,pImage |
{ |
mov ecx,xImage |
shl ecx,16 |
add ecx, yImage |
mov edx,xPos |
shl edx,16 |
add edx,yPos |
mov ebx,pImage |
mov eax,7 |
mcall |
} |
macro Button xStart,yStart,xSize,ySize,nID,rgbColor |
{ |
mov ebx,xStart |
shl ebx,16 |
add ebx,xSize |
mov ecx,yStart |
shl ecx,16 |
add ecx,ySize |
mov edx,nID |
mov esi,rgbColor |
mov eax,8 |
mcall |
} |
macro CreateTread EntryPoint,StackPos |
{ |
xor ebx,ebx |
inc ebx |
mov ecx,EntryPoint |
mov edx,StackPos |
mov eax,51 |
mcall |
} |
/programs/system/cpuid/trunk/idt.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/system/cpuid/trunk/multipli.inc |
---|
130,7 → 130,7 |
mov eax, 68 ; AMD-K6 (p.30) |
mov ebx, 3 |
mov edx, 0x0C0000087 |
int 0x40 ; eax - low dword |
mcall ; eax - low dword |
and eax, 111b |
mov cl, [athloncoef3 + eax] |
cmp eax, 6 |
152,7 → 152,7 |
@@: mov eax, 68 ; Athlon/AthlonXP |
mov ebx, 3 |
mov edx, 0x0C0010015 |
int 0x40 |
mcall |
mov ebx, eax |
shr ebx, 24 |
and ebx, 0x0F |
165,7 → 165,7 |
AMDK7M: mov eax, 68 ; AthonXP-M |
mov ebx, 3 |
mov edx, 0xC0010042 |
int 0x40 |
mcall |
and eax, 0x1F |
mov cl, [athlonmcoef + eax] |
ret |
180,7 → 180,7 |
mov eax, 68 ; Athon64 |
mov ebx, 3 |
mov edx, 0xC0010015 |
int 0x40 |
mcall |
shr eax, 24 |
and al, 0x3F |
shr al, 1 |
193,7 → 193,7 |
AMDK8M: mov eax, 68 ; Athon64-M |
mov ebx, 3 |
mov edx, 0xC0010042 |
int 0x40 |
mcall |
and al, 0x3F |
shr al, 1 |
add al, 4 |
211,7 → 211,7 |
mov eax, 68 ; Pentium M |
mov ebx, 3 |
mov edx, 0x2A |
int 0x40 |
mcall |
shr eax, 22 |
and eax, 0x1F |
mov dl, 10 |
223,7 → 223,7 |
mov eax, 68 ; Pentium 4 / Xeon (model < 2) Willamete |
mov ebx, 3 |
mov edx, 0x2A |
int 0x40 |
mcall |
shr eax, 8 |
and eax, 0x0F |
mov cl, [p4coef + eax] |
231,7 → 231,7 |
@@: mov eax, 68 ; Pentium 4 / Xeon (model >= 2) NorthWood |
mov ebx, 3 |
mov edx, 0x2C |
int 0x40 |
mcall |
shr eax, 24 |
and eax, 0x1F |
mov dl, 10 |
244,7 → 244,7 |
mov eax, 68 ; Pentium Pro / Pentium II / Pentium III |
mov ebx, 3 |
mov edx, 0x2A |
int 0x40 |
mcall |
shr eax, 22 |
test al, 0x20 |
jz @f |
/programs/system/cpuid/trunk/rsatest.inc |
---|
596,12 → 596,9 |
;p=1042128803351525332193283695592003066548124262686459610611886292768993621049491 |
;q=1273712981880077616387281148672409277231717442781838063285512054053473668300963 |
;n=1327372985619988354987062708438042005329282516404896732667039640816200186465366322016844458439816997285872910403676793109807015096535910981266920474905959833 |
macro udata |
{ |
udata |
num1 rd 40 |
num2 rd 40 |
num3 rd 40 |
iter rd 1 |
openkey rd 1 |
} |
openkey rd 1 |
/programs/system/cpuid/trunk/via.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |