Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 529 → Rev 532

/programs/demos/ss/trunk/build_en.bat
File deleted
\ No newline at end of file
/programs/demos/ss/trunk/build_ru.bat
File deleted
\ No newline at end of file
/programs/demos/ss/trunk/@SS.ASM
File deleted
\ No newline at end of file
/programs/games/chess/trunk/chess.bmp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/programs/games/chess/trunk/chess.asm
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/games/chess/trunk/build_en.bat
File deleted
\ No newline at end of file
/programs/games/chess/trunk/build_ru.bat
File deleted
\ No newline at end of file
/programs/media/jpegview/trunk/jpegview.asm
33,7 → 33,7
PARAMS = memsize - 1024
 
appname equ 'Jpegview '
version equ '0.15'
version equ '0.16'
 
use32
 
132,6 → 132,8
cmp [PARAMS+2], byte "L"
je boot_set_background
@@:
cmp byte [PARAMS], 1
jz ipc_service
mov edi, name_string ; clear string with file name
mov al, 0
mov ecx, 100
250,6 → 252,110
 
;******************************************************************************
 
ipc_service:
mcall 68, 11
mov esi, PARAMS+1
xor eax, eax
xor ecx, ecx
@@:
lodsb
test al, al
jz @f
lea ecx, [ecx*5]
lea ecx, [ecx*2+eax-'0']
jmp @b
@@:
add ecx, 16
mov edx, ecx
mcall 68, 12
test eax, eax
jnz @f
.exit:
mcall -1
@@:
mov ecx, eax
and dword [ecx], 0
mov dword [ecx+4], 8
mov [ipc_mem], ecx
mcall 60, 1
mcall 40, 1 shl 6
mcall 23, 500 ; wait up to 5 seconds for IPC message
test eax, eax
jz .exit
; we got message with JPEG data, now decode it
mov eax, [ecx+12]
mov [ipc_mem_size], eax
; init JPEG decoder
mov ecx,memsize-fin-stack_size ; size
mov edi,fin ; pointer
call add_mem ; mark memory from fin to 0x100000-1024 as free
call colorprecalc ; calculate colors
; hook file functions
mov ecx, 4
call malloc
and dword [edi], 0
lea eax, [edi-file_handler.position]
mov byte [read], 0xE9
mov dword [read+1], read_from_mem - (read+5)
; decode
call jpeg_info
mov dword [jpeg_st],ebp
test ebp,ebp
jz .end
 
mov eax, [ebp + x_size]
mul dword [ebp + y_size]
lea eax, [eax*3+8]
mov ecx, eax
mcall 68, 12
test eax, eax
jz .end
mov [ipc_mem_out], eax
mov ebx, [ebp + x_size]
mov [eax], ebx
mov ebx, [ebp + y_size]
mov [eax+4], ebx
 
mov dword [ebp+draw_ptr],put_chunk_to_mem
call jpeg_display
 
; IPC response
mov esi, [ebp + x_size]
imul esi, [ebp + y_size]
lea esi, [esi*3+8]
mov edx, [ipc_mem_out]
.response:
mov ecx, [ipc_mem]
mov ecx, [ecx+8]
mcall 60,2
 
jmp close_program ; close the program right now
 
.end:
mov esi, 8
mov edx, x_pointer ; points to 2 null dwords
jmp .response
 
read_from_mem:
; in: eax=handle, ecx=size, edi=pointer to buffer
; out: ecx=number of read bytes, buffer filled
pushad
mov esi, [ipc_mem]
add esi, 16
add esi, [eax+file_handler.position]
add ecx, [eax+file_handler.position]
cmp ecx, [ipc_mem_size]
jb @f
mov ecx, [ipc_mem_size]
@@:
sub ecx, [eax+file_handler.position]
add [eax+file_handler.position], ecx
rep movsb
popad
ret
 
;******************************************************************************
 
put_chunk_to_bgr:
pushad
 
285,8 → 391,34
 
;******************************************************************************
 
put_chunk_to_mem:
; in: (eax,ebx) = start coordinates of chunk
; (ecx,edx) = sizes of chunk
; edi -> chunk data
push esi edi edx
mov esi, edi
mov edi, ebx
imul edi, [ebp + x_size]
add edi, eax
lea edi, [edi*3+8]
add edi, [ipc_mem_out]
@@:
push ecx edi
lea ecx, [ecx*3]
rep movsb
pop edi ecx
add edi, [ebp + x_size]
add edi, [ebp + x_size]
add edi, [ebp + x_size]
dec edx
jnz @b
pop edx edi esi
ret
 
;******************************************************************************
 
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
597,8 → 729,11
dd -(iniciomemoria+4),-(iniciomemoria+4),(iniciomemoria+4),.l1,0
.l1 dd 0
 
fin:
I_END:
sc system_colors
ipc_mem dd ?
ipc_mem_size dd ?
ipc_mem_out dd ?
fileattr: rb 40
dirinfo: rb 32+304
fin:
/programs/media/mixer/trunk/mixer.asm
59,15 → 59,7
 
cmp ah,101
jnz nochange
mov al,byte [usecard]
cld
inc al
and al,3
cmp al,0
jnz nozer
mov al,1
nozer:
mov byte [usecard],al
xor byte [usecard], 3 ; 1 <-> 2
 
call drawusedcard
 
74,28 → 66,13
nochange:
 
cmp byte [usecard],byte 1
jz usesb16
jnz usesb16II
 
cmp byte [usecard],byte 2
jnz nousesb16II
jmp usesb16II
nousesb16II:
 
cmp byte [usecard],byte 3
jnz nousewss
jmp usewss
nousewss:
 
 
 
; SOUND BLASTER 16
 
 
usesb16:
 
 
cld
 
mov al,20
cmp ah,al
jge nomain
235,85 → 212,6
 
 
 
 
 
 
 
 
 
; WINDOWS SOUND SYSTEM
 
usewss:
 
cld
 
mov al,20
cmp ah,al
jge wnomain
 
mov ecx,255
cmp ah,12
jnz wnomain12
mov ecx,200
wnomain12:
cmp ah,13
jnz wnomain13
mov ecx,150
wnomain13:
cmp ah,14
jnz wnomain14
mov ecx,70
wnomain14:
cmp ah,15
jnz wnomain15
mov ecx,0
wnomain15:
 
mov eax,27
mov ebx,1
mcall
 
jmp still
 
wnomain:
 
mov al,30
cmp ah,al
jge wnocd
 
mov ecx,255
 
cmp ah,22
jnz wnocd12
mov ecx,200
wnocd12:
cmp ah,23
jnz wnocd13
mov ecx,150
wnocd13:
cmp ah,24
jnz wnocd14
mov ecx,70
wnocd14:
cmp ah,25
jnz wnocd15
mov ecx,0
wnocd15:
 
mov eax,27
mov ebx,2
mcall
 
jmp still
 
wnocd:
 
 
jmp still
 
 
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
335,38 → 233,31
 
 
mov edx,16 ; button id
mov ebx,10*65536
mov ebx,10*65536+22
 
newbut:
 
push edx
push ebx
 
mov esi,[bcolor]
 
mov eax,8 ; function 8 : define and draw button
mov bx,22 ; [x start] *65536 + [x size]
mov ecx,35*65536+8 ; [y start] *65536 + [y size]
dec edx
mcall
mov bx,22 ; [x start] *65536 + [x size]
mov ecx,45*65536+8 ; [y start] *65536 + [y size]
dec edx
mcall
mov bx,22 ; [x start] *65536 + [x size]
mov ecx,55*65536+8 ; [y start] *65536 + [y size]
dec edx
mcall
mov bx,22 ; [x start] *65536 + [x size]
mov ecx,65*65536+8 ; [y start] *65536 + [y size]
dec edx
mcall
mov bx,22 ; [x start] *65536 + [x size]
mov ecx,75*65536+8 ; [y start] *65536 + [y size]
dec edx
mcall
 
pop ebx
pop edx
 
add ebx,30*65536
373,13 → 264,9
add edx,10
 
cmp edx,16+6*10
jz butdone
jnz newbut
 
jmp newbut
 
butdone:
 
 
mov eax,4 ; function 4 : write text to window
mov ebx,10*65536+104 ; [x start] *65536 + [y start]
mov ecx,0x00ffffff ; color of text RRGGBB
413,21 → 300,12
mov edx,[bcolor]
mcall
 
mov eax,[usecard]
mov edx,c3
mov edx,c1
 
cmp al,1
jnz nosbc
mov edx,c1
nosbc:
cmp al,2
cmp [usecard],2
jnz nosbcII
mov edx,c2
nosbcII:
cmp al,3
jnz nowssc
mov edx,c3
nowssc:
 
mov eax,4
mov ebx,14*65536+123
453,14 → 331,10
 
c1 db 'SOUND BLASTER 16 - MIXER I '
c2 db 'SOUND BLASTER 16 - MIXER II '
c3 db 'WINDOWS SOUND SYSTEM '
 
 
usecard dd 0x1
usecard db 0x1
 
title db 'MIXER',0
 
I_END:
 
 
 
/programs/media/pic4/trunk/pic4.asm
13,6 → 13,7
 
include 'lang.inc'
include '..\..\..\macros.inc'
purge mov ; decrease kpack'ed size
 
START:
mov eax,48
21,7 → 22,9
mov edx,sizeof.system_colors
mcall
 
call check_parameters
cmp dword [I_Param], 'BOOT'
jz OnBoot
 
call draw_window
 
call load_texture
53,51 → 56,41
 
shr eax,8
 
cmp eax,101 ; tiled
cmp al,101 ; tiled
jne no101
mov ecx,1
setbgrmode:
mov eax,15
mov ebx,4
mov ecx,1
mcall
mov eax,15
mov ebx,3
dec ebx
mcall
jmp still
no101:
 
cmp eax,102 ; stretch
jne no102
mov eax,15
mov ebx,4
mov ecx,2
mcall
mov eax,15
mov ebx,3
mcall
jmp still
cmp al, 102
jz setbgrmode
no102:
 
cmp eax,1 ; end program
cmp al,1 ; end program
jnz no_end
or eax,-1
mcall
no_end:
 
cmp eax,11
cmp al,11
jz bg
cmp eax,12
cmp al,12
jz bg
cmp eax,13
cmp al,13
jz bg
 
cmp eax,121
cmp al,121
jb no_bg_select
cmp eax,133
jg no_bg_select
sub eax,121
shl eax,2
add eax,arrays
mov eax,[eax]
cmp al,133
ja no_bg_select
mov eax,[arrays + (eax-121)*4]
mov [usearray],eax
call load_texture
call draw_image
104,19 → 97,14
jmp still
no_bg_select:
 
cmp eax,14+20
cmp al,14+20
jge bg4
 
jmp bg2
 
 
check_parameters:
OnBoot:
 
cmp [I_Param],dword 'BOOT'
je @f
ret
@@:
 
call load_texture
 
mov eax,15
125,7 → 113,6
mov edx,256
mcall
 
mov eax,15
mov ebx,5
mov ecx,0x40000 ; <<< 0x40000 for blue, 0x40000+1 for red,
; <<< 0x40000+2 for green background at boot
133,13 → 120,11
mov esi,256*3*256
mcall
 
mov eax,15
mov ebx,4
dec ebx
mov ecx,2
mcall
 
mov eax,15
mov ebx,3
dec ebx
mcall
 
mov eax,-1
178,13 → 163,13
 
mov edi,0x40000
 
cmp eax,12
cmp al,12
jnz bb1
mov edi,0x40000+1
inc edi
bb1:
cmp eax,13
cmp al,13
jnz bb2
mov edi,0x40000+2
inc edi
bb2:
 
mov eax,15
193,7 → 178,6
mov edx,256
mcall
 
mov eax,15
mov ebx,5
mov ecx,edi
mov edx,0
200,7 → 184,6
mov esi,256*256*3
mcall
 
mov eax,15
mov ebx,3
mcall
 
210,34 → 193,13
; colored background
 
bg2:
 
push eax
 
mov edi, eax
mcall 15,4,1
mcall ,1,,1
lea ecx, [(edi-14)*3+fill]
mcall ,5,,0,3*1*1
mcall ,3
 
mov eax,15
mov ebx,1
mov ecx,1
mov edx,1
mcall
 
pop eax
sub eax,14
imul eax,3
 
mov ecx,fill
add ecx,eax
 
mov eax,15
mov ebx,5
xor edx,edx
mov esi,3*1*1
mcall
 
mov eax,15
mov ebx,3
mcall
 
jmp still
 
 
245,9 → 207,8
 
bg4:
 
sub eax,14+20
shl eax,3
add eax,shape
add eax,shape - (14+20)*8
mov ecx,[eax+0]
mov edx,[eax+4]
 
255,7 → 216,6
mov ebx,1
mcall
 
mov eax,15
mov ebx,3
mcall
 
275,17 → 235,17
 
gentexture:
 
mov ecx,0 ; ycounter
mov edi,0 ; pixel counter
xor ecx,ecx ; ycounter
xor edi,edi ; pixel counter
 
mov ebp,[usearray]
 
ylup:
mov ebx,0
xor ebx,ebx
 
xlup:
push edi
mov edi, 0
xor edi, edi
mov esi, 512000000 ; abnormous initial value :)
 
pixlup:
/programs/network/chess/trunk/chess.asm
0,0 → 1,1301
;
; CHESS CLIENT for CHESSCLUB.COM (VT)
;
; Compile with FASM for Menuet
;
 
appname equ 'Chess Client for Chessclub.com '
version equ '0.2'
 
use32
org 0x0
db 'MENUET01' ; header
dd 0x01 ; header version
dd START ; entry point
dd I_END ; image size
dd 0x100000 ; required memory
dd 0x100000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Path
 
include 'lang.inc'
include '..\..\..\macros.inc'
 
pawn_color:
 
dd 0x000000
dd 0x222222
dd 0x444444
dd 0xf0f0f0
dd 0xc0c0c0
dd 0xa0a0a0
dd 0xa0a0a0
dd 0x707070
dd 0xb0b0b0
dd 0xc0c0c0
dd 0xd0d0d0
dd 0xd8d8d8
dd 0xe0e0e0
dd 0xe8e8e8
dd 0x00ff00
dd 0xffffff
 
 
 
texts equ board_old+80*30
 
text equ texts+80*32*4
 
 
START: ; start of execution
 
mov esi,chess_bmp
mov edi,0x10000+18*3
 
mov ebx,0
mov ecx,0
 
newp:
 
xor eax,eax
mov al,[esi]
and al,0xf0
shr al,4
shl eax,2
mov eax,[pawn_color+eax]
mov [edi+0],eax
 
xor eax,eax
mov al,[esi]
and al,0x0f
shl eax,2
mov eax,[pawn_color+eax]
mov [edi+3],eax
 
add edi,6
add esi,1
 
inc ebx
cmp ebx,23
jbe newp
 
sub edi,12
 
mov ebx,0
 
inc ecx
cmp ecx,279
jb newp
 
; Clear the screen memory
mov eax, ' '
mov edi,text
mov ecx,80*30 /4
cld
rep stosd
 
 
call draw_window
 
still:
 
call check_for_board
 
call board_changed
 
call draw_board
 
; check connection status
mov eax,53
mov ebx,6
mov ecx,[socket]
mcall
 
mov ebx, [socket_status]
mov [socket_status], eax
 
cmp eax, ebx
je waitev
 
call display_status
 
waitev:
mov eax,23 ; wait here for event
mov ebx,20
mcall
 
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
 
; any data from the socket?
 
mov eax, 53
mov ebx, 2
mov ecx, [socket]
mcall
cmp eax, 0
jne read_input
 
jmp still
 
 
read_input:
 
push ecx
mov eax, 53
mov ebx, 3
mov ecx, [socket]
mcall
pop ecx
 
call handle_data
 
push ecx
mov eax, 53
mov ebx, 2
mov ecx, [socket]
mcall
pop ecx
cmp eax, 0
 
 
jne read_input
call draw_text
jmp still
 
 
 
check_for_board:
 
pusha
 
mov esi,text-80
news:
add esi,80
cmp esi,text+80*10
je board_not_found
cmp [esi+12],dword '----'
je cfb1
jmp news
cfb1:
cmp [esi+16*80+12],dword '----'
je cfb2
jmp news
cfb2:
cmp [esi+2*80+12],dword '+---'
jne news
 
cmp [esi+4*80+12],dword '+---'
jne news
 
board_found:
 
mov edi,chess_board
mov ecx,80*18
cld
rep movsb
 
board_not_found:
 
popa
 
ret
 
 
yst dd 150
textx equ 10
ysts equ 410
 
boardx dd 45
boardy dd 45
 
boardxs dd 44
boardys dd 44
 
conx equ 420
cony equ 118
 
dconx equ 420
dcony equ 148
 
statusx equ 420
statusy equ 178
 
 
drsq:
 
push eax ebx
 
mov ecx,ebx
mov ebx,eax
 
mov eax,ebx
add eax,ecx
 
imul ebx,[boardxs]
add ebx,[boardx]
shl ebx,16
imul ecx,[boardys]
add ecx,[boardy]
shl ecx,16
 
add ebx,[boardxs]
add ecx,[boardys]
 
mov edx,[sq_black]
test eax,1
jnz dbl22
mov edx,[sq_white]
dbl22:
 
mov eax,13
mcall
 
pop ebx eax
 
ret
 
 
 
draw_pawn:
 
; edi,0 ; white / black
; esi,0 ; from position 2 , 20 square
; eax,2 ; board x
; ebx,0 ; board y
 
pusha
 
call drsq
 
cmp esi,20
jne no_sqd
 
popa
ret
 
no_sqd:
 
imul eax,[boardxs]
imul ebx,[boardys]
 
add eax,[boardx]
add ebx,[boardy]
 
imul esi,44*45*3
add esi,0x10000+18*3
 
mov ecx,43
 
dp0:
 
pusha
 
mov ecx,44
 
ldp1:
 
pusha
 
mov ecx,ebx
mov ebx,eax
 
mov edx,[esi]
and edx,0xffffff
mov eax,1
cmp edx,0x00ff00
je nowp
cmp edi,1
jne nobl
shr edx,1
and edx,0x7f7f7f
nobl:
mcall
nowp:
 
popa
 
add esi,3
add eax,1
 
dec ecx
jnz ldp1
 
popa
 
add ebx,1
add esi,3*44
 
dec ecx
jnz dp0
 
popa
 
ret
 
 
board_changed:
 
pusha
 
mov eax,0
mov esi,chess_board
bcl1:
add eax,[esi]
add esi,4
cmp esi,chess_board+19*80
jb bcl1
 
cmp eax,[checksum]
je bcl2
mov [changed],1
bcl2:
mov [checksum],eax
 
popa
 
ret
 
 
 
checksum dd 0
 
changed db 1
 
draw_board:
 
pusha
 
cmp [changed],1
jne no_change_in_board
 
mov [changed],0
 
mov eax,0
mov ebx,0
scan_board:
 
push eax ebx
 
mov esi,ebx
imul esi,2
imul esi,80
add esi,80
 
imul eax,4
add eax,10
 
add esi,eax
 
movzx edx,word [chess_board+esi]
cmp dx,[board_old+esi]
je empty_slot
 
mov ecx,13
newseek2:
mov edi,ecx
imul edi,8
sub edi,8
cmp dx,[edi+nappulat]
je foundnappula2
loop newseek2
 
jmp empty_slot
 
foundnappula2:
 
mov esi,[edi+nappulat+4]
mov edi,0
cmp dl,'*'
jne nnbb
mov edi,1
nnbb:
mov eax,[esp+4]
mov ebx,[esp]
call draw_pawn
 
empty_slot:
 
pop ebx eax
 
inc eax
cmp eax,8
jb scan_board
mov eax,0
inc ebx
cmp ebx,8
jb scan_board
 
mov esi,chess_board
mov edi,board_old
mov ecx,80*19
cld
rep movsb
 
mov eax,13
mov ebx,[boardx]
sub ebx,14
shl ebx,16
add ebx,8
mov ecx,[boardy]
shl ecx,16
add ecx,46*8
mov edx,[wcolor]
mcall
 
mov eax,4 ; numbers at left
mov ebx,[boardx]
sub ebx,14
shl ebx,16
add ebx,[boardy]
add ebx,18
mov ecx,[tcolor]
mov edx,chess_board+80+5
mov esi,3
db1:
mcall
add edx,80*2
add ebx,[boardxs]
cmp edx,chess_board+80*16
jb db1
 
mov eax,13
mov ebx,[boardx]
shl ebx,16
add ebx,8*46
mov ecx,[boardys]
imul ecx,8
add ecx,[boardy]
add ecx,8
shl ecx,16
add ecx,10
mov edx,[wcolor]
mcall
 
mov eax,4 ; letters at bottom
mov ebx,[boardx]
add ebx,3
shl ebx,16
mov bx,word [boardys]
imul bx,8
add ebx,[boardy]
add ebx,8
mov ecx,[tcolor]
mov edx,chess_board+80*17+8
mov esi,4
db3:
mcall
mov edi,[boardxs]
shl edi,16
add ebx,edi
add edx,4
cmp edx,chess_board+80*17+8+4*8
jb db3
 
; print player times
 
mov edi,74
cmp [chess_board+80+5],byte '1'
jne nowww2
mov edi,371
nowww2:
 
mov eax,13
mov ebx,(conx)*65536+100
mov ecx,edi
shl ecx,16
add ecx,10
mov edx,[wcolor]
mcall
 
mov eax,4
mov ebx,(conx)*65536
add ebx,edi
mov ecx,[tcolor]
mov edx,chess_board+80*7+59-1
mov esi,20
mcall
 
mov edi,74
cmp [chess_board+80+5],byte '1'
je nowww
mov edi,371
nowww:
 
mov eax,13
mov ebx,(conx)*65536+100
mov ecx,edi
shl ecx,16
add ecx,10
mov edx,[wcolor]
mcall
 
mov eax,4
mov ebx,(conx)*65536
add ebx,edi
mov ecx,[tcolor]
mov edx,chess_board+80*9+59-1
mov esi,20
mcall
 
; move #
 
mov eax,13
mov ebx,conx*65536+120
mov ecx,200*65536+10
mov edx,[wcolor]
mcall
 
mov eax,4
mov ebx,conx*65536
add ebx,200
mov ecx,[tcolor]
mov edx,chess_board+80*1+46
mov esi,30
mcall
 
no_change_in_board:
 
popa
 
ret
 
 
handle_data:
; Telnet servers will want to negotiate options about our terminal window
; just reject them all.
; Telnet options start with the byte 0xff and are 3 bytes long.
 
mov al, [telnetstate]
cmp al, 0
je state0
cmp al, 1
je state1
cmp al, 2
je state2
jmp hd001
 
state0:
cmp bl, 255
jne hd001
mov al, 1
mov [telnetstate], al
ret
 
state1:
mov al, 2
mov [telnetstate], al
ret
 
state2:
mov al, 0
mov [telnetstate], al
mov [telnetrep+2], bl
 
mov edx, 3
mov eax,53
mov ebx,7
mov ecx,[socket]
mov esi, telnetrep
mcall
ret
 
hd001:
cmp bl,13 ; BEGINNING OF LINE
jne nobol
mov ecx,[pos]
add ecx,1
boll1:
sub ecx,1
mov eax,ecx
xor edx,edx
mov ebx,80
div ebx
cmp edx,0
jne boll1
mov [pos],ecx
 
call check_for_board
 
jmp newdata
nobol:
 
cmp bl,10 ; LINE DOWN
jne nolf
addx1:
add [pos],dword 1
mov eax,[pos]
xor edx,edx
mov ecx,80
div ecx
cmp edx,0
jnz addx1
mov eax,[pos]
jmp cm1
nolf:
 
cmp bl,9 ; TAB
jne notab
add [pos],dword 8
jmp newdata
notab:
 
cmp bl,8 ; BACKSPACE
jne nobasp
mov eax,[pos]
dec eax
mov [pos],eax
mov [eax+text],byte 32
mov [eax+text+60*80],byte 0
jmp newdata
nobasp:
 
cmp bl,15 ; CHARACTER
jbe newdata
mov eax,[pos]
mov [eax+text],bl
mov eax,[pos]
add eax,1
cm1:
mov ebx,[scroll+4]
imul ebx,80
cmp eax,ebx
jb noeaxz
mov esi,text+80
mov edi,text
mov ecx,ebx
cld
rep movsb
mov eax,ebx
sub eax,80
noeaxz:
mov [pos],eax
newdata:
ret
 
 
red: ; REDRAW WINDOW
call draw_window
jmp still
 
key: ; KEY
mov eax,2 ; send to modem
mcall
 
mov ebx, [socket_status]
cmp ebx, 4 ; connection open?
jne still ; no, so ignore key
 
shr eax,8
cmp eax,178 ; ARROW KEYS
jne noaup
mov al,'A'
call arrow
jmp still
noaup:
cmp eax,177
jne noadown
mov al,'B'
call arrow
jmp still
noadown:
cmp eax,179
jne noaright
mov al,'C'
call arrow
jmp still
noaright:
cmp eax,176
jne noaleft
mov al,'D'
call arrow
jmp still
noaleft:
modem_out:
 
call to_modem
 
jmp still
 
button: ; BUTTON
mov eax,17
mcall
cmp ah,1 ; CLOSE PROGRAM
jne noclose
 
mov eax,53
mov ebx,8
mov ecx,[socket]
mcall
 
mov eax,-1
mcall
noclose:
 
cmp ah, 4 ; connect
jne notcon
 
mov eax, [socket_status]
cmp eax, 4
je still
call connect
 
jmp still
 
notcon:
cmp ah,5 ; disconnect
jne notdiscon
 
call disconnect
jmp still
 
notdiscon:
 
jmp still
 
arrow:
 
push eax
mov al,27
call to_modem
mov al,'['
call to_modem
pop eax
call to_modem
 
ret
 
 
to_modem:
pusha
push ax
mov [tx_buff], al
mov edx, 1
cmp al, 13
jne tm_000
mov edx, 2
tm_000:
mov eax,53
mov ebx,7
mov ecx,[socket]
mov esi, tx_buff
mcall
pop bx
mov al, [echo]
cmp al, 0
je tm_001
 
push bx
call handle_data
pop bx
 
cmp bl, 13
jne tm_002
 
mov bl, 10
call handle_data
 
tm_002:
call draw_text
 
tm_001:
popa
ret
 
 
 
disconnect:
mov eax,53
mov ebx,8
mov ecx,[socket]
mcall
ret
 
 
 
connect:
pusha
 
mov ecx, 1000 ; local port starting at 1000
 
getlp:
inc ecx
push ecx
mov eax, 53
mov ebx, 9
mcall
pop ecx
cmp eax, 0 ; is this local port in use?
jz getlp ; yes - so try next
 
mov eax,53
mov ebx,5
mov dl, [ip_address + 3]
shl edx, 8
mov dl, [ip_address + 2]
shl edx, 8
mov dl, [ip_address + 1]
shl edx, 8
mov dl, [ip_address]
mov esi, edx
movzx edx, word [port] ; telnet port id
mov edi,1 ; active open
mcall
mov [socket], eax
 
popa
 
ret
 
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
 
pusha
 
mov eax,12
mov ebx,1
mcall
 
mov eax,14
mcall
 
mov ebx,eax
mov ecx,eax
 
shr ebx,16
and ebx,0xffff
and ecx,0xffff
 
shr ebx,1
shr ecx,1
 
sub ebx,275
sub ecx,235
 
shl ebx,16
shl ecx,16
 
mov eax,0 ; DRAW WINDOW
mov bx,550
mov cx,470
mov edx,[wcolor]
add edx,0x13000000
mov edi,title
mcall
 
call display_status
 
mov eax,8 ; BUTTON 4: Connect
mov ebx,conx*65536+80
mov ecx,cony*65536+15
mov esi,[wbutton]
mov edx,4
mcall
mov eax,4 ; Button text
mov ebx,(conx+4)*65536+cony+4
mov ecx,0xffffff
mov edx,cont
mov esi,conlen-cont
mcall
 
 
mov eax,8 ; BUTTON 5: disconnect
mov ebx,dconx*65536+80
mov ecx,dcony*65536+15
mov edx,5
mov esi,[wbutton]
mcall
mov eax,4 ; Button text
mov ebx,(dconx+4)*65536+dcony+4
mov ecx,0x00ffffff
mov edx,dist
mov esi,dislen-dist
mcall
 
 
xor eax,eax
mov edi,text+80*30
mov ecx,80*30 /4
cld
rep stosd
 
call draw_text
 
mov [changed],1
 
mov edi,board_old
mov ecx,80*19
mov al,0
cld
rep stosb
 
mov eax,4
mov ebx,conx*65536+52
mov ecx,[tcolor]
mov edx,quick_start
mov esi,30
 
prqs:
 
mcall
add ebx,10
add edx,30
cmp [edx],byte 'x'
jne prqs
 
mov eax,12
mov ebx,2
mcall
 
popa
 
ret
 
 
display_status:
 
pusha
 
; draw status bar
mov eax, 13
mov ebx, statusx*65536+80
mov ecx, statusy*65536 + 16
mov edx, [wcolor]
mcall
 
mov esi,contlen-contt ; display connected status
mov edx, contt
mov eax, [socket_status]
cmp eax, 4 ; 4 is connected
je pcon
mov esi,discontlen-discontt
mov edx, discontt
pcon:
mov eax,4 ; status text
mov ebx,statusx*65536+statusy+2
mov ecx,[tcolor]
mcall
 
popa
ret
 
 
nappulat:
 
dd '*P ',5
dd '*K ',3
dd '*Q ',4
dd '*R ',0
dd '*N ',1
dd '*B ',2
 
dd ' ',20
 
dd 'P ',5
dd 'K ',3
dd 'Q ',4
dd 'R ',0
dd 'N ',1
dd 'B ',2
 
 
row dd 0x0
col dd 0x0
 
 
 
draw_text:
 
mov esi,text+80*24
mov edi,texts+80*3
 
dtl1:
 
cmp [esi],dword 'logi'
je add_text
cmp [esi],dword 'aics'
je add_text
cmp [esi],dword 'You '
je add_text
cmp [esi],dword 'Your'
je add_text
cmp [esi],dword 'Game'
je add_text
cmp [esi],dword 'Ille'
je add_text
cmp [esi],dword 'No s'
je add_text
 
sub esi,80
cmp esi,text
jge dtl1
 
dtl2:
 
mov eax,13
mov ebx,10*65536+532
mov ecx,420*65536+40
mov edx,[wtcom]
mcall
 
mov eax,4
mov ebx,10*65536+420
mov ecx,[wtxt]
mov edx,texts
mov esi,80
 
dtl3:
 
mcall
add edx,80
add ebx,10
cmp edx,texts+4*80
jb dtl3
 
ret
 
add_text:
 
pusha
 
cld
mov ecx,80
rep movsb
 
popa
 
 
sub esi,80
sub edi,80
 
cmp edi,texts
jb dtl2
 
jmp dtl1
 
 
read_string:
 
mov edi,string
mov eax,'_'
mov ecx,[string_length]
inc ecx
cld
rep stosb
call print_text
 
mov edi,string
f11:
mov eax,10
mcall
cmp eax,2
jne read_done
mov eax,2
mcall
shr eax,8
cmp eax,13
je read_done
cmp eax,8
jnz nobsl
cmp edi,string
jz f11
sub edi,1
mov [edi],byte '_'
call print_text
jmp f11
nobsl:
cmp eax,dword 31
jbe f11
cmp eax,dword 95
jb keyok
sub eax,32
keyok:
mov [edi],al
call print_text
 
inc edi
mov esi,string
add esi,[string_length]
cmp esi,edi
jnz f11
 
read_done:
 
call print_text
 
ret
 
 
print_text:
 
pusha
 
mov eax,13
mov ebx,[string_x]
shl ebx,16
add ebx,[string_length]
imul bx,6
mov ecx,[string_y]
shl ecx,16
mov cx,8
mov edx,[wcolor]
mcall
 
mov eax,4
mov ebx,[string_x]
shl ebx,16
add ebx,[string_y]
mov ecx,[tcolor]
mov edx,string
mov esi,[string_length]
mcall
 
popa
ret
 
 
 
 
; DATA AREA
 
telnetrep db 0xff,0xfc,0x00
telnetstate db 0
 
string_length dd 16
string_x dd 200
string_y dd 60
 
string db '________________'
 
tx_buff db 0, 10
ip_address db 204,178,125,65
port dw 5051 ; 0,0
echo db 1
socket dd 0x0
socket_status dd 0x0
pos dd 80 * 22
scroll dd 1
dd 24
 
wbutton dd 0x336688
 
wtcom dd 0x336688 ; 0x666666
wtxt dd 0xffffff
 
wcolor dd 0xe0e0e0
tcolor dd 0x000000
 
sq_black dd 0x336688 ; 666666
sq_white dd 0xffffff
 
title db appname,version,0
 
setipt db ' . . .'
setiplen:
setportt db ' '
setportlen:
cont db 'Connect'
conlen:
dist db 'Disconnect'
dislen:
contt db 'Connected'
contlen:
discontt db 'Disconnected'
discontlen:
echot db 'Echo On'
echolen:
echoot db 'Echo Off'
echoolen:
 
quick_start:
 
db '( OPPONENT ) '
 
times 16 db ' 1'
 
db 'Quick start: '
db ' '
db '1 Connect '
db '2 login: "guest" '
db '3 aics% "seek 10 0" '
db ' (for a player) '
db ' (wait) '
db '4 Play eg. "e7e5" '
db ' or "d2d4" '
db '5 aics% "resign" '
db ' (quit game) '
db '6 Disconnect '
 
times 5 db ' '
 
db '( YOU ) '
 
db 'x'
 
 
chess_board:
 
times 80 db 0
 
db ' 8 *R *N *B *Q *K *B *N *R'
db ' '
 
times 80 db 0
 
db ' 7 *P *P *P *P *P *P *P *P'
db ' '
 
times 80 db 0
 
db ' 6 '
db ' '
 
times 80 db 0
 
db ' 5 '
db ' '
 
times 80 db 0
 
db ' 4 '
db ' '
 
times 80 db 0
 
db ' 3 '
db ' '
 
times 80 db 0
 
db ' 2 P P P P P P P P '
db ' '
 
times 80 db 0
 
db ' 1 R N B Q K B N R '
db ' '
 
times 80 db 0
 
db ' a b c d e f g h '
db ' '
 
 
times 80*20 db 0
 
chess_bmp:
file 'chess.bmp':22*3+4+24*2
 
board_old:
 
 
I_END:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/network/chess/trunk/build_en.bat
0,0 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm chess.asm chess
@erase lang.inc
@pause
/programs/network/chess/trunk/build_ru.bat
0,0 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm chess.asm chess
@erase lang.inc
@pause
/programs/system/cpuid/trunk/CPUID.ASM
59,12 → 59,11
mov ebx, 10000
div ebx
mov [ost], eax ; example 160049
mov eax, [total]
imul eax, 100
mov [sot], eax ; example 160000
mov eax, [ost]
sub eax, [sot]
mov [sot], eax ; example 49
mov ecx, [total]
imul ecx, 100
neg ecx
add ecx, eax
mov [sot], ecx ; example 49
;------------
cpu: ;is CPUID supported?
pushfd ;push original EFLAGS
92,10 → 91,8
 
;Decoding cache L1 and L2 for Intel
 
cmp [smallvendor], 'ntel'
cmp ecx, 'ntel'
jne cpu1 ;is not Intel
je .detec
.detec:
 
;Starting L1, L2, L3 caches detection (Intel made it VERY HARD)
 
104,52 → 101,28
 
mov [che], al ; number of calls
multik:
dec [che]
 
.eaxl:
test eax, $80000000 ; Test bit 31
jnz .ebxl ; <> 0 =>invalid values
shr eax, 8
call decodecache
shr eax, 8
call decodecache
shr eax, 8
call decodecache
test eax, eax ; Test bit 31
js .ebxl ; <> 0 =>invalid values
call decodecache24
.ebxl:
test ebx, $80000000
jnz .ecxl
test ebx, ebx
js .ecxl
mov eax, ebx
call decodecache
shr eax, 8
call decodecache
shr eax, 8
call decodecache
shr eax, 8
call decodecache
call decodecache32
.ecxl:
test ecx, $80000000
jnz .edxl
test ecx, ecx
js .edxl
mov eax, ecx
call decodecache
shr eax, 8
call decodecache
shr eax, 8
call decodecache
shr eax, 8
call decodecache
call decodecache32
.edxl:
test edx, $80000000
jnz cpu1
test edx, edx
js cpu1
mov eax, edx
call decodecache
shr eax, 8
call decodecache
shr eax, 8
call decodecache
shr eax, 8
call decodecache
call decodecache32
 
cmp [che], 0 ; we made all calls
dec [che] ; we made all calls
je cpu1
 
multi: ; not yet
166,13 → 139,13
cpuid
 
mov ecx, eax
and ecx,00000F00h ; get CPU family
shr ecx,8 ; shift it to the correct position
and ecx,0000000Fh ; get CPU family
mov dword[f],ecx
 
mov ecx, eax
and ecx,000000F0h ; get CPU model
shr ecx,4
and ecx,0000000Fh ; get CPU model
mov dword[m],ecx
 
mov ecx, eax
190,8 → 163,7
cmp dword[smallvendor], 'cAMD'
jz maybe_athlon
cmp dword[smallvendor], 'ntel'
jz detect_it
jmp no_full ; if not AMD or Intel
jnz no_full ; if not AMD or Intel
 
detect_it:
cmp [f], 0Fh
229,13 → 201,13
mov eax, 0x80000001 ; CPUID ext. function 0x80000001
cpuid
mov ecx, eax
and ecx,00000F00h ; get CPU family
shr ecx,8 ; shift it to the correct position
and ecx,0000000Fh ; get CPU family
mov dword[ef],ecx
 
mov ecx, eax
and ecx,000000F0h ; get CPU model
shr ecx,4
and ecx,0000000Fh ; get CPU model
mov dword[em],ecx
 
fut:
244,19 → 216,11
;-
call decode_extended
 
mov eax,$80000000
cpuid
mov dword [myname], $612F6E
 
mov [extc], eax ; max number of calls
cmp [extc], $80000003
jbe .noname
 
test eax, $80000000 ;// Test bit 31
jz .noname
 
cmp eax,$80000003
ja .mynameis
jmp .noname
 
.mynameis:
mov eax,$80000002
cpuid
mov [myname],eax
275,140 → 239,61
mov [myname+36],ebx
mov [myname+40],ecx
mov [myname+44],edx
jmp red
 
.noname:
mov dword [myname], $612F6E
 
red:
 
xor ecx, ecx
xor eax, eax
xor edx, edx
xor ebx, ebx
 
;mov byte [multiplier], 115; ; for testing
 
call multipl ; get multiplier
mov byte [multiplier], cl
 
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
mov dword [freqbb], 0
mov dword [freqll], 0
 
cmp dword[multiplier], 0
jz contin
mov ebx, dword [multiplier]
test ebx, ebx
jz output
 
calc:
 
mov eax,dword [ost] ; example 166474
imul eax, 10 ; example 1664740
mov ebx, dword [multiplier] ; get system clock (if multiplier detected)
div ebx
mov dword [freqbb], eax ; 16647
 
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
div ebx ; get system clock (if multiplier detected)
 
mov eax,dword [ost] ;example 166474
mov ebx,10
div ebx ;example 16647
 
mov dword [temp], eax
 
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
 
mov eax, dword [temp]
 
mov ebx, dword [multiplier]
div ebx ; example 166
 
imul eax, 100
mov dword[freqll], eax ; example 16600
 
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
 
mov eax, dword[freqbb]; example 16647
sub eax, dword[freqll]; example 16600
mov dword[freqll], eax ;example 47
 
 
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
 
 
mov eax,dword [freqbb]; example 16647
xor edx, edx ; example eax=16647
mov ebx, 100
div ebx
mov dword [freqbb], eax ; example 166
mov dword [freqll], edx ; example 47
 
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
 
mov eax,dword[multiplier] ; example 115
mov ebx,10
div ebx
mov dword[multb], eax ; example 11
mov dword[multa], edx ; example 5
imul eax, 10
mov dword[multa], eax ; example 110
 
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
 
mov eax, dword[multiplier]
sub eax, dword[multa]
mov dword[multa], eax ; example 5
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
 
jmp output
 
contin:
 
mov dword [freqbb], 0
mov dword [freqll], 0
 
output:
 
call draw_window ; Draw window
 
typedetect:
 
mov edx, t1
cmp [t], 00b
jne t2d
Text 290,250,0x00000000,t1, t1len-t1
jmp PROCCORE
t2d:
jz @f
mov edx, t2
cmp [t], 01b
jne t3d
Text 290,250,0x00000000,t2, t2len-t2
jmp PROCCORE
t3d:
jz @f
mov edx, t3
cmp [t], 11b
jne notype
Text 290,250,0x00000000,t3, t3len-t3
jmp PROCCORE
notype:
Text 290,250,0x00000000,t4, t4len-t4
jz @f
mov edx, t4
@@:
mov ebx, 290*65536 + 250
mov ecx, 0x80000000
mcall 4
 
PROCCORE: ; Who are you?
; Intel - "GenuineIntel" +
443,7 → 328,7
; jz .SiS
; cmp ecx, ' NSC'
; jz .NSC
jmp Other ; I don't know what to do with you...
; jmp Other ; I don't know what to do with you...
Other:
Text 75,70,0x00000000,other, otherlen-other
jmp MMXtest
453,7 → 338,7
 
Text 15, 190,0x00000000,cache, cachelen-cache
 
Text 75,70,0x00000000,AMDn, AMDnlen-AMDn
Text 75,70,,AMDn, AMDnlen-AMDn
 
mov esi, amd
call load_gif
465,11 → 350,7
mov eax, 80000005h
cpuid
 
mov eax, ecx
;shl eax, 24
;shr eax, 24
 
and eax,000000FFh ;
movzx eax, cl
mov [lineld], eax
 
mov eax, ecx
484,11 → 365,7
mov [L1d], ecx
 
 
mov eax, edx
;shl eax, 24
;shr eax, 24
 
and eax,000000FFh ;
movzx eax, dl
mov [lineli], eax
 
mov eax, edx
508,49 → 385,17
mov eax, 80000006h
cpuid
 
mov eax, ecx
;and eax,000000FFh ;
shl eax, 24
shr eax, 24
movzx eax, cl
mov dword[linel2], eax
 
mov eax, ecx
shl eax, 16
shr eax, 28
push ecx
shr ecx, 12+1
and ecx, 0x7
mov eax, 1
shl eax, cl
mov dword [wayl2], eax
pop ecx
 
cmp eax, 0010b
je way2
 
cmp eax, 0100b
je way4
 
cmp eax, 0110b
je way8
 
cmp eax, 1000b
je way16
 
jmp to_next
 
way2:
mov dword[wayl2], 2
jmp to_next
 
way4:
mov dword[wayl2], 4
jmp to_next
 
way8:
mov dword[wayl2], 8
jmp to_next
 
way16:
mov dword[wayl2], 16
jmp to_next
 
 
to_next:
 
shr ecx, 16
mov [L2],ecx
 
561,99 → 406,67
cmp [f], $F
jz fif
.fiv: ; Family=5
mov [micron], 50
mov edx, A50
cmp [m],$0
jz .A50
jz @f
mov [micron], 35
mov edx, A51
cmp [m],$1
jz .A51
jz @f
mov edx, A52
cmp [m],$2
jz .A52
jz @f
mov edx, A53
cmp [m],$3
jz .A53
jz @f
mov [micron], 30
mov edx, A56
cmp [m],$6
jz .A56
jz @f
mov [micron], 25
mov edx, A57
cmp [m],$7
jz .A57
jz @f
mov edx, A58
cmp [m],$8
jz .A58
jz @f
mov edx, A59
cmp [m],$9
jz .A59
cmp [m],$D
jz .A5D
.A50:
mov [micron], 50 ; 0.35?
Text 100,70,0x00000000,A50, A50len-A50
jmp MMXtest
.A51:
mov [micron], 35
Text 100,70,0x00000000,A51, A51len-A51
jmp MMXtest
.A52:
mov [micron], 35
Text 100,70,0x00000000,A52, A52len-A52
jmp MMXtest
.A53:
mov [micron], 35
Text 100,70,0x00000000,A53, A53len-A53
jmp MMXtest
.A56:
mov [micron], 30
Text 100,70,0x00000000,A56, A56len-A56
jmp MMXtest
.A57:
mov [micron], 25
Text 100,70,0x00000000,A57, A57len-A57
jmp MMXtest
.A58:
mov [micron], 25
Text 100,70,0x00000000,A58, A58len-A58
jmp MMXtest
.A59:
mov [micron], 25
Text 100,70,0x00000000,A59, A59len-A59
jmp MMXtest
.A5D:
jz @f
mov [micron], 18
Text 100,70,0x00000000,A5D, A5Dlen-A5D
jmp MMXtest
mov edx, A5D
@@:
jmp @f
 
.si: ; Family=6
 
mov [micron], 25
mov edx, At1
cmp [m],$1
jz A1
jz @f
mov [micron], 18
mov edx, At2
cmp [m],$2
jz A2
jz @f
mov edx, At3
cmp [m],$3
jz A3
jz @f
mov edx, At4
cmp [m],$4
jz A4
jz @f
cmp [m],$6
jz A6
mov [micron], 13
mov edx, At7
cmp [m],$7
jz A7
jz @f
cmp [m],$8
jz A8
cmp [m],$A
jz AA
A1:
mov [micron], 25
Text 100,70,0x00000000,At1, At1len-At1
jmp AA
@@:
Text 100,70,0x80000000
jmp MMXtest
A2:
mov [micron], 18
Text 100,70,0x00000000,At2, At2len-At2
jmp MMXtest
A3:
mov [micron], 18
Text 100,70,0x00000000,At3, At3len-At3
jmp MMXtest
A4:
mov [micron], 18
Text 100,70,0x00000000,At4, At4len-At4
jmp MMXtest
A6:
 
mov [micron], 18
Text 100,70,0x00000000,At6, At6len-At6
 
mov [FRS], 266 ;!!!!!!
 
Number 315,90,0,3,dword [FRS],0x000000; MHz
663,58 → 476,49
Text 245,70,0x00000000,pr, prlen-pr
 
Number 310,70,0,4,dword [rating],0x000000
jmp MMXtest
A7:
mov [micron], 13
Text 100,70,0x00000000,At7, At7len-At7
jmp MMXtest
mov edx, At6
jmp @b
 
A8:
 
mov [micron], 13
mov [FRS], 266 ;!!!!!!
 
Number 315,90,0,3,dword [FRS],0x000000; MHz
 
 
cmp [L2], 256
jl .App ; Applebred
Text 100,70,0x00000000,At8, At8len-At8
 
 
call newrating;!!!!
 
Text 245,70,0x00000000,pr, prlen-pr
Number 310,70,0,4,dword [rating],0x000000
jmp MMXtest
mov edx, At8
jmp @b
 
.App:
Text 100,70,0x00000000,At8a, At8alen-At8a
jmp MMXtest
mov edx, At8a
jmp @b
 
AA:
 
mov [micron], 13
 
mov [FRS], 333; !!!!
Text 245,70,0x00000000,pr, prlen-pr
 
Number 315,90,0,3,dword [FRS],0x000000; MHz
 
mov edx, Atat
cmp [L2], 256
jl .Tho ; Thorton
mov edx, Ata
.Tho:
push edx
 
call newrating;!!!!!
Text 100,70,0x00000000,Ata, Atalen-Ata
 
Number 310,70,0,4,dword [rating],0x000000
pop edx
jmp @b
 
jmp MMXtest
.Tho:
call newrating;!!!!!
Text 100,70,0x00000000,Atat, Atatlen-Atat
Number 310,70,0,4,dword [rating],0x000000
jmp MMXtest
fif: ; AMD-64 Family=15
 
;here is a need to rewrite detection of AMD F-th family according to "Revision Guide for
1162,8 → 966,9
mov [L1d], 32
mov [L2], 512
Text 75,70,0x00000000,Centaurn, Centaurnlen-Centaurn
Text 100,70,0x00000000,C65, C65len-C65
jmp MMXtest
mov edx,C65
mov esi,C65len-C65
jmp OutProcName
;---------------------
Centaur:
 
1184,29 → 989,24
mov eax, 80000005h
cpuid
 
mov eax, ecx
 
and eax,000000FFh ;
movzx eax, cl
mov [lineld], eax
 
mov eax, ecx
 
and eax,00FF0000h
shr eax, 16
and eax,000000FFh
mov [wayld], eax
 
shr ecx, 24
mov [L1d], ecx
 
mov eax, edx
 
and eax,000000FFh ;
movzx eax, dl
mov [lineli], eax
 
mov eax, edx
 
and eax,00FF0000h
shr eax, 16
and eax,000000FFh
mov [wayli], eax
 
shr edx, 24
1224,9 → 1024,7
cmp [m],$9
jl vl2old
; else new
mov eax, ecx
shl eax, 24
shr eax, 24
movzx eax, cl
mov dword[linel2], eax
 
mov eax, ecx
1241,9 → 1039,7
 
 
vl2old:
mov eax, ecx
shl eax, 24
shr eax, 24
movzx eax, cl
mov dword[linel2], eax
 
mov eax, ecx
1278,16 → 1074,19
jz .V59
.V54:
mov [micron], 35
Text 100,70,0x00000000,V54, V54len-V54
jmp MMXtest
mov edx,V54
mov esi,V54len-V54
jmp OutProcName
.V58:
mov [micron], 25
Text 100,70,0x00000000,V58, V58len-V58
jmp MMXtest
mov edx,V58
mov esi,V58len-V58
jmp OutProcName
.V59:
mov [micron], 25
Text 100,70,0x00000000,V59, V59len-V59
jmp MMXtest
mov edx,V59
mov esi,V59len-V59
jmp OutProcName
 
sixC: ;Family=6
 
1310,30 → 1109,35
jz .V6A
.V66:
mov [micron], 18 ; 25?
Text 100,70,0x00000000,V66, V66len-V66
jmp MMXtest
mov edx,V66
mov esi,V66len-V66
jmp OutProcName
.V67:
mov [micron], 15
Text 100,70,0x00000000,V67, V67len-V67
jmp MMXtest
mov edx,V67
mov esi,V67len-V67
jmp OutProcName
.V68:
mov [micron], 13
Text 100,70,0x00000000,V68, V68len-V68
jmp MMXtest
mov edx,V68
mov esi,V68len-V68
jmp OutProcName
.V69:
mov [micron], 13
Text 100,70,0x00000000,V69, V69len-V69
jmp MMXtest
mov edx,V69
mov esi,V69len-V69
jmp OutProcName
.V6A:
mov [micron], 9
Text 100,70,0x00000000,VA, VAlen-VA
jmp MMXtest
mov edx,VA
mov esi,VAlen-VA
jmp OutProcName
;-----------
Transmeta:
 
Text 15, 190,0x00000000,cache, cachelen-cache
 
Text 75,70,0x00000000,Tranmsmetan, Tranmsmetanlen-Tranmsmetan
Text 75,70,,Tranmsmetan, Tranmsmetanlen-Tranmsmetan
 
mov esi, transmeta
call load_gif
1346,29 → 1150,25
mov eax, 80000005h
cpuid
 
mov eax, ecx
 
and eax,000000FFh ;
movzx eax, cl
mov [lineld], eax
 
mov eax, ecx
 
and eax,00FF0000h
shr eax, 16
and eax,000000FFh
mov [wayld], eax
 
shr ecx, 24
mov [L1d], ecx
 
mov eax, edx
 
and eax,000000FFh ;
movzx eax, dl
mov [lineli], eax
 
mov eax, edx
 
and eax,00FF0000h
shr eax, 16
and eax,000000FFh
mov [wayli], eax
 
shr edx, 24
1379,9 → 1179,7
mov eax, 80000006h
cpuid
 
mov eax, ecx
shl eax, 24
shr eax, 24
movzx eax, cl
mov dword[linel2], eax
 
mov eax, ecx
1400,15 → 1198,21
jz .fift
.fivt: ; Family=5
 
mov [micron], 13 ; ?
Text 140,70,0x00000000,T5, T5len-T5
jmp MMXtest
mov edx,T5
mov esi,T5len-T5
jmp @f
 
.fift: ; Family=F
mov edx,TF
mov esi,TFlen-TF
@@:
mov [micron], 13 ;
Text 140,70,0x00000000,TF, TFlen-TF
Text 140,70,0
jmp MMXtest
 
OutProcName:
Text 100,70,0
 
;----
MMXtest: ; MMX test and Brand ID decoding
 
1422,13 → 1226,11
cpuid
HTTtest:
test edx, $10000000; ;Test bit 28
jnz .EL ;HTT technology is supported
jz .ELN
 
.EL:
.EL: ;HTT technology is supported
and ebx,00FF0000h ; numbers of logical processors
shr ebx,16 ; shift it to the correct position
cmp ebx, 1
cmp ebx, 1 shl 16
; mov [number_of_log_cpus], ebx
je .ELN ; HHT not enabled (Celeron)
 
1439,92 → 1241,67
 
mov dword [HTTn+ 9], $6F6E
mov dword [HTT+ 6], $6F6E
jmp TEXTOUT
 
TEXTOUT:
 
Text 15,110,0x00000000,fam, famlen-fam
Text 15,130,0x00000000,mode, modelen-mode
Text 15,150,0x00000000,step, steplen-step
Text 15,130,,mode, modelen-mode
Text 15,150,,step, steplen-step
;--------L1 L2
Number 75,170,0,3,dword [L1d],0x000000;
Number 75,190,0,3,dword [L1i],0x000000;
Number 41,210,0,4,dword[L2],0x000000;
Number 35,230,0,5,dword[L3],0x000000;
Number 75,190,,,dword [L1i]
Number 41,210,0,4,dword[L2]
Number 35,230,0,5,dword[L3]
;-----------Features
Number 258,50,0,2,dword [micron],0x000000 ; micron
Number 258,50,0,2,dword [micron] ; micron
 
Text 275,290,0x00000000,HTT, HTTlen-HTT
Text 275,310,0x00000000,sse3, sse3len-sse3
Text 275,310,,sse3, sse3len-sse3
 
Text 15,70,0x00000000,name, namelen-name
Text 15,70,,name, namelen-name
 
Text 15,290,0x00000000,MMXs, MMXslen-MMXs
Text 15,310,0x00000000,SSE, SSElen-SSE
Text 95,310,0x00000000,SSE2, SSE2len-SSE2
Text 15,290,,MMXs, MMXslen-MMXs
Text 15,310,,SSE, SSElen-SSE
Text 95,310,,SSE2, SSE2len-SSE2
 
Number 140,170,0,2,dword [wayld],0x000000
Number 218,170,0,2,dword [lineld],0x000000
Number 218,170,,,dword [lineld]
 
Number 140,190,0,2,dword [wayli],0x000000
Number 218,190,0,2,dword [lineli],0x000000
Number 140,190,,,dword [wayli]
Number 218,190,,,dword [lineli]
 
Number 140,210,0,2,dword [wayl2],0x000000
Number 218,210,0,2,dword [linel2],0x000000
Number 140,210,,,dword [wayl2]
Number 218,210,,,dword [linel2]
 
Number 140,230,0,2,dword [wayl3],0x000000
Number 218,230,0,2,dword [linel3],0x000000
Number 140,230,,,dword [wayl3]
Number 218,230,,,dword [linel3]
 
jmp TEST3DNOW
;-------------------
TEST3DNOW:
 
xor edx, edx
cmp [smallvendor], 'ntel'
je .NOEXTENDED
jne .t
je @f
 
.t:
 
mov eax, $80000001 ;// Setup extended function 8000_0001h
cpuid
 
test edx, $80000000 ;// Test bit 31
jnz .XIT
@@:
mov eax, now+9
add edx, edx
call write_yes_no_cf
 
.NOEXTENDED: ;// 3DNow! technology is supported
mov dword [now+ 9], $6F6E
jmp TEST3DNOWP
.XIT:
mov dword [now+ 9], $736579
jmp TEST3DNOWP
mov eax, nowp+9
add edx, edx
call write_yes_no_cf
 
TEST3DNOWP:
 
cmp [smallvendor], 'ntel'
je .NOEXTENDEDP
 
.tp:
 
mov eax, $80000001 ;// Setup extended function 8000_0001h
cpuid
 
test edx, $40000000 ;// Test bit 30
jnz .XITP ;// 3DNow! technology is supported
 
.NOEXTENDEDP:
mov dword [nowp+ 9], $6F6E
jmp TESTMMXP
.XITP:
mov dword [nowp+ 9], $736579
jmp TESTMMXP
 
TESTMMXP:
 
mov eax,$80000000
cpuid
 
test eax, 80000000h
jna NOEXTENDEDM
test eax, eax
jns NOEXTENDEDM
 
;cmp eax, $80000000 ;// Is 800_0001h supported?
;jz .NOEXTENDEDM ;// If not, 3DNow! technology is not supported
1548,13 → 1325,12
XITM:
mov dword [mmxp+ 7], $736579
mov dword [MMXPi+ 8], $736579
jmp text3d
 
text3d:
 
Text 175,290,0x00000000,now, nowlen-now
Text 175,310,0x00000000,nowp, nowplen-nowp
Text 95,290,0x00000000,mmxp, mmxplen-mmxp
Text 175,310,,nowp, nowplen-nowp
Text 95,290,,mmxp, mmxplen-mmxp
 
jmp still
 
1561,7 → 1337,6
;--------------------------
NO_CPUID:
Text 15,50,0x00000000,oblom, oblomlen-oblom
jmp FREEZE
 
FREEZE:
nop
1592,11 → 1367,11
mov [ram_size_t], eax
 
Text 115,340,0x00000000,ram, ramlen-ram
Text 300,340,,mb, mblen-mb
 
Number 200,340,0,4,dword [ram_size_a],0x000000
 
Number 270,340,0,4,dword [ram_size_t],0x000000
Text 300,340,0x00000000,mb, mblen-mb
Number 270,340,,,dword [ram_size_t]
 
;==============================
 
1612,7 → 1387,6
je button ; button
jmp still ;
key: ;
mov eax,2 ;  
mcall ;
jmp still ;
button: ;
1625,16 → 1399,13
je thread_start ;
;
cmp ah,3 ; = 3 ?
je vybor ; vybor
jne still
 
jne noclose
 
jmp event_wait
vybor:
 
Number 310,70,0,4,dword [rating],0xFFFFFF ;
 
Number 315,90,0,3,dword [FRS],0xFFFFFF; MHz
Number 315,90,0,3,dword [FRS]; MHz
 
cmp [FRS], 266
jz .s1
1645,35 → 1416,21
 
.s1:
mov [FRS], 333
.rating:
call newrating
Number 310,70,0,4,dword [rating],0x000000
 
Number 315,90,0,3,dword [FRS],0x000000; MHz
Number 315,90,0,3,dword [FRS]; MHz
jmp still
 
.s2:
mov [FRS], 400
jmp .rating
 
call newrating
 
Number 310,70,0,4,dword [rating],0x000000
 
Number 315,90,0,3,dword [FRS],0x000000; MHz
jmp still
 
.s3:
mov [FRS], 266
call newrating
jmp .rating
 
Number 310,70,0,4,dword [rating],0x000000
 
Number 315,90,0,3,dword [FRS],0x000000; MHz
 
jmp still
 
noclose:
jmp still
 
close:
mov eax,-1
mcall
1686,12 → 1443,9
jne still
 
;================================================RSA test
call init_test ; start RSA code
call module_test
jmp somewhere
 
module_test:
;test rsa coding speed
call init_test
;length of module - 256 bit
mov eax,26
mov ebx,9
1699,8 → 1453,7
add eax,100 ;test lasts 1 second.
push eax
.loop:
mov ecx,4 ;do 4 iterations
push ecx ;this reduces number of calls mcall.
push 4 ;do 4 iterations - this reduces number of calls mcall.
.loop1:
call rsa_test ;this procedure change all registers
dec dword [esp]
1713,12 → 1466,7
jl .loop
pop eax
shr dword [iter],4 ;[iter] - speed in Kb/sec. (every iteration codes 64 bytes)
ret
 
somewhere:
;======================================================================
CreateTread window_2,thread2_esp
 
jmp still
 
window_2:
1740,7 → 1488,6
jmp still_2 ;
 
key_2: ;
mov eax,2 ;   2
mcall ;
jmp still_2 ;
 
1749,7 → 1496,7
mcall ;
 
cmp ah,1 ; = 1 ?
jne noclose_2 ; noclose
jne still_2 ; noclose
 
mov [num_win2],0 ;
 
1756,10 → 1503,6
or eax,-1 ;
mcall
 
noclose_2:
 
jmp still_2 ;
 
draw_window_2:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1h ; 1, start of draw
1770,50 → 1513,50
; place size
 
Text 15, 10,0x00000000, STDCA, STDCAlen-STDCA
Text 215, 10,0x00000000, EXTCA, EXTCAlen-EXTCA
Text 215, 10,, EXTCA, EXTCAlen-EXTCA
 
Number 135,10,1*256,8,dword [stdc],0x000000
Number 335,10,1*256,8,dword [extc],0x000000
Number 335,10,,,dword [extc],
 
Text 15, 30,0x00000000, FPU, FPUlen-FPU
Text 115, 30,0x00000000, VME, VMElen-VME
Text 215, 30,0x00000000, DE, DElen-DE
Text 315, 30,0x00000000, PSE, PSElen-PSE
Text 115, 30,, VME, VMElen-VME
Text 215, 30,, DE, DElen-DE
Text 315, 30,, PSE, PSElen-PSE
 
Text 15, 50,0x00000000,TSC, TSClen-TSC
Text 115, 50,0x00000000,MSR, MSRlen-MSR
Text 215,50,0x00000000,PAE, PAElen-PAE
Text 315,50,0x00000000,MCE, MCElen-MCE
Text 15, 50,,TSC, TSClen-TSC
Text 115,50,,MSR, MSRlen-MSR
Text 215,50,,PAE, PAElen-PAE
Text 315,50,,MCE, MCElen-MCE
 
Text 15,70,0x00000000,CX8, CX8len-CX8
Text 115,70,0x00000000,APIC, APIClen-APIC
Text 215,70,0x00000000,Res, Reslen-Res
Text 315,70,0x00000000,SEP, SEPlen-SEP
Text 15,70,,CX8, CX8len-CX8
Text 115,70,,APIC, APIClen-APIC
Text 215,70,,Res, Reslen-Res
Text 315,70,,SEP, SEPlen-SEP
 
Text 15,90,0x00000000,MTRR, MTRRlen-MTRR
Text 115,90,0x00000000,PGE, PGElen-PGE
Text 215,90,0x00000000,MCA, MCAlen-MCA
Text 315,90,0x00000000,CMOV, CMOVlen-CMOV
Text 15,90,,MTRR, MTRRlen-MTRR
Text 115,90,,PGE, PGElen-PGE
Text 215,90,,MCA, MCAlen-MCA
Text 315,90,,CMOV, CMOVlen-CMOV
 
Text 15,110,0x00000000,PAT, PATlen-PAT
Text 115,110,0x00000000,PSE36, PSE36len-PSE36
Text 215,110,0x00000000,PSNUM, PSNUMlen-PSNUM
Text 315,110,0x00000000,CLFLUSHn, CLFLUSHnlen-CLFLUSHn
Text 15,110,,PAT, PATlen-PAT
Text 115,110,,PSE36, PSE36len-PSE36
Text 215,110,,PSNUM, PSNUMlen-PSNUM
Text 315,110,,CLFLUSHn, CLFLUSHnlen-CLFLUSHn
 
Text 15,130,0x00000000,Res, Reslen-Res
Text 115,130,0x00000000,DTS, DTSlen-DTS
Text 215,130,0x00000000,ACPI, ACPIlen-ACPI
Text 315,130,0x00000000,MMX, MMXlen-MMX
Text 15,130,,Res, Reslen-Res
Text 115,130,,DTS, DTSlen-DTS
Text 215,130,,ACPI, ACPIlen-ACPI
Text 315,130,,MMX, MMXlen-MMX
 
Text 15,150,0x00000000,FXSR, FXSRlen-FXSR
Text 115,150,0x00000000,SSE, SSElen-SSE
Text 215,150,0x00000000,SSE2, SSE2len-SSE2
Text 315,150,0x00000000,SSn, SSnlen-SSn
Text 15,150,,FXSR, FXSRlen-FXSR
Text 115,150,,SSE, SSElen-SSE
Text 215,150,,SSE2, SSE2len-SSE2
Text 315,150,,SSn, SSnlen-SSn
 
Text 15,170,0x00000000,HTT, HTTnlen-HTTn
Text 115,170,0x00000000,TM, TMlen-TM
Text 215,170,0x00000000,IA64, IA64len-IA64
Text 315,170,0x00000000,PBE, PBElen-PBE
Text 15,170,,HTT, HTTnlen-HTTn
Text 115,170,,TM, TMlen-TM
Text 215,170,,IA64, IA64len-IA64
Text 315,170,,PBE, PBElen-PBE
;---------------
DrawLine 0, 410, 185,185,0x8080FF ;10
 
1820,8 → 1563,8
mov eax,$80000000
cpuid
;mov eax, $03020101  for test of reaction
test eax, 80000000h
jnz goooddd
test eax, eax
js goooddd
 
baaadd:
Text 95,235,0x00000000,NEF, NEFlen-NEF
1829,34 → 1572,34
 
goooddd:
Text 15,195,0x00000000,SS3, SS3len-SS3
Text 15,215,0x00000000,MON, MONlen-MON
Text 15,235,0x00000000,DS_CPL, DS_CPLlen-DS_CPL
Text 15,255,0x00000000,EST, ESTlen-EST
Text 15,275,0x00000000,TM2, TM2len-TM2
Text 15,295,0x00000000,VMX, VMXlen-VMX
Text 15,315,0x00000000,SVM, SVMlen-SVM
Text 15,215,,MON, MONlen-MON
Text 15,235,,DS_CPL, DS_CPLlen-DS_CPL
Text 15,255,,EST, ESTlen-EST
Text 15,275,,TM2, TM2len-TM2
Text 15,295,,VMX, VMXlen-VMX
Text 15,315,,SVM, SVMlen-SVM
 
Text 115,195,0x00000000,CNXT_ID, CNXT_IDlen-CNXT_ID
Text 115,215,0x00000000,CX16, CX16len-CX16
Text 115,235,0x00000000,ETPRD, ETPRDlen-ETPRD
Text 115,255,0x00000000,SYS, SYSlen-SYS
Text 115,275,0x00000000,LAF, LAFlen-LAF
Text 115,295,0x00000000,SSSE3, SSSE3len-SSSE3
Text 115,315,0x00000000,MCR8, MCR8len-MCR8
Text 115,195,,CNXT_ID, CNXT_IDlen-CNXT_ID
Text 115,215,,CX16, CX16len-CX16
Text 115,235,,ETPRD, ETPRDlen-ETPRD
Text 115,255,,SYS, SYSlen-SYS
Text 115,275,,LAF, LAFlen-LAF
Text 115,295,,SSSE3, SSSE3len-SSSE3
Text 115,315,,MCR8, MCR8len-MCR8
 
Text 215,195,0x00000000,MP, MPlen-MP
Text 215,215,0x00000000,NX, NXlen-NX
Text 215,235,0x00000000,MMXPi, MMXPilen-MMXPi
Text 215,255,0x00000000,MMXn, MMXnlen-MMXn
Text 215,275,0x00000000,FXSRn, FXSRnlen-FXSRn
Text 215,295,0x00000000,DCA,DCAlen-DCA
Text 215,195,,MP, MPlen-MP
Text 215,215,,NX, NXlen-NX
Text 215,235,,MMXPi, MMXPilen-MMXPi
Text 215,255,,MMXn, MMXnlen-MMXn
Text 215,275,,FXSRn, FXSRnlen-FXSRn
Text 215,295,,DCA,DCAlen-DCA
 
Text 315,195,0x00000000,FFXSR, FFXSRlen-FFXSR
Text 315,215,0x00000000,TSCP, TSCPlen-TSCP
Text 315,235,0x00000000,LM, LMlen-LM
Text 315,255,0x00000000,DNo, DNolen-DNo
Text 315,275,0x00000000,DN, DNlen-DN
Text 315,295,0x00000000,CMPL, CMPLlen-CMPL
Text 315,195,,FFXSR, FFXSRlen-FFXSR
Text 315,215,,TSCP, TSCPlen-TSCP
Text 315,235,,LM, LMlen-LM
Text 315,255,,DNo, DNolen-DNo
Text 315,275,,DN, DNlen-DN
Text 315,295,,CMPL, CMPLlen-CMPL
 
 
too:
1863,7 → 1606,7
DrawLine 0, 410, 335,335,0x8080FF ;10
 
Text 15,350,0x00000000,speed, speedlen-speed
Text 130,350,0x00000000,kbpersec, kbperseclen-kbpersec
Text 130,350,,kbpersec, kbperseclen-kbpersec
 
Number 95,350,0,5,dword [iter],0x000000; RSA test results
 
1901,17 → 1644,15
Text 130,270,0x00000000,instruct, instructlen-instruct
 
DrawLine 10, 330, 325,325,0x8080FF
DrawLine 330, 330, 275,325,0x8080FF
DrawLine 10, 10, 275,325,0x8080FF
DrawLine 10, 125, 275,275,0x8080FF
DrawLine 230, 330, 275,275,0x8080FF
DrawLine 330, 330, 275,325;,0x8080FF
DrawLine 10, 10, 275,325;,0x8080FF
DrawLine 10, 125, 275,275;,0x8080FF
DrawLine 230, 330, 275,275;,0x8080FF
 
cmp dword[smallvendor], 'cAMD'
jne cont
cmp [f], $6
jne cont
cmp [f], $6
jl cont
 
Button 240,85,69,15,3,0x030000FF ; button for rating
 
1923,32 → 1664,31
 
 
Text 15,50,0x00000000,tsum, tsumlen-tsum ;
Text 15,90,0x00000000,cpuname, cpunamelen-cpuname;
Text 255,250,0x00000000,typen, typenlen-typen;
Text 175, 50,0x00000000,tech, techlen-tech;
Text 15,90,,cpuname, cpunamelen-cpuname;
Text 255,250,,typen, typenlen-typen;
Text 175, 50,,tech, techlen-tech;
 
Number 82,50,0,4,dword [total],0x000000; MHz
Number 110,50,0,2,dword [sot],0x000000; KHz
Number 110,50,0,2,dword [sot]; KHz
 
Text 15,170,0x00000000,cache2, cache2len-cache2
Text 15,210,0x00000000,cache3, cache3len-cache3
Text 15,230,0x00000000,cache4, cache4len-cache4
Text 15,210,,cache3, cache3len-cache3
Text 15,230,,cache4, cache4len-cache4
 
 
Number 75,110,1*256,1,dword [f],0x000000 ;
Number 75,130,1*256,1,dword [m],0x000000;
Number 75,150,1*256,1,dword [s],0x000000;
Number 75,130,,,dword [m]
Number 75,150,,,dword [s]
 
Number 110,110,1*256,2,dword [ef],0x000000 ;
Number 110,130,1*256,2,dword [em],0x000000;
Number 110,110,1*256,2,dword [ef]
Number 110,130,,,dword [em]
 
Text 15,30,0x00000000,multil, multillen-multil
Text 175,30,,freql, freqllen-freql
Number 85,30,0,2,dword [multb],0x000000;
Number 105,30,0,1,dword [multa],0x000000;
 
Text 175,30,0x00000000,freql, freqllen-freql
Number 259,30,0,4,dword [freqbb],0x000000;
Number 289,30,0,2,dword [freqll],0x000000;
Number 105,30,0,1,dword [multa]
Number 259,30,0,4,dword [freqbb]
Number 289,30,0,2,dword [freqll]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Text 115,280,0x00000000,logcpus, logcpuslen-logcpus
;Number 250,280,0,2,dword [number_of_log_cpus],0x000000
1970,7 → 1710,7
Text 105, 10, 0x00000000, edi, esi
; Text 105,20,0x00000000,myname, mynamelen-myname
;-
Text 15,250,0x00000000,brandid, brandidlen-brandid
Text 15,250,,brandid, brandidlen-brandid
 
ret ;
 
1978,7 → 1718,7
mov edi, img_area
load_gif2:
gif2img esi,edi
ret
; ret
 
; DATA AREA
 
2154,22 → 1894,11
 
;-Type
 
t1:
db 'OEM'
t1len:
t1 db 'OEM',0
t2 db 'Overdrive',0
t3 db 'Dual',0
t4 db 'Unknown',0
 
t2:
db 'Overdrive'
t2len:
 
t3:
db 'Dual'
t3len:
 
t4:
db 'Unknown'
t4len:
 
;----------Intel
P50:
db 'P5 A-step'
2272,64 → 2001,26
db 'Celeron D (Presler)'
PF6clen:
;---------AMD
A50:
db 'K5 (PR75, PR90, PR100)'
A50len:
A51:
db '5k86 (PR120, PR133)'
A51len:
A52:
db '5k86 (PR166)'
A52len:
A53:
db '5k86 (PR200)'
A53len:
A56:
db 'K6'
A56len:
A57:
db 'K6'
A57len:
A58:
db 'K6-2'
A58len:
A59:
db 'K6-III'
A59len:
A5D:
db 'K6-2+ or K6-III+'
A5Dlen:
A50 db 'K5 (PR75, PR90, PR100)',0
A51 db '5k86 (PR120, PR133)',0
A52 db '5k86 (PR166)',0
A53 db '5k86 (PR200)',0
A56 db 'K6',0
A57 db 'K6',0
A58 db 'K6-2',0
A59 db 'K6-III',0
A5D db 'K6-2+ or K6-III+',0
;-------------------
At1:
db 'Athlon'
At1len:
At2:
db 'Athlon'
At2len:
At3:
db 'Duron (Spitfire)'
At3len:
At4:
db 'Athlon (Thunderbird)'
At4len:
At6:
db 'AthlonXP (Palomino)'
At6len:
At7:
db 'Duron (Morgan)'
At7len:
At8:
db 'AthlonXP (Thoroughbred)'
At8len:
At8a:
db 'Duron (Applebred)'
At8alen:
Ata:
db 'AthlonXP (Barton)'
Atalen:
Atat:
db 'AthlonXP (Thorton)'
Atatlen:
At1 db 'Athlon',0
At2 db 'Athlon',0
At3 db 'Duron (Spitfire)',0
At4 db 'Athlon (Thunderbird)',0
At6 db 'AthlonXP (Palomino)',0
At7 db 'Duron (Morgan)',0
At8 db 'AthlonXP (Thoroughbred)',0
At8a db 'Duron (Applebred)',0
Ata db 'AthlonXP (Barton)',0
Atat db 'AthlonXP (Thorton)',0
;-------------------
AF1:
db 'Dual-core Opteron'
2432,7 → 2123,6
coppercoeff db 50, 30, 40, 20, 55, 35, 45, 25, 35, 70, 80, 60, 20, 75, 15, 65, 90, 110, 120, 20, 95, 115, 85, 25, 35, 70, 80, 100, 20, 75, 15, 105
tualatcoeff db 120, 35, 35, 40, 55, 35, 115, 35, 160, 70, 80, 60, 40, 75, 35, 65, 90, 110, 35, 35, 95, 35, 85, 35, 35, 35, 130, 100, 140, 35, 150, 105
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; include images and unpacking- and hasharea
2450,6 → 2140,28
 
I_END:
 
; RSA test data
align 4
num1 rd 40
num2 rd 40
num3 rd 40
iter rd 1
openkey rd 1
 
; GIF unpacker data
globalColor dd ?
img_count dd ?
cur_info dd ? ; image table pointer
codesize dd ?
compsize dd ?
bit_count dd ?
CC dd ?
EOI dd ?
Palette dd ?
block_ofs dd ?
table_ptr dd ?
 
 
ost dd ?
sot dd ?
f dd ?
2470,7 → 2182,6
L2 dd ?
L3 dd ?
micron dd ?
sse3sup dd ?
brand dd ?
 
ram_size_a dd ?
2481,8 → 2192,8
 
FRS dd ?
freqsel db ?
sse3sup db ?
 
temp dd ?
freqbb dd ?
freqll dd ?
 
/programs/system/cpuid/trunk/brand.inc
19,14 → 19,13
cpuid
 
cnnn0:
cmp bl, 00h
ja rr
je cnnn1
test bl, bl
jz cnnn1
 
rr:
mov byte [brand], bl ;
Text 60,250,0x00000000,abrand00, abrand00len-abrand00
jmp B000
ret
;jmp comppp
 
cnnn1:
34,245 → 33,222
mov eax, 0x80000001 ; CPUID ext. function 0x80000001
cpuid
 
cmp ebx, 0
test ebx, ebx
je Bi00
mov word [brand], bx ;
mov [brand], ebx ;
 
comppp:
cmp [brand], 400h
jl res1
cmp [brand], 500h
jl res2
jae res3
cmp byte [brand+1], 4
jb res1
jz res2
ja res3
 
 
res1:
Text 60,250,0x00000000,abrand0, abrand0len-abrand0
jmp B000
ret
 
res2:
Text 60,250,0x00000000,abrand1, abrand1len-abrand1
jmp B000
ret
 
res3:
Text 60,250,0x00000000,abrand2, abrand2len-abrand2
jmp B000
ret
;;;;;;;;;;;;;;;;;;;;; intel brand
intel_br:
xor eax,eax
inc eax
cpuid
movzx ebx, bl
mov [brand], ebx
cmp0:
cmp bl, 00h
test ebx, ebx
je Bi00
 
cmp1:
cmp bl, 01h
dec ebx
je Bi01
 
cmp2:
cmp bl, 02h
dec ebx
je Bi02
 
cmp3:
cmp bl, 03h
dec ebx
je Bi03
 
cmp4:
cmp bl, 04h
dec ebx
je Bi04
 
cmp6:
cmp bl, 06h
dec ebx
dec ebx
je Bi06
 
cmp7:
cmp bl, 07h
dec ebx
je Bi07
 
cmp8:
cmp bl, 08h
dec ebx
je Bi08
 
cmp9:
cmp bl, 09h
dec ebx
je Bi09
 
cmpA:
cmp bl, 0Ah
dec ebx
je Bi0A
 
cmpB:
cmp bl, 0Bh
dec ebx
je Bi0B
 
cmpC:
cmp bl, 0Ch
dec ebx
je Bi0C
 
cmpE:
cmp bl, 0Eh
dec ebx
dec ebx
je Bi0E
 
cmpF:
cmp bl, 0Fh
dec ebx
je Bi0F
 
cmp11:
cmp bl, 11h
dec ebx
dec ebx
je Bi11
 
cmp12:
cmp bl, 12h
dec ebx
je Bi12
 
cmp13:
cmp bl, 13h
dec ebx
je Bi13
 
cmp14:
cmp bl, 14h
dec ebx
je Bi14
 
cmp15:
cmp bl, 15h
dec ebx
je Bi15
 
cmp16:
cmp bl, 16h
dec ebx
je Bi16
 
cmp17:
cmp bl, 17h
dec ebx
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
ret
 
Bi01:
mov [brand], 01h
Text 60,250,0x00000000,brand01, brand01len-brand01
jmp B000
ret
 
Bi02:
mov [brand], 02h
Text 60,250,0x00000000,brand02, brand02len-brand02
jmp B000
ret
 
Bi03:
mov [brand], 03h
 
cmp [m], 8
je E3
Text 60,250,0x00000000,brand03, brand03len-brand03
jmp B000
ret
E3:
Text 60,250,0x00000000,brand03d, brand03dlen-brand03d
jmp B000
ret
 
Bi04:
mov [brand], 04h
Text 60,250,0x00000000,brand04, brand04len-brand04
jmp B000
ret
 
Bi06:
mov [brand], 06h
Text 60,250,0x00000000,brand06, brand06len-brand06
jmp B000
ret
 
Bi07:
mov [brand], 07h
Text 60,250,0x00000000,brand07, brand07len-brand07
jmp B000
ret
 
Bi08:
mov [brand], 08h
Text 60,250,0x00000000,brand08, brand08len-brand08
jmp B000
ret
 
Bi09:
mov [brand], 09h
Text 60,250,0x00000000,brand09, brand09len-brand09
jmp B000
ret
 
Bi0A:
mov [brand], 0Ah
Text 60,250,0x00000000,brand0A, brand0Alen-brand0A
jmp B000
ret
 
Bi0B:
mov [brand], 0Bh
 
cmp [m], 13
jl Eb
Text 60,250,0x00000000,brand0B, brand0Blen-brand0B
jmp B000
ret
Eb:
Text 60,250,0x00000000,brand0Bd, brand0Bdlen-brand0Bd
jmp B000
ret
 
Bi0C:
mov [brand], 0Ch
Text 60,250,0x00000000,brand0C, brand0Clen-brand0C
jmp B000
ret
 
Bi0E:
mov [brand], 0Eh
 
cmp [m], 13
jl Ed
Text 60,250,0x00000000,brand0E, brand0Elen-brand0E
jmp B000
ret
Ed:
Text 60,250,0x00000000,brand0Ed, brand0Edlen-brand0Ed
jmp B000
ret
 
Bi0F:
mov [brand], 0Fh
Text 60,250,0x00000000,brand0F, brand0Flen-brand0F
jmp B000
ret
 
Bi11:
mov [brand], 11h
Text 60,250,0x00000000,brand11, brand11len-brand11
jmp B000
ret
 
Bi12:
mov [brand], 12h
Text 60,250,0x00000000,brand12, brand12len-brand12
jmp B000
ret
 
Bi13:
mov [brand], 13h
Text 60,250,0x00000000,brand13, brand13len-brand13
jmp B000
ret
 
Bi14:
mov [brand], 14h
Text 60,250,0x00000000,brand14, brand14len-brand14
jmp B000
ret
 
Bi15:
mov [brand], 15h
Text 60,250,0x00000000,brand15, brand15len-brand15
jmp B000
ret
 
Bi16:
mov [brand], 16h
Text 60,250,0x00000000,brand16, brand16len-brand16
jmp B000
ret
 
Bi17:
mov [brand], 17h
Text 60,250,0x00000000,brand17, brand17len-brand17
jmp B000
 
B000:
 
ret
ret
/programs/system/cpuid/trunk/caches.inc
1,6 → 1,15
; Decoding cache L1,L2,L3 for Intel
 
decodecache32:
call decodecache
 
decodecache24:
shr eax, 8
call decodecache
shr eax, 8
call decodecache
shr eax, 8
 
decodecache:
 
comp0:
61,113 → 70,91
comp11:
cmp al, 0Ah
je kk11
je Ld8
 
comp12:
cmp al, 66h
je kk12
je Ld8
 
comp13:
cmp al, 0Ch
je kk13
je Ld16
 
comp14:
cmp al, 10h
je kk14
je Ld16
 
comp15:
cmp al, 67h
je kk15
je Ld16
 
comp16:
cmp al, 2Ch
je kk16
je Ld32
 
comp17:
cmp al, 68h
je kk17
je Ld32
 
;-------L2
comp18:
cmp al, 39h
je kk18
je L128
 
comp19:
cmp al, 3Bh
je kk19
je L128
 
comp20:
cmp al, 79h
je kk20
je L128
 
comp21:
cmp al, 81h
je kk21
je L128
 
comp22:
cmp al, 3Ch
je kk22
je L256
 
comp23:
cmp al, 7Ah
je kk23
je L256
 
comp24:
cmp al, 7Eh
je kk24
je L256
 
comp25:
cmp al, 82h
je kk25
je L256
 
comp26:
cmp al, 7Bh
je kk26
je L512
 
comp27:
cmp al, 83h
je kk27
je L512
 
comp28:
cmp al, 86h
je kk28
je L512
 
comp29:
cmp al, 7Ch
je kk29
je L1024
 
comp30:
cmp al, 84h
je kk30
je L1024
 
comp31:
cmp al, 87h
je kk31
je L1024
 
comp32:
cmp al, 85h
je kk32
je L2048
 
;-----L1 Trace instr
 
174,17 → 161,14
comp33:
cmp al, 70h
je kk33
je Li12
 
comp34:
cmp al, 71h
je kk34
je Li16
 
comp35:
cmp al, 72h
je kk35
je Li32
 
;----New codes
 
191,126 → 175,102
comp36:
cmp al, 60h
je kk36
je Ld16
 
comp37:
cmp al, 78h
je kk37
je L1024
 
comp38:
cmp al, 7Dh
je kk38
je L2048
 
;---- L3
comp39:
cmp al, 22h
je kk39
je L305
 
comp40:
cmp al, 23h
je kk40
je L31
 
comp41:
cmp al, 25h
je kk41
je L32
 
comp42:
cmp al, 29h
je kk42
je L34
 
comp43:
cmp al, 88h
je kk43
je L32
 
comp44:
cmp al, 89h
je kk44
je L34
 
comp45:
cmp al, 8Ah
je kk45
je L38
 
comp46:
cmp al, 8Dh
je kk46
je L34
 
;============= v. 2.04
comp47:
cmp al, 73h
je kk47
je Li64
 
comp48:
cmp al, 1Ah
je kk48
je L96
 
comp49:
cmp al, 3Ah
je kk49
je L192
 
comp50:
cmp al, 3Dh
je kk50
je L384
 
comp51:
cmp al, 3Eh
je kk51
je L512
 
comp52:
cmp al, 7Fh
je kk52
je L512
 
comp53:
cmp al, 46h
je kk53
je L34
 
comp54:
cmp al, 47h
je kk54
je L38
 
comp55:
cmp al, 49h
je kk55
je L34
 
comp56:
cmp al, 4Ah
je kk56
je L36
 
comp57:
cmp al, 4Bh
je kk57
je L38
 
comp58:
cmp al, 4Ch
je kk58
je L312
 
comp59:
cmp al, 4Dh
je kk59
je L316
 
jne L000
ret
;------------------
 
kk1:
708,9 → 668,9
 
L316:
mov [L3], 16384
jmp L000
;jmp L000
 
 
 
L000:
ret
ret
/programs/system/cpuid/trunk/draw.inc
2,15 → 2,11
 
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
__mov ebx,xStart,xSize
__mov ecx,yStart,ySize
__mov edx,bColor
__mov esi,gColor
__mov edi,fColor
xor eax,eax
mcall
}
19,12 → 15,10
;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 ebx,xStart,yStart
__mov ecx,rgbColor
__mov edx,pText
__mov esi,nTextLen
mov eax,4
mcall
}
32,15 → 26,10
;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 edx,xStart,yStart
__mov ebx,noOfDigits,nPrintType
__mov ecx,Data
__mov esi,rgbColor
mov eax,47
mcall
}
47,13 → 36,9
 
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 ebx,xStart,xEnd
__mov ecx,yStart,yEnd
__mov edx,rgbColor
mov eax,38
mcall
}
60,13 → 45,9
 
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 ecx,xImage,yImage
__mov edx,xPos,yPos
__mov ebx,pImage
mov eax,7
mcall
}
73,14 → 54,10
 
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 ebx,xStart,xSize
__mov ecx,yStart,ySize
__mov edx,nID
__mov esi,rgbColor
mov eax,8
mcall
}
/programs/system/cpuid/trunk/features.inc
68,7 → 68,31
SVM_FLAG equ 0004h ; secure virtual machine 2
MOVCR8_FLAG equ 0010h ;AltMovCr8 4
 
;//////////////////////////////////////////////
decode_sse3: ; is SS3 supported
xor eax, eax
inc eax
cpuid
test ecx, 1
setnz [sse3sup]
mov eax, sse3+6
 
write_yes_no:
mov dword [eax], 'no'
jz @f
mov dword [eax], 'yes'
@@:
ret
 
show_next_bit:
shr edx, 1
write_yes_no_cf:
mov dword [eax], 'no'
jnc @f
mov dword [eax], 'yes'
@@:
ret
 
;decoding standard features
 
decode_standard_features:
77,668 → 101,230
inc eax
cpuid
 
Test0:
test edx, FPU_FLAG
jnz Test0e
mov eax, FPU+6
call show_next_bit
 
mov dword [FPU+6], $6F6E
jmp Test1
mov eax, VME+7
call show_next_bit
 
Test0e:
mov dword [FPU+6], $736579
mov eax, DE+7
call show_next_bit
 
;;;;;;
Test1:
test edx, VME_FLAG
jnz Test1e
mov eax, PSE+8
call show_next_bit
 
mov dword [VME+ 7], $6F6E
jmp Test2
mov eax, TSC+6
call show_next_bit
 
Test1e:
mov dword [VME+ 7], $736579
mov eax, MSR+7
call show_next_bit
 
;;;;;;
Test2:
test edx, DE_FLAG
jnz Test2e
mov eax, PAE+7
call show_next_bit
 
mov dword [DE+ 7], $6F6E
jmp Test3
mov eax, MCE+8
call show_next_bit
 
Test2e:
mov dword [DE+ 7], $736579
;;;;;;
mov eax, CX8+6
call show_next_bit
 
Test3:
test edx, PSE_FLAG
jnz Test3e
mov eax, APIC+7
call show_next_bit
 
mov dword [PSE+ 8], $6F6E
jmp Test4
shr edx, 1 ; skip reserved bit
 
Test3e:
mov dword [PSE+ 8], $736579
mov eax, SEP+8
call show_next_bit
 
;;;;
Test4:
test edx, TSC_FLAG
jnz Test4e
mov eax, MTRR+6
call show_next_bit
 
mov dword [TSC+ 6], $6F6E
jmp Test5
mov eax, PGE+7
call show_next_bit
 
Test4e:
mov dword [TSC+ 6], $736579
mov eax, MCA+7
call show_next_bit
 
;;;;
Test5:
test edx, MSR_FLAG
jnz Test5e
mov eax, CMOV+8
call show_next_bit
 
mov dword [MSR+ 7], $6F6E
jmp Test6
mov eax, PAT+6
call show_next_bit
 
Test5e:
mov dword [MSR+ 7], $736579
mov eax, PSE36+7
call show_next_bit
 
;;;;
Test6:
test edx, PAE_FLAG
jnz Test6e
mov eax, PSNUM+7
call show_next_bit
 
mov dword [PAE+ 7], $6F6E
jmp Test7
mov eax, CLFLUSHn+8
call show_next_bit
 
Test6e:
mov dword [PAE+ 7], $736579
shr edx, 1 ; skip reserved bit
 
;;;;
Test7:
test edx, MCE_FLAG
jnz Test7e
mov eax, DTS+7
call show_next_bit
 
mov dword [MCE+ 8], $6F6E
jmp Test8
mov eax, ACPI+7
call show_next_bit
 
Test7e:
mov dword [MCE+ 8], $736579
mov eax, MMX+8
call show_next_bit
mov eax, [eax]
mov [MMXs+7], eax
 
;;;;
Test8:
test edx, CX8_FLAG
jnz Test8e
mov eax, FXSR+6
call show_next_bit
 
mov dword [CX8+ 6], $6F6E
jmp Test9
mov eax, SSE+7
call show_next_bit
 
Test8e:
mov dword [CX8+ 6], $736579
;;;;
mov eax, SSE2+7
call show_next_bit
 
Test9:
test edx, APIC_FLAG
jnz Test9e
mov eax, SSn+8
call show_next_bit
 
mov dword [APIC+ 7], $6F6E
jmp Test11
 
Test9e:
mov dword [APIC+ 7], $736579
;;;;;
 
Test11:
test edx, SEP_FLAG
jnz Test11e
 
mov dword [SEP+ 8], $6F6E
jmp Test12
 
Test11e:
mov dword [SEP+ 8], $736579
;;;;
 
Test12:
test edx, MTRR_FLAG
jnz Test12e
 
mov dword [MTRR+ 6], $6F6E
jmp Test13
 
Test12e:
mov dword [MTRR+ 6], $736579
;;;;
 
Test13:
test edx, PGE_FLAG
jnz Test13e
 
mov dword [PGE+ 7], $6F6E
jmp Test14
 
Test13e:
mov dword [PGE+ 7], $736579
;;;;;
 
Test14:
test edx, MCA_FLAG
jnz Test14e
 
mov dword [MCA+ 7], $6F6E
jmp Test15
 
Test14e:
mov dword [MCA+ 7], $736579
;;;;
 
Test15:
test edx, CMOV_FLAG
jnz Test15e
 
mov dword [CMOV+ 8], $6F6E
jmp Test16
 
Test15e:
mov dword [CMOV+ 8], $736579
;;;;
 
Test16:
test edx, PAT_FLAG
jnz Test16e
 
mov dword [PAT+ 6], $6F6E
jmp Test17
 
Test16e:
mov dword [PAT+ 6], $736579
;;;;
 
Test17:
test edx, PSE36_FLAG
jnz Test17e
 
mov dword [PSE36+ 7], $6F6E
jmp Test18
 
Test17e:
mov dword [PSE36+ 7], $736579
;;;;
 
Test18:
test edx, PSNUM_FLAG
jnz Test18e
 
mov dword [PSNUM+ 7], $6F6E
jmp Test19
 
Test18e:
mov dword [PSNUM+ 7], $736579
;;;;
 
Test19:
test edx, CLFLUSH_FLAG
jnz Test19e
 
mov dword [CLFLUSHn + 8], $6F6E
jmp Test21
 
Test19e:
mov dword [CLFLUSHn + 8], $736579
;;;;
 
Test21:
test edx, DTS_FLAG
jnz Test21e
 
mov dword [DTS+ 7], $6F6E
jmp Test22
 
Test21e:
mov dword [DTS+ 7], $736579
;;;;
 
Test22:
test edx, ACPI_FLAG
jnz Test22e
 
mov dword [ACPI+ 7], $6F6E
jmp Test23
 
Test22e:
mov dword [ACPI+ 7], $736579
;;;;;
 
Test23:
test edx, MMX_FLAG
jnz Test23e
 
mov dword [MMX+ 8], $6F6E
mov dword [MMXs+ 7], $6F6E
jmp Test24
 
Test23e:
mov dword [MMX+ 8], $736579
mov dword [MMXs+ 7], $736579
;;;;;
 
Test24:
test edx, FXSR_FLAG
jnz Test24e
 
mov dword [FXSR+ 6], $6F6E
jmp Test25
 
Test24e:
mov dword [FXSR+ 6], $736579
;;;;;
 
Test25:
test edx, SSE_FLAG
jnz Test25e
 
mov dword [SSE+ 7], $6F6E
jmp Test26
 
Test25e:
mov dword [SSE+ 7], $736579
 
;;;;
Test26:
test edx, SSE2_FLAG
jnz Test26e
 
mov dword [SSE2+ 7], $6F6E
jmp Test27
 
Test26e:
mov dword [SSE2+ 7], $736579
 
;;;;
 
Test27:
test edx, SS_FLAG
jnz Test27e
 
mov dword [SSn+ 8], $6F6E
jmp Test29;28
 
Test27e:
mov dword [SSn+ 8], $736579
 
;;;;
 
;Test28:
shr edx, 1
; mov eax, HTT+8
;test edx, HTT_FLAG
;jnz Test28e
;
;mov dword [HTT+ 8], $6F6E
;jmp Test29
;
;Test28e:
;mov dword [HTT+ 8], $736579
; call write_yes_no
 
;;;;
mov eax, TM+7
call show_next_bit
 
Test29:
test edx, TM_FLAG
jnz Test29e
mov eax, IA64+7
call show_next_bit
 
mov dword [TM+ 7], $6F6E
jmp Test30
mov eax, PBE+8
call show_next_bit
 
Test29e:
mov dword [TM+ 7], $736579
 
;;;;
 
Test30:
test edx, IA64_FLAG
jnz Test30e
 
mov dword [IA64+ 7], $6F6E
jmp Test31
 
Test30e:
mov dword [IA64+ 7], $736579
 
;;;;
Test31:
test edx, PBE_FLAG
jnz Test31e
 
mov dword [PBE+ 8], $6F6E
jmp Standart_out
 
Test31e:
mov dword [PBE+ 8], $736579
 
Standart_out:
 
ret
;//////////////////////////////////////////////
decode_sse3: ; is SS3 supported
xor eax,eax
inc eax
cpuid
test ecx, $1 ; Test bit 1
jnz .EX; SSE3 technology is supported
jz .EXN
 
.EX:
mov dword [sse3+ 6], $736579
mov [sse3sup], 1
jmp exitter
.EXN:
mov dword [sse3+ 6], $6F6E
mov [sse3sup],0
 
exitter:
 
ret
;//////////////////////////////////////////////
decode_extended_features:
xor eax,eax
inc eax
cpuid
Tes1:
; is called immediately after decode_standard_features
; xor eax, eax
; inc eax
; cpuid
 
mov eax, SS3+8
test ecx, SSE3_FLAG
jnz Tes1e
call write_yes_no
 
mov dword [SS3+ 8], $6F6E
jmp Tes2
 
Tes1e:
mov dword [SS3+ 8], $736579
 
 
Tes2:
mov eax, MON+8
test ecx, MON_FLAG
jnz Tes2e
call write_yes_no
 
mov dword [MON+ 8], $6F6E
jmp Tes3
 
Tes2e:
mov dword [MON+ 8], $736579
 
 
Tes3:
mov eax, DS_CPL+8
test ecx, DS_CPL_FLAG
jnz Tes3e
call write_yes_no
 
mov dword [DS_CPL+ 8], $6F6E
jmp Tes4
 
Tes3e:
mov dword [DS_CPL+ 8], $736579
 
Tes4:
mov eax, EST+8
test ecx, EST_FLAG
jnz Tes4e
call write_yes_no
 
mov dword [EST+ 8], $6F6E
jmp Tes5
 
Tes4e:
mov dword [EST+ 8], $736579
 
 
Tes5:
mov eax, TM2+8
test ecx, TM2_FLAG
jnz Tes5e
call write_yes_no
 
mov dword [TM2+ 8], $6F6E
jmp Tes6
 
Tes5e:
mov dword [TM2+ 8], $736579
 
 
Tes6:
mov eax, CNXT_ID+12
test ecx, CNXT_ID_FLAG
jnz Tes6e
call write_yes_no
 
mov dword [CNXT_ID+ 12], $6F6E
jmp Tes7
 
Tes6e:
mov dword [CNXT_ID+ 12], $736579
 
 
Tes7:
mov eax, CX16+12
test ecx, CX16_FLAG
jnz Tes7e
call write_yes_no
 
mov dword [CX16+ 12], $6F6E
jmp Tes8
 
Tes7e:
mov dword [CX16+ 12], $736579
 
 
Tes8:
mov eax, ETPRD+12
test ecx, ETPRD_FLAG
jnz Tes8e
call write_yes_no
 
mov dword [ETPRD+ 12], $6F6E
jmp Tes9
 
Tes8e:
mov dword [ETPRD+ 12], $736579
 
Tes9:
mov eax, VMX+8
test ecx, VMX_FLAG
jnz Tes9e
call write_yes_no
 
mov dword [VMX+ 8], $6F6E
jmp Tes10
 
Tes9e:
mov dword [VMX+ 8], $736579
 
Tes10:
mov eax, SSSE3+12
test ecx, SSSE3_FLAG
jnz Tes10e
call write_yes_no
 
mov dword [SSSE3+ 12], $6F6E
jmp Tes11
 
Tes10e:
mov dword [SSSE3+ 12], $736579
 
Tes11:
mov eax, DCA+8
test ecx, DCA_FLAG
jnz Tes11e
 
mov dword [DCA+ 8], $6F6E
jmp Tes12
 
Tes11e:
mov dword [DCA+ 8], $736579
 
Tes12:
 
 
call write_yes_no
@@:
ret
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
decode_extended:
xor eax, eax
mov eax,$80000000
cpuid
mov [extc], eax ; max number of calls
test eax, eax
jns @b
 
test eax, 80000000h
jnz gooodd
 
jmp baaad
 
baaad:
 
 
jmp Tez13
 
gooodd:
xor eax, eax
mov eax, $80000001 ;// Setup extended function 8000_0001h
cpuid
 
Tez1:
mov eax, MP+8
test edx, MP_FLAG
jnz Tez1e
call write_yes_no
 
mov dword [MP+8], $6F6E
jmp Tez2
 
Tez1e:
mov dword [MP+ 8], $736579
 
Tez2:
mov eax, NX+8
test edx, NX_FLAG
jnz Tez2e
call write_yes_no
 
mov dword [NX+ 8], $6F6E
jmp Tez4
;jmp Tez3 we do detection in another place, because of Cyrix specific MMX+ detection
 
Tez2e:
mov dword [NX+ 8], $736579
 
;Tez3:
; mov eax, MMXPi+8
;test edx, MMXPi_FLAG
;jnz Tez3e
; call write_yes_no
 
;mov dword [MMXPi+ 8], $6F6E
;jmp Tez4
 
 
;Tez3e:
;mov dword [MMXPi+ 8], $736579
 
Tez4:
mov eax, MMXn+8
test edx, MMXn_FLAG
jnz Tez4e
call write_yes_no
 
mov dword [MMXn+ 8], $6F6E
jmp Tez5
 
Tez4e:
mov dword [MMXn+ 8], $736579
 
Tez5:
mov eax, FXSRn+8
test edx, FXSRn_FLAG
jnz Tez5e
call write_yes_no
 
mov dword [FXSRn+ 8], $6F6E
jmp Tez6
 
Tez5e:
mov dword [FXSRn+ 8], $736579
 
Tez6:
mov eax, FFXSR+12
test edx, FFXSR_FLAG
jnz Tez6e
call write_yes_no
 
mov dword [FFXSR+ 12], $6F6E
jmp Tez7
 
Tez6e:
mov dword [FFXSR+ 12], $736579
 
Tez7:
mov eax, TSCP+12
test edx, TSCP_FLAG
jnz Tez7e
call write_yes_no
 
mov dword [TSCP+ 12], $6F6E
jmp Tez8
 
Tez7e:
mov dword [TSCP+ 12], $736579
 
 
Tez8:
mov eax, LM+12
test edx, LM_FLAG
jnz Tez8e
call write_yes_no
 
mov dword [LM+ 12], $6F6E
jmp Tez9
 
Tez8e:
mov dword [LM+ 12], $736579
 
Tez9:
mov eax, DNo+12
test edx, DNo_FLAG
jnz Tez9e
call write_yes_no
 
mov dword [DNo+ 12], $6F6E
jmp Tez10
 
Tez9e:
mov dword [DNo+ 12], $736579
 
 
Tez10:
mov eax, DN+12
test edx, DN_FLAG
jnz Tez10e
call write_yes_no
 
mov dword [DN+ 12], $6F6E
jmp Tez11
 
Tez10e:
mov dword [DN+ 12], $736579
 
;Intel
 
Tez11:
mov eax, SYS+12
test edx, SYS_FLAG
jnz Tez11e
call write_yes_no
 
mov dword [SYS+ 12], $6F6E
jmp Tez12
 
Tez11e:
mov dword [SYS+ 12], $736579
 
 
Tez12:
mov eax, LAF+12
test ecx, LAHF_FLAG
jnz Tez12e
call write_yes_no
 
mov dword [LAF+ 12], $6F6E
jmp Tez13
 
Tez12e:
mov dword [LAF+ 12], $736579
 
Tez13:
mov eax, CMPL+12
test ecx, CMPL_FLAG
jnz Tez13e
call write_yes_no
 
mov dword [CMPL+ 12], $6F6E
jmp Tez14
 
Tez13e:
mov dword [CMPL+ 12], $736579
 
Tez14:
mov eax, SVM+8
test ecx, SVM_FLAG
jnz Tez14e
call write_yes_no
 
mov dword [SVM+ 8], $6F6E
jmp Tez15
 
Tez14e:
mov dword [SVM+ 8], $736579
 
Tez15:
mov eax, MCR8+12
test ecx, MOVCR8_FLAG
jnz Tez15e
call write_yes_no
 
mov dword [MCR8+ 12], $6F6E
jmp Tez16
 
Tez15e:
mov dword [MCR8+ 12], $736579
 
Tez16:
 
ret
ret
/programs/system/cpuid/trunk/gif2img.inc
4,9 → 4,9
macro gif2img gifsrc,imgsrc
{
local hasharea, ReadGIF, nextblock,_null
local globalColor, img_count, cur_info, img_start
local codesize, compsize, bit_count, CC, EOI, Palette
local block_ofs, table_ptr, gifmacend
;local globalColor, img_count, cur_info, img_start
;local codesize, compsize, bit_count, CC, EOI, Palette
;local block_ofs, table_ptr, gifmacend
local no_gc, block_skip, no_comm, noextblock, uselocal
local setPal, filltable, reinit, cycle, zadd, noinc
local notintable, er, zend, nxt, continue, ex, Gif_skipmap
29,7 → 29,7
end if
 
call ReadGIF
jmp gifmacend
ret
 
if defined gif_hash_offset
else
46,7 → 46,7
mov [img_count],eax
inc eax
cmp dword[esi],'GIF8'
jne er ; signature
jne ex ; signature
mov ecx,[esi+0xa]
inc eax
add esi,0xd
81,7 → 81,7
jmp block_skip
noextblock:
cmp byte[edi],0x2c ; image beginning
jne er
jne ex
inc [img_count]
inc edi
mov esi,[cur_info]
137,7 → 137,6
inc eax
loop filltable
pop edi
mov [img_start],edi
reinit:
mov edx,[EOI]
inc edx
180,9 → 179,6
call Gif_output
pop ebx eax
jmp zadd
er:
pop edi
jmp ex
zend:
; mov eax,[.cur_info] ; skip offset to next frame
; mov [eax],edi
197,8 → 193,6
continue:
; cmp byte[edi],0x3b ;read next frame
; jne nextblock
xor eax,eax
stosd
mov ecx,[img_count]
ex:
pop edi esi
283,18 → 277,6
pop edx eax esi
ret
 
globalColor dd 1
img_count dd 1
cur_info dd 1 ; image table pointer
img_start dd 1
codesize dd 1
compsize dd 1
bit_count dd 1
CC dd 1
EOI dd 1
Palette dd 1
block_ofs dd 1
table_ptr dd 1
 
gifmacend:
}
/programs/system/cpuid/trunk/logos.inc
1,29 → 1,20
amd:
file 'amd.gif' ;include gif file
rb 50 ;50 bytes temp back zone
 
cyrix:
file 'cyrix.gif' ;include gif file
rb 50 ;50 bytes temp back zone
 
idt:
file 'idt.gif' ;include gif file
rb 50 ;50 bytes temp back zone
 
intel:
file 'intel.gif' ;include gif file
rb 50 ;50 bytes temp back zone
 
transmeta:
file 'transmet.gif' ;include gif file
rb 50 ;50 bytes temp back zone
 
via:
file 'via.gif' ;include gif file
rb 50 ;50 bytes temp back zone
 
knopka:
file 'knopka.gif' ;include gif file
rb 50 ;50 bytes temp back zone
 
 
/programs/system/cpuid/trunk/rsatest.inc
596,9 → 596,3
;p=1042128803351525332193283695592003066548124262686459610611886292768993621049491
;q=1273712981880077616387281148672409277231717442781838063285512054053473668300963
;n=1327372985619988354987062708438042005329282516404896732667039640816200186465366322016844458439816997285872910403676793109807015096535910981266920474905959833
 
num1 rd 40
num2 rd 40
num3 rd 40
iter rd 1
openkey rd 1
/programs/system/panel/trunk/@PANEL.ASM
172,8 → 172,8
mov eax, 9
jb .fill
mov [alt_tab_list_size], edx
cmp edx, 2
jb begin_1.ret
test edx, edx
jz begin_1.ret
mcall 66,4,0,0 ; «®¢¨¬ ¬®¬¥­â ®â¯ã᪠­¨ï ¢á¥å ã¯à ¢«ïîé¨å ª« ¢¨è
test eax, eax
jnz begin_1.ret
/programs/system/rdsave/trunk/rdsave.asm
25,8 → 25,10
dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
dd 0x0 ; § à¥§¥à¢¨à®¢ ­®
 
include '..\..\..\develop\examples\editbox\trunk\editbox.inc'
include '..\..\develop\editbox\editbox.inc'
use_edit_box procinfo,22,5
al equ eax ; \ decrease kpack'ed size
purge mov ; /
 
;---------------------------------------------------------------------
;--- €—€‹Ž Žƒ€ŒŒ› ----------------------------------------------
44,9 → 46,7
;---------------------------------------------------------------------
 
still:
push 10
pop eax
mcall
mcall 10
 
dec eax ; ¯¥à¥à¨á®¢ âì ®ª­®?
jz red ; ¥á«¨ ¤  - ­  ¬¥âªã red
56,7 → 56,7
jz button
 
mouse:
mouse_edit_boxes editbox,editbox_end
mouse_edit_box editbox
jmp still
button:
69,38 → 69,26
mcall
 
noclose:
push eax
call clear_err
pop eax
push 16
xor ebx, ebx
inc ebx ; 16.1 = save to /FD/1
cmp ah,2
jne path_2
call clear_err
mov al,16
mov ebx,1
mcall
call check_for_error
jmp still
path_2:
je doit
inc ebx ; 16.2 = save to /FD/2
cmp ah,3
jne path_3
call clear_err
mov al,16
mov ebx,2
mcall
call check_for_error
jmp still
path_3:
je doit
pop ebx
push 18
mov bl, 6 ; 18.6 = save to specified folder
mov ecx, path3
cmp ah,4
jne path_4
call clear_err
mov al,18
mov ebx,6
mov ecx,path3
mcall
call check_for_error
jmp still
path_4:
call clear_err
mov eax,18
mov ebx,6
je doit
mov ecx,path4
doit:
pop eax
mcall
call check_for_error
jmp still
108,56 → 96,39
key:
mov al,2
mcall
key_edit_boxes editbox,editbox_end
key_edit_box editbox
jmp still
 
 
check_for_error: ;Ž¡à ¡®â稪 ®è¨¡®ª
cmp eax,0
jne err1
mov ecx,[sc.work_text]
mov edx,ok
jmp print
err1:
cmp eax,1
jne err3
test eax, eax
jz print
mov ecx,0xdd2222
mov edx,error11
jmp print
err3:
cmp eax,3
jne err5
mov ecx,0xdd2222
mov edx,error3
jmp print
err5:
cmp eax,5
jne err8
mov ecx,0xdd2222
mov edx,error5
jmp print
err8:
cmp eax,8
jne err9
mov ecx,0xdd2222
mov edx,error8
jmp print
err9:
cmp eax,9
jne err10
mov ecx,0xdd2222
mov edx,error9
jmp print
err10:
cmp eax,10
jne err11
mov ecx,0xdd2222
mov edx,error10
jmp print
err11:
mov ecx,0xdd2222
mov edx,error11
jmp print
add edx, error3 - ok
dec eax
dec eax
jz print
add edx, error5 - error3
dec eax
dec eax
jz print
add edx, error8 - error5
dec eax
dec eax
dec eax
jz print
add edx, error9 - error8
dec eax
jz print
add edx, error10 - error9
dec eax
jz print
add edx, error11 - error10
dec eax
jz print
add edx, aUnknownError - error11
 
print:
mov eax,4 ;­ ¤¯¨á¨
167,7 → 138,7
ret
 
clear_err:
mov al,13
mov eax,13
mov ebx,15 shl 16 + 240
mov ecx,145 shl 16 +15
mov edx,[sc.work]
199,7 → 170,7
mov edi,title ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ€
mcall
 
draw_edit_boxes editbox,editbox_end,use_f9,procinfo ;à¨á®¢ ­¨¥ edit box'®¢
draw_edit_box editbox,use_f9,procinfo ;à¨á®¢ ­¨¥ edit box'®¢
 
mov al,13 ;®âà¨á®¢ª  ⥭¥© ª­®¯®ª
mov ebx,194 shl 16 + 60
306,6 → 277,7
error9 db '’ ¡«¨æ  FAT à §àã襭 ',0
error10 db '„®áâ㯠§ ¯à¥é¥­',0
error11 db 'Žè¨¡ª  ãáâனá⢠',0
aUnknownError db '¥¨§¢¥áâ­ ï ®è¨¡ª ',0
 
else
save db ' Save',0
319,6 → 291,7
error9 db 'FAT table corrupted',0
error10 db 'Access denied',0
error11 db 'Device error',0
aUnknownError db 'Unknown error',0
 
end if
 
/programs/system/ss/trunk/@SS.ASM
0,0 → 1,501
; SCREENSAVER APPLICATION by lisovin@26.ru
;
; Compile with FASM for Menuet
;
use32
org 0x0
 
used_memory = 0x10000
 
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd used_memory ; memory for app
dd used_memory ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include '..\..\..\macros.inc'
purge mov ; decrease kpack'ed size
 
;include 'debug.inc'
 
START:
mov eax,40 ; ãáâ ­®¢¨âì ¬ áªã ᮡë⨩
mov ebx,110010b ; ॠ£¨à㥬 ­  ª« ¢¨ âãàã, ¬ëèì, ®âà¨á®¢ªã ä®­ 
mcall
 
bgr_changed:
 
mov eax,14
mcall
mov [y_max], ax
shr eax, 16
mov [x_max], ax
shl eax, 16
mov [top_right_corner], eax
 
still:
movzx ebx, [time]
imul ebx, 60*100
mcall 23 ; ¦¤ñ¬ ᮡëâ¨ï ¢ â¥ç¥­¨¥ [time] ¬¨­ãâ
test eax, eax
jz create_ss_thread
cmp al, 2 ; key in buffer?
jz key
cmp al, 5 ; background redraw?
jz bgr_changed
; mouse event
mcall 37,2 ; ¯à®¢¥à¨¬ ª­®¯ª¨
and al, 3
cmp al, 3 ; ­ ¦ âë ®¡¥ ª­®¯ª¨ ¬ëè¨?
jnz still
mcall 37,0 ; ¯à®¢¥à¨¬ ª®®à¤¨­ âë
cmp [top_right_corner], eax
jnz still
create_setup:
test [params], 2
jnz still ; ®ª­® ­ áâ஥ª 㦥 ᮧ¤ ­®
mcall 51,1,sthread,used_memory-0x1000
or [params], 2
jmp still
key:
mcall ; eax = 2
jmp still
 
create_ss_thread:
test [params], 3
jnz still
call create_ss
jmp still
 
create_ss:
mcall 51,1,thread,used_memory-0x2000
or [params], 1
ret
 
thread:
; mov eax,5
; mov ebx,eax
; mcall
mov eax,40
mov ebx,100010b
mcall
cmp dword [type],0
je drawsswin
cmp dword [type],24
je asminit
mov dword [delay],1
mov [lx1],10 ; for "draw line"
mov [lx2],40
mov [ly1],50
mov [ly2],100
mov [addx1],1
mov [addx2],1
mov [addy1],1
mov [addy2],1
jmp drawsswin
asminit: ; for "assembler"
mov dword [delay],25
mov eax,70
mov ebx,fileinfo
mcall
mov [filesize], ebx
asminit1:
mov [stringstart],data_from_file
mov dword [stringlen],1
newpage:
mov word [stringpos],10
 
drawsswin:
xor eax,eax
movzx ebx,[x_max]
movzx ecx,[y_max]
inc ebx
inc ecx
mov edx,0x01000000
mcall
mov eax,13
xor edx,edx
mcall
tstill:
mov eax,23
mov ebx,[delay]
mcall
test eax,eax
jnz thr_end
cmp dword [type],0
je tstill
cmp dword [type],24
je drawssasm
call draw_line
jmp tstill
thr_end:
and [params], not 1
or eax,-1
mcall
 
drawssasm:
mov edi,[stringstart]
add edi,[stringlen]
dec edi
lea eax,[edi-data_from_file]
cmp eax,[filesize]
ja asminit1
cmp word [edi],0x0a0d
je addstring
cmp byte [edi],0x0a
jne noaddstring
dec edi
addstring:
add word [stringpos],10
add edi,2
mov [stringstart],edi
mov dword [stringlen],1
mov ax,[stringpos]
cmp ax,[y_max]
jb tstill
jmp newpage
noaddstring:
mov eax,4
mov ebx,10*65536
mov bx,[stringpos]
mov ecx,0x104ba010
mov edx,[stringstart]
mov esi,[stringlen]
mcall
inc dword [stringlen]
cmp byte [edi],byte ' '
je drawssasm
jmp tstill
 
draw_line:
movzx esi,[x_max]
movzx edi,[y_max]
 
mov eax,[addx1]
add [lx1],eax
mov eax,[addy1]
add [ly1],eax
 
mov eax,[addx2]
add [lx2],eax
mov eax,[addy2]
add [ly2],eax
 
cmp [lx1],1
jge dl1
mov [addx1],1
dl1:
cmp [lx2],1
jge dl2
mov [addx2],1
dl2:
cmp [lx1],esi
jbe dl3
mov [addx1],0xffffffff
dl3:
cmp [lx2],esi
jbe dl4
mov [addx2],0xffffffff
dl4:
 
cmp [ly1],1
jge dl5
mov [addy1],1
dl5:
cmp [ly2],2
jge dl6
mov [addy2],1
dl6:
cmp [ly1],edi
jbe dl7
mov [addy1],-1
dl7:
cmp [ly2],edi
jbe dl8
mov [addy2],-1
dl8:
 
mov eax,[lx2]
cmp [lx1],eax
jz dnol
 
mov bx,word [lx1]
shl ebx,16
mov bx,word [lx2]
 
mov cx,word [ly1]
shl ecx,16
mov cx,word [ly2]
 
mov eax,38
mov edx,[lcolor]
and edx,0xffffff
mcall
 
dnol:
 
add [lcolor],0x010201
 
ret
 
 
sthread: ; start of execution
 
call sdraw_window
 
sstill:
 
mov eax,10 ; wait here for event
mcall
 
dec eax ; redraw request ?
je sthread
dec eax ; key in buffer ?
jne sbutton
mov al,2
mcall
jmp sstill
 
sbutton: ; button
mov eax,17 ; get id
mcall
 
cmp ah,1 ; button id=1 ?
jne snoclose
 
and [params], not 2
mov eax,-1 ; close this program
mcall
snoclose:
cmp ah,7
jne nosetfl
xor [params], 1
call drawflag
call drawtype
call drawtime
jmp sstill
nosetfl:
test [params], 1
jnz sstill
cmp ah,2
jne notypedown
mov eax,[type]
test eax,eax
je sstill
sub eax,12
jmp typeupdn
notypedown:
cmp ah,3
jne notypeup
mov eax,[type]
cmp eax,24
jae sstill
add eax,12
jmp typeupdn
notypeup:
cmp ah,4
jne notimedown
mov al,[time]
cmp al,1
jbe sstill
dec eax
; das
jmp timeupdn
notimedown:
cmp ah,5
jne notimeup
mov al,[time]
cmp al,59 ; 0x59
jae sstill
inc eax
; daa
jmp timeupdn
notimeup:
cmp ah,6
jne noshow
mov eax,5
mov ebx,10;150
mcall
call create_ss
noshow:
jmp sstill
 
timeupdn:
mov [time],al
call drawtime
jmp sstill
typeupdn:
mov [type],eax
call drawtype
jmp sstill
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
sdraw_window:
 
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
 
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw window
mov ebx,100*65536+215 ; [x start] *65536 + [x size]
mov ecx,100*65536+70 ; [y start] *65536 + [y size]
mov edx,0x13400088 ; color of work area RRGGBB,8->color gl
mov edi,title
mcall
 
mov al,8
mov ebx,47*65536+10
mov ecx,31*65536+10
mov edx,2
mov esi,0x702050
mcall
push ebx
add ebx,13*65536
mov edi,ebx
inc edx
mcall
pop ebx
add ecx,15*65536
inc edx
mcall
mov ebx,edi
inc edx
mcall
mov ebx,160*65536+40
mov ecx,28*65536+14
inc edx
mcall
 
mov al,4 ; function 4 : write text to window
mov ebx,15*65536+33 ; [x start] *65536 + [y start]
mov ecx,0x80ffffff
mov edx,setuptext
mcall
add ebx,15
add edx,10
mcall
mov ebx,169*65536+32
mov edx,buttext
mcall
 
call drawtype
call drawtime
call drawflag
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
 
ret
 
drawtype:
mov eax,13
mov ebx,80*65536+75
mov ecx,30*65536+12
mov edx,0xffffff
test [params], 1
jz noblue
mov edx,0x4e00e7
noblue:
mcall
mov al,4
mov ebx,82*65536+32
xor ecx,ecx
mov edx,typetext
add edx,[type]
mov esi,12
mcall
ret
 
drawtime:
mov eax,13
mov ebx,80*65536+15
mov ecx,45*65536+12
mov edx,0xffffff
test [params], 1
jz noblue1
mov edx,0x4e00e7
noblue1:
mcall
mov al,47
mov edx,82*65536+47
xor esi,esi
movzx ecx,byte [time]
mov ebx,0x00020000
mcall
ret
 
drawflag:
mov eax,8
mov ebx,150*65536+10
mov ecx,45*65536+10
mov edx,7
mov esi,0xe0e0e0
mcall
mov al,4
mov ebx,153*65536+47
xor ecx,ecx
mov esi,1
mov edx,flag
bt dword [params],0
jc setf
inc edx
setf:
mcall
ret
 
; DATA AREA
buttext db 'SHOW',0
flag db 'V '
title db 'SCREENSAVER SETUP',0
setuptext db 'TYPE: < >',0
db 'TIME: < > MINUTES NEVER',0
typetext db 'BLACK SCREENCOLOR LINES ASSEMBLER '
type dd 12
time db 15 ; ¢à¥¬ï ¤® § ¯ã᪠ § áâ ¢ª¨ ¢ ¬¨­ãâ å
delay dd 100
 
lx1 dd 10
lx2 dd 40
 
ly1 dd 50
ly2 dd 100
 
addx1 dd 1
addx2 dd 1
 
addy1 dd 1
addy2 dd 1
 
stringlen dd 1
stringstart dd 0
stringpos dw 10
 
params db 0 ;if bit 0 set-ssaver works if bit 1 set-setup works
 
fileinfo:
; used_memory-0x3000-data_from_file = ~50 Kb with current settings
dd 0,0,0,used_memory-0x3000-data_from_file,data_from_file
db '/RD/1/NETWORK/PPP.ASM',0
 
I_END:
 
 
; UNINITIALIZED DATA:
 
lcolor dd ?
x_max dw ? ; à §¬¥àë íªà ­ 
y_max dw ?
 
top_right_corner dd ?
filesize dd ?
data_from_file:
/programs/system/ss/trunk/build_en.bat
0,0 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm @ss.asm @ss
@erase lang.inc
@pause
/programs/system/ss/trunk/build_ru.bat
0,0 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm @ss.asm @ss
@erase lang.inc
@pause