* pic4, rdsave, cpuid: size optimization

* @ss: decrease used memory & time requirements, size optimization
* @panel: if there is only one window, Alt+[Shift+]Tab activates it
* jpegview: IPC service to unpack JPEG data for other apps
* chess: bmp-file is now inlined
* @ss, chess moved to more appropriate place in file structure

git-svn-id: svn://kolibrios.org@532 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2007-06-04 09:21:07 +00:00
parent 58a419e855
commit 827172f6c0
20 changed files with 1018 additions and 1970 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -33,7 +33,7 @@
PARAMS = memsize - 1024 PARAMS = memsize - 1024
appname equ 'Jpegview ' appname equ 'Jpegview '
version equ '0.15' version equ '0.16'
use32 use32
@ -132,6 +132,8 @@ check_parameters:
cmp [PARAMS+2], byte "L" cmp [PARAMS+2], byte "L"
je boot_set_background je boot_set_background
@@: @@:
cmp byte [PARAMS], 1
jz ipc_service
mov edi, name_string ; clear string with file name mov edi, name_string ; clear string with file name
mov al, 0 mov al, 0
mov ecx, 100 mov ecx, 100
@ -250,6 +252,110 @@ set_as_bgr2:
;****************************************************************************** ;******************************************************************************
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: put_chunk_to_bgr:
pushad pushad
@ -285,6 +391,32 @@ put_chunk_to_bgr:
;****************************************************************************** ;******************************************************************************
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
;******************************************************************************
; ********************************************* ; *********************************************
@ -597,8 +729,11 @@ iniciomemoria:
dd -(iniciomemoria+4),-(iniciomemoria+4),(iniciomemoria+4),.l1,0 dd -(iniciomemoria+4),-(iniciomemoria+4),(iniciomemoria+4),.l1,0
.l1 dd 0 .l1 dd 0
fin:
I_END: I_END:
sc system_colors sc system_colors
ipc_mem dd ?
ipc_mem_size dd ?
ipc_mem_out dd ?
fileattr: rb 40 fileattr: rb 40
dirinfo: rb 32+304 dirinfo: rb 32+304
fin:

View File

@ -59,43 +59,20 @@ still:
cmp ah,101 cmp ah,101
jnz nochange jnz nochange
mov al,byte [usecard] xor byte [usecard], 3 ; 1 <-> 2
cld
inc al
and al,3
cmp al,0
jnz nozer
mov al,1
nozer:
mov byte [usecard],al
call drawusedcard call drawusedcard
nochange: nochange:
cmp byte [usecard],byte 1 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 ; SOUND BLASTER 16
usesb16: usesb16:
cld
mov al,20 mov al,20
cmp ah,al cmp ah,al
jge nomain jge nomain
@ -235,85 +212,6 @@ still:
; 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 ******** ; ******* WINDOW DEFINITIONS AND DRAW ********
; ********************************************* ; *********************************************
@ -335,49 +233,38 @@ draw_window:
mov edx,16 ; button id mov edx,16 ; button id
mov ebx,10*65536 mov ebx,10*65536+22
newbut: newbut:
push edx push edx
push ebx
mov esi,[bcolor] mov esi,[bcolor]
mov eax,8 ; function 8 : define and draw button 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] mov ecx,35*65536+8 ; [y start] *65536 + [y size]
dec edx dec edx
mcall mcall
mov bx,22 ; [x start] *65536 + [x size]
mov ecx,45*65536+8 ; [y start] *65536 + [y size] mov ecx,45*65536+8 ; [y start] *65536 + [y size]
dec edx dec edx
mcall mcall
mov bx,22 ; [x start] *65536 + [x size]
mov ecx,55*65536+8 ; [y start] *65536 + [y size] mov ecx,55*65536+8 ; [y start] *65536 + [y size]
dec edx dec edx
mcall mcall
mov bx,22 ; [x start] *65536 + [x size]
mov ecx,65*65536+8 ; [y start] *65536 + [y size] mov ecx,65*65536+8 ; [y start] *65536 + [y size]
dec edx dec edx
mcall mcall
mov bx,22 ; [x start] *65536 + [x size]
mov ecx,75*65536+8 ; [y start] *65536 + [y size] mov ecx,75*65536+8 ; [y start] *65536 + [y size]
dec edx dec edx
mcall mcall
pop ebx
pop edx pop edx
add ebx,30*65536 add ebx,30*65536
add edx,10 add edx,10
cmp edx,16+6*10 cmp edx,16+6*10
jz butdone jnz newbut
jmp newbut
butdone:
mov eax,4 ; function 4 : write text to window mov eax,4 ; function 4 : write text to window
@ -413,21 +300,12 @@ drawusedcard:
mov edx,[bcolor] mov edx,[bcolor]
mcall mcall
mov eax,[usecard]
mov edx,c3
cmp al,1
jnz nosbc
mov edx,c1 mov edx,c1
nosbc:
cmp al,2 cmp [usecard],2
jnz nosbcII jnz nosbcII
mov edx,c2 mov edx,c2
nosbcII: nosbcII:
cmp al,3
jnz nowssc
mov edx,c3
nowssc:
mov eax,4 mov eax,4
mov ebx,14*65536+123 mov ebx,14*65536+123
@ -453,14 +331,10 @@ text:
c1 db 'SOUND BLASTER 16 - MIXER I ' c1 db 'SOUND BLASTER 16 - MIXER I '
c2 db 'SOUND BLASTER 16 - MIXER II ' c2 db 'SOUND BLASTER 16 - MIXER II '
c3 db 'WINDOWS SOUND SYSTEM '
usecard dd 0x1 usecard db 0x1
title db 'MIXER',0 title db 'MIXER',0
I_END: I_END:

View File

@ -13,6 +13,7 @@
include 'lang.inc' include 'lang.inc'
include '..\..\..\macros.inc' include '..\..\..\macros.inc'
purge mov ; decrease kpack'ed size
START: START:
mov eax,48 mov eax,48
@ -21,7 +22,9 @@ START:
mov edx,sizeof.system_colors mov edx,sizeof.system_colors
mcall mcall
call check_parameters cmp dword [I_Param], 'BOOT'
jz OnBoot
call draw_window call draw_window
call load_texture call load_texture
@ -53,69 +56,54 @@ still:
shr eax,8 shr eax,8
cmp eax,101 ; tiled cmp al,101 ; tiled
jne no101 jne no101
mov ecx,1
setbgrmode:
mov eax,15 mov eax,15
mov ebx,4 mov ebx,4
mov ecx,1
mcall mcall
mov eax,15 dec ebx
mov ebx,3
mcall mcall
jmp still jmp still
no101: no101:
cmp eax,102 ; stretch mov ecx, 2
jne no102 cmp al, 102
mov eax,15 jz setbgrmode
mov ebx,4
mov ecx,2
mcall
mov eax,15
mov ebx,3
mcall
jmp still
no102: no102:
cmp eax,1 ; end program cmp al,1 ; end program
jnz no_end jnz no_end
or eax,-1 or eax,-1
mcall mcall
no_end: no_end:
cmp eax,11 cmp al,11
jz bg jz bg
cmp eax,12 cmp al,12
jz bg jz bg
cmp eax,13 cmp al,13
jz bg jz bg
cmp eax,121 cmp al,121
jb no_bg_select jb no_bg_select
cmp eax,133 cmp al,133
jg no_bg_select ja no_bg_select
sub eax,121 mov eax,[arrays + (eax-121)*4]
shl eax,2
add eax,arrays
mov eax,[eax]
mov [usearray],eax mov [usearray],eax
call load_texture call load_texture
call draw_image call draw_image
jmp still jmp still
no_bg_select: no_bg_select:
cmp eax,14+20 cmp al,14+20
jge bg4 jge bg4
jmp bg2 jmp bg2
check_parameters: OnBoot:
cmp [I_Param],dword 'BOOT'
je @f
ret
@@:
call load_texture call load_texture
@ -125,7 +113,6 @@ check_parameters:
mov edx,256 mov edx,256
mcall mcall
mov eax,15
mov ebx,5 mov ebx,5
mov ecx,0x40000 ; <<< 0x40000 for blue, 0x40000+1 for red, mov ecx,0x40000 ; <<< 0x40000 for blue, 0x40000+1 for red,
; <<< 0x40000+2 for green background at boot ; <<< 0x40000+2 for green background at boot
@ -133,13 +120,11 @@ check_parameters:
mov esi,256*3*256 mov esi,256*3*256
mcall mcall
mov eax,15 dec ebx
mov ebx,4
mov ecx,2 mov ecx,2
mcall mcall
mov eax,15 dec ebx
mov ebx,3
mcall mcall
mov eax,-1 mov eax,-1
@ -178,13 +163,13 @@ bg:
mov edi,0x40000 mov edi,0x40000
cmp eax,12 cmp al,12
jnz bb1 jnz bb1
mov edi,0x40000+1 inc edi
bb1: bb1:
cmp eax,13 cmp al,13
jnz bb2 jnz bb2
mov edi,0x40000+2 inc edi
bb2: bb2:
mov eax,15 mov eax,15
@ -193,14 +178,12 @@ bg:
mov edx,256 mov edx,256
mcall mcall
mov eax,15
mov ebx,5 mov ebx,5
mov ecx,edi mov ecx,edi
mov edx,0 mov edx,0
mov esi,256*256*3 mov esi,256*256*3
mcall mcall
mov eax,15
mov ebx,3 mov ebx,3
mcall mcall
@ -210,33 +193,12 @@ bg:
; colored background ; colored background
bg2: bg2:
mov edi, eax
push eax
mcall 15,4,1 mcall 15,4,1
mcall ,1,,1
mov eax,15 lea ecx, [(edi-14)*3+fill]
mov ebx,1 mcall ,5,,0,3*1*1
mov ecx,1 mcall ,3
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 jmp still
@ -245,9 +207,8 @@ bg2:
bg4: bg4:
sub eax,14+20
shl eax,3 shl eax,3
add eax,shape add eax,shape - (14+20)*8
mov ecx,[eax+0] mov ecx,[eax+0]
mov edx,[eax+4] mov edx,[eax+4]
@ -255,7 +216,6 @@ bg4:
mov ebx,1 mov ebx,1
mcall mcall
mov eax,15
mov ebx,3 mov ebx,3
mcall mcall
@ -275,17 +235,17 @@ bg4:
gentexture: gentexture:
mov ecx,0 ; ycounter xor ecx,ecx ; ycounter
mov edi,0 ; pixel counter xor edi,edi ; pixel counter
mov ebp,[usearray] mov ebp,[usearray]
ylup: ylup:
mov ebx,0 xor ebx,ebx
xlup: xlup:
push edi push edi
mov edi, 0 xor edi, edi
mov esi, 512000000 ; abnormous initial value :) mov esi, 512000000 ; abnormous initial value :)
pixlup: pixlup:

View File

@ -20,19 +20,6 @@ use32
include 'lang.inc' include 'lang.inc'
include '..\..\..\macros.inc' include '..\..\..\macros.inc'
;file_info:
;
; dd 0,0,-1,0x4000,0x20000
; db '/rd/1/chess.bmp',0
file_info:
dd 0
dd 0
dd 0
dd -1
dd 0x4000
db '/rd/1/network/chess.bmp',0
pawn_color: pawn_color:
dd 0x000000 dd 0x000000
@ -61,11 +48,7 @@ text equ texts+80*32*4
START: ; start of execution START: ; start of execution
mov eax,70 mov esi,chess_bmp
mov ebx,file_info
mcall
mov esi,0x4000+22*3+4+24*2
mov edi,0x10000+18*3 mov edi,0x10000+18*3
mov ebx,0 mov ebx,0
@ -1309,16 +1292,10 @@ chess_board:
times 80*20 db 0 times 80*20 db 0
chess_bmp:
file 'chess.bmp':22*3+4+24*2
board_old: board_old:
I_END: I_END:

File diff suppressed because it is too large Load Diff

View File

@ -19,14 +19,13 @@ inc eax
cpuid cpuid
cnnn0: cnnn0:
cmp bl, 00h test bl, bl
ja rr jz cnnn1
je cnnn1
rr: rr:
mov byte [brand], bl ; mov byte [brand], bl ;
Text 60,250,0x00000000,abrand00, abrand00len-abrand00 Text 60,250,0x00000000,abrand00, abrand00len-abrand00
jmp B000 ret
;jmp comppp ;jmp comppp
cnnn1: cnnn1:
@ -34,245 +33,222 @@ cnnn1:
mov eax, 0x80000001 ; CPUID ext. function 0x80000001 mov eax, 0x80000001 ; CPUID ext. function 0x80000001
cpuid cpuid
cmp ebx, 0 test ebx, ebx
je Bi00 je Bi00
mov word [brand], bx ; mov [brand], ebx ;
comppp: comppp:
cmp [brand], 400h cmp byte [brand+1], 4
jl res1 jb res1
cmp [brand], 500h jz res2
jl res2 ja res3
jae res3
res1: res1:
Text 60,250,0x00000000,abrand0, abrand0len-abrand0 Text 60,250,0x00000000,abrand0, abrand0len-abrand0
jmp B000 ret
res2: res2:
Text 60,250,0x00000000,abrand1, abrand1len-abrand1 Text 60,250,0x00000000,abrand1, abrand1len-abrand1
jmp B000 ret
res3: res3:
Text 60,250,0x00000000,abrand2, abrand2len-abrand2 Text 60,250,0x00000000,abrand2, abrand2len-abrand2
jmp B000 ret
;;;;;;;;;;;;;;;;;;;;; intel brand ;;;;;;;;;;;;;;;;;;;;; intel brand
intel_br: intel_br:
xor eax,eax xor eax,eax
inc eax inc eax
cpuid cpuid
movzx ebx, bl
mov [brand], ebx
cmp0: cmp0:
cmp bl, 00h test ebx, ebx
je Bi00 je Bi00
cmp1: cmp1:
cmp bl, 01h dec ebx
je Bi01 je Bi01
cmp2: cmp2:
cmp bl, 02h dec ebx
je Bi02 je Bi02
cmp3: cmp3:
cmp bl, 03h dec ebx
je Bi03 je Bi03
cmp4: cmp4:
cmp bl, 04h dec ebx
je Bi04 je Bi04
cmp6: cmp6:
cmp bl, 06h dec ebx
dec ebx
je Bi06 je Bi06
cmp7: cmp7:
cmp bl, 07h dec ebx
je Bi07 je Bi07
cmp8: cmp8:
cmp bl, 08h dec ebx
je Bi08 je Bi08
cmp9: cmp9:
cmp bl, 09h dec ebx
je Bi09 je Bi09
cmpA: cmpA:
cmp bl, 0Ah dec ebx
je Bi0A je Bi0A
cmpB: cmpB:
cmp bl, 0Bh dec ebx
je Bi0B je Bi0B
cmpC: cmpC:
cmp bl, 0Ch dec ebx
je Bi0C je Bi0C
cmpE: cmpE:
cmp bl, 0Eh dec ebx
dec ebx
je Bi0E je Bi0E
cmpF: cmpF:
cmp bl, 0Fh dec ebx
je Bi0F je Bi0F
cmp11: cmp11:
cmp bl, 11h dec ebx
dec ebx
je Bi11 je Bi11
cmp12: cmp12:
cmp bl, 12h dec ebx
je Bi12 je Bi12
cmp13: cmp13:
cmp bl, 13h dec ebx
je Bi13 je Bi13
cmp14: cmp14:
cmp bl, 14h dec ebx
je Bi14 je Bi14
cmp15: cmp15:
cmp bl, 15h dec ebx
je Bi15 je Bi15
cmp16: cmp16:
cmp bl, 16h dec ebx
je Bi16 je Bi16
cmp17: cmp17:
cmp bl, 17h dec ebx
je Bi17 je Bi17
jne Bi00
;------------------ ;------------------
Bi00: Bi00:
mov byte [brand], bl ;00h
Text 60,250,0x00000000,brand0, brand0len-brand0 Text 60,250,0x00000000,brand0, brand0len-brand0
;Number 270,180,1*256,2,dword [brand],0x000000 was in v. 1.11 ;Number 270,180,1*256,2,dword [brand],0x000000 was in v. 1.11
jmp B000 ret
Bi01: Bi01:
mov [brand], 01h
Text 60,250,0x00000000,brand01, brand01len-brand01 Text 60,250,0x00000000,brand01, brand01len-brand01
jmp B000 ret
Bi02: Bi02:
mov [brand], 02h
Text 60,250,0x00000000,brand02, brand02len-brand02 Text 60,250,0x00000000,brand02, brand02len-brand02
jmp B000 ret
Bi03: Bi03:
mov [brand], 03h
cmp [m], 8 cmp [m], 8
je E3 je E3
Text 60,250,0x00000000,brand03, brand03len-brand03 Text 60,250,0x00000000,brand03, brand03len-brand03
jmp B000 ret
E3: E3:
Text 60,250,0x00000000,brand03d, brand03dlen-brand03d Text 60,250,0x00000000,brand03d, brand03dlen-brand03d
jmp B000 ret
Bi04: Bi04:
mov [brand], 04h
Text 60,250,0x00000000,brand04, brand04len-brand04 Text 60,250,0x00000000,brand04, brand04len-brand04
jmp B000 ret
Bi06: Bi06:
mov [brand], 06h
Text 60,250,0x00000000,brand06, brand06len-brand06 Text 60,250,0x00000000,brand06, brand06len-brand06
jmp B000 ret
Bi07: Bi07:
mov [brand], 07h
Text 60,250,0x00000000,brand07, brand07len-brand07 Text 60,250,0x00000000,brand07, brand07len-brand07
jmp B000 ret
Bi08: Bi08:
mov [brand], 08h
Text 60,250,0x00000000,brand08, brand08len-brand08 Text 60,250,0x00000000,brand08, brand08len-brand08
jmp B000 ret
Bi09: Bi09:
mov [brand], 09h
Text 60,250,0x00000000,brand09, brand09len-brand09 Text 60,250,0x00000000,brand09, brand09len-brand09
jmp B000 ret
Bi0A: Bi0A:
mov [brand], 0Ah
Text 60,250,0x00000000,brand0A, brand0Alen-brand0A Text 60,250,0x00000000,brand0A, brand0Alen-brand0A
jmp B000 ret
Bi0B: Bi0B:
mov [brand], 0Bh
cmp [m], 13 cmp [m], 13
jl Eb jl Eb
Text 60,250,0x00000000,brand0B, brand0Blen-brand0B Text 60,250,0x00000000,brand0B, brand0Blen-brand0B
jmp B000 ret
Eb: Eb:
Text 60,250,0x00000000,brand0Bd, brand0Bdlen-brand0Bd Text 60,250,0x00000000,brand0Bd, brand0Bdlen-brand0Bd
jmp B000 ret
Bi0C: Bi0C:
mov [brand], 0Ch
Text 60,250,0x00000000,brand0C, brand0Clen-brand0C Text 60,250,0x00000000,brand0C, brand0Clen-brand0C
jmp B000 ret
Bi0E: Bi0E:
mov [brand], 0Eh
cmp [m], 13 cmp [m], 13
jl Ed jl Ed
Text 60,250,0x00000000,brand0E, brand0Elen-brand0E Text 60,250,0x00000000,brand0E, brand0Elen-brand0E
jmp B000 ret
Ed: Ed:
Text 60,250,0x00000000,brand0Ed, brand0Edlen-brand0Ed Text 60,250,0x00000000,brand0Ed, brand0Edlen-brand0Ed
jmp B000 ret
Bi0F: Bi0F:
mov [brand], 0Fh
Text 60,250,0x00000000,brand0F, brand0Flen-brand0F Text 60,250,0x00000000,brand0F, brand0Flen-brand0F
jmp B000 ret
Bi11: Bi11:
mov [brand], 11h
Text 60,250,0x00000000,brand11, brand11len-brand11 Text 60,250,0x00000000,brand11, brand11len-brand11
jmp B000 ret
Bi12: Bi12:
mov [brand], 12h
Text 60,250,0x00000000,brand12, brand12len-brand12 Text 60,250,0x00000000,brand12, brand12len-brand12
jmp B000 ret
Bi13: Bi13:
mov [brand], 13h
Text 60,250,0x00000000,brand13, brand13len-brand13 Text 60,250,0x00000000,brand13, brand13len-brand13
jmp B000 ret
Bi14: Bi14:
mov [brand], 14h
Text 60,250,0x00000000,brand14, brand14len-brand14 Text 60,250,0x00000000,brand14, brand14len-brand14
jmp B000 ret
Bi15: Bi15:
mov [brand], 15h
Text 60,250,0x00000000,brand15, brand15len-brand15 Text 60,250,0x00000000,brand15, brand15len-brand15
jmp B000 ret
Bi16: Bi16:
mov [brand], 16h
Text 60,250,0x00000000,brand16, brand16len-brand16 Text 60,250,0x00000000,brand16, brand16len-brand16
jmp B000 ret
Bi17: Bi17:
mov [brand], 17h
Text 60,250,0x00000000,brand17, brand17len-brand17 Text 60,250,0x00000000,brand17, brand17len-brand17
jmp B000
B000:
ret ret

View File

@ -1,5 +1,14 @@
; Decoding cache L1,L2,L3 for Intel ; 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: decodecache:
@ -61,256 +70,207 @@ je kk10
comp11: comp11:
cmp al, 0Ah cmp al, 0Ah
je kk11 je kk11
je Ld8
comp12: comp12:
cmp al, 66h cmp al, 66h
je kk12 je kk12
je Ld8
comp13: comp13:
cmp al, 0Ch cmp al, 0Ch
je kk13 je kk13
je Ld16
comp14: comp14:
cmp al, 10h cmp al, 10h
je kk14 je kk14
je Ld16
comp15: comp15:
cmp al, 67h cmp al, 67h
je kk15 je kk15
je Ld16
comp16: comp16:
cmp al, 2Ch cmp al, 2Ch
je kk16 je kk16
je Ld32
comp17: comp17:
cmp al, 68h cmp al, 68h
je kk17 je kk17
je Ld32
;-------L2 ;-------L2
comp18: comp18:
cmp al, 39h cmp al, 39h
je kk18 je kk18
je L128
comp19: comp19:
cmp al, 3Bh cmp al, 3Bh
je kk19 je kk19
je L128
comp20: comp20:
cmp al, 79h cmp al, 79h
je kk20 je kk20
je L128
comp21: comp21:
cmp al, 81h cmp al, 81h
je kk21 je kk21
je L128
comp22: comp22:
cmp al, 3Ch cmp al, 3Ch
je kk22 je kk22
je L256
comp23: comp23:
cmp al, 7Ah cmp al, 7Ah
je kk23 je kk23
je L256
comp24: comp24:
cmp al, 7Eh cmp al, 7Eh
je kk24 je kk24
je L256
comp25: comp25:
cmp al, 82h cmp al, 82h
je kk25 je kk25
je L256
comp26: comp26:
cmp al, 7Bh cmp al, 7Bh
je kk26 je kk26
je L512
comp27: comp27:
cmp al, 83h cmp al, 83h
je kk27 je kk27
je L512
comp28: comp28:
cmp al, 86h cmp al, 86h
je kk28 je kk28
je L512
comp29: comp29:
cmp al, 7Ch cmp al, 7Ch
je kk29 je kk29
je L1024
comp30: comp30:
cmp al, 84h cmp al, 84h
je kk30 je kk30
je L1024
comp31: comp31:
cmp al, 87h cmp al, 87h
je kk31 je kk31
je L1024
comp32: comp32:
cmp al, 85h cmp al, 85h
je kk32 je kk32
je L2048
;-----L1 Trace instr ;-----L1 Trace instr
comp33: comp33:
cmp al, 70h cmp al, 70h
je kk33 je kk33
je Li12
comp34: comp34:
cmp al, 71h cmp al, 71h
je kk34 je kk34
je Li16
comp35: comp35:
cmp al, 72h cmp al, 72h
je kk35 je kk35
je Li32
;----New codes ;----New codes
comp36: comp36:
cmp al, 60h cmp al, 60h
je kk36 je kk36
je Ld16
comp37: comp37:
cmp al, 78h cmp al, 78h
je kk37 je kk37
je L1024
comp38: comp38:
cmp al, 7Dh cmp al, 7Dh
je kk38 je kk38
je L2048
;---- L3 ;---- L3
comp39: comp39:
cmp al, 22h cmp al, 22h
je kk39 je kk39
je L305
comp40: comp40:
cmp al, 23h cmp al, 23h
je kk40 je kk40
je L31
comp41: comp41:
cmp al, 25h cmp al, 25h
je kk41 je kk41
je L32
comp42: comp42:
cmp al, 29h cmp al, 29h
je kk42 je kk42
je L34
comp43: comp43:
cmp al, 88h cmp al, 88h
je kk43 je kk43
je L32
comp44: comp44:
cmp al, 89h cmp al, 89h
je kk44 je kk44
je L34
comp45: comp45:
cmp al, 8Ah cmp al, 8Ah
je kk45 je kk45
je L38
comp46: comp46:
cmp al, 8Dh cmp al, 8Dh
je kk46 je kk46
je L34
;============= v. 2.04 ;============= v. 2.04
comp47: comp47:
cmp al, 73h cmp al, 73h
je kk47 je kk47
je Li64
comp48: comp48:
cmp al, 1Ah cmp al, 1Ah
je kk48 je kk48
je L96
comp49: comp49:
cmp al, 3Ah cmp al, 3Ah
je kk49 je kk49
je L192
comp50: comp50:
cmp al, 3Dh cmp al, 3Dh
je kk50 je kk50
je L384
comp51: comp51:
cmp al, 3Eh cmp al, 3Eh
je kk51 je kk51
je L512
comp52: comp52:
cmp al, 7Fh cmp al, 7Fh
je kk52 je kk52
je L512
comp53: comp53:
cmp al, 46h cmp al, 46h
je kk53 je kk53
je L34
comp54: comp54:
cmp al, 47h cmp al, 47h
je kk54 je kk54
je L38
comp55: comp55:
cmp al, 49h cmp al, 49h
je kk55 je kk55
je L34
comp56: comp56:
cmp al, 4Ah cmp al, 4Ah
je kk56 je kk56
je L36
comp57: comp57:
cmp al, 4Bh cmp al, 4Bh
je kk57 je kk57
je L38
comp58: comp58:
cmp al, 4Ch cmp al, 4Ch
je kk58 je kk58
je L312
comp59: comp59:
cmp al, 4Dh cmp al, 4Dh
je kk59 je kk59
je L316
jne L000 ret
;------------------ ;------------------
kk1: kk1:
@ -708,7 +668,7 @@ jmp L000
L316: L316:
mov [L3], 16384 mov [L3], 16384
jmp L000 ;jmp L000

View File

@ -2,15 +2,11 @@
macro Window xStart,yStart,xSize,ySize,bColor,gColor,fColor macro Window xStart,yStart,xSize,ySize,bColor,gColor,fColor
{ {
mov ebx,xStart __mov ebx,xStart,xSize
shl ebx,16 __mov ecx,yStart,ySize
add ebx,xSize __mov edx,bColor
mov ecx,yStart __mov esi,gColor
shl ecx,16 __mov edi,fColor
add ecx,ySize
mov edx,bColor
mov esi,gColor
mov edi,fColor
xor eax,eax xor eax,eax
mcall mcall
} }
@ -19,12 +15,10 @@ macro Window xStart,yStart,xSize,ySize,bColor,gColor,fColor
;WriteTextToWindow ;WriteTextToWindow
macro Text xStart,yStart,rgbColor,pText,nTextLen macro Text xStart,yStart,rgbColor,pText,nTextLen
{ {
mov ebx,xStart __mov ebx,xStart,yStart
shl ebx,16 __mov ecx,rgbColor
add ebx,yStart __mov edx,pText
mov ecx,rgbColor __mov esi,nTextLen
mov edx,pText
mov esi,nTextLen
mov eax,4 mov eax,4
mcall mcall
} }
@ -32,55 +26,38 @@ macro Text xStart,yStart,rgbColor,pText,nTextLen
;DisplayNumber ;DisplayNumber
macro Number xStart,yStart,nPrintType,noOfDigits,Data,rgbColor macro Number xStart,yStart,nPrintType,noOfDigits,Data,rgbColor
{ {
__mov edx,xStart,yStart
mov edx,xStart __mov ebx,noOfDigits,nPrintType
shl edx,16 __mov ecx,Data
add edx,yStart __mov esi,rgbColor
mov ebx,noOfDigits
shl ebx,16
or ebx,nPrintType
mov ecx,Data
mov esi,rgbColor
mov eax,47 mov eax,47
mcall mcall
} }
macro DrawLine xStart,xEnd,yStart,yEnd,rgbColor macro DrawLine xStart,xEnd,yStart,yEnd,rgbColor
{ {
mov ebx,xStart __mov ebx,xStart,xEnd
shl ebx,16 __mov ecx,yStart,yEnd
add ebx,xEnd __mov edx,rgbColor
mov ecx,yStart
shl ecx,16
add ecx, yEnd
mov edx,rgbColor
mov eax,38 mov eax,38
mcall mcall
} }
macro PutImage xPos,yPos,xImage,yImage,pImage macro PutImage xPos,yPos,xImage,yImage,pImage
{ {
mov ecx,xImage __mov ecx,xImage,yImage
shl ecx,16 __mov edx,xPos,yPos
add ecx, yImage __mov ebx,pImage
mov edx,xPos
shl edx,16
add edx,yPos
mov ebx,pImage
mov eax,7 mov eax,7
mcall mcall
} }
macro Button xStart,yStart,xSize,ySize,nID,rgbColor macro Button xStart,yStart,xSize,ySize,nID,rgbColor
{ {
mov ebx,xStart __mov ebx,xStart,xSize
shl ebx,16 __mov ecx,yStart,ySize
add ebx,xSize __mov edx,nID
mov ecx,yStart __mov esi,rgbColor
shl ecx,16
add ecx,ySize
mov edx,nID
mov esi,rgbColor
mov eax,8 mov eax,8
mcall mcall
} }

View File

@ -68,6 +68,30 @@ CMPL_FLAG equ 0002h ; core multi-processing legacy mode 1
SVM_FLAG equ 0004h ; secure virtual machine 2 SVM_FLAG equ 0004h ; secure virtual machine 2
MOVCR8_FLAG equ 0010h ;AltMovCr8 4 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 ;decoding standard features
@ -77,668 +101,230 @@ decode_standard_features:
inc eax inc eax
cpuid cpuid
Test0: mov eax, FPU+6
test edx, FPU_FLAG call show_next_bit
jnz Test0e
mov dword [FPU+6], $6F6E mov eax, VME+7
jmp Test1 call show_next_bit
Test0e: mov eax, DE+7
mov dword [FPU+6], $736579 call show_next_bit
;;;;;; mov eax, PSE+8
Test1: call show_next_bit
test edx, VME_FLAG
jnz Test1e
mov dword [VME+ 7], $6F6E mov eax, TSC+6
jmp Test2 call show_next_bit
Test1e: mov eax, MSR+7
mov dword [VME+ 7], $736579 call show_next_bit
;;;;;; mov eax, PAE+7
Test2: call show_next_bit
test edx, DE_FLAG
jnz Test2e
mov dword [DE+ 7], $6F6E mov eax, MCE+8
jmp Test3 call show_next_bit
Test2e: mov eax, CX8+6
mov dword [DE+ 7], $736579 call show_next_bit
;;;;;;
Test3: mov eax, APIC+7
test edx, PSE_FLAG call show_next_bit
jnz Test3e
mov dword [PSE+ 8], $6F6E shr edx, 1 ; skip reserved bit
jmp Test4
Test3e: mov eax, SEP+8
mov dword [PSE+ 8], $736579 call show_next_bit
;;;; mov eax, MTRR+6
Test4: call show_next_bit
test edx, TSC_FLAG
jnz Test4e
mov dword [TSC+ 6], $6F6E mov eax, PGE+7
jmp Test5 call show_next_bit
Test4e: mov eax, MCA+7
mov dword [TSC+ 6], $736579 call show_next_bit
;;;; mov eax, CMOV+8
Test5: call show_next_bit
test edx, MSR_FLAG
jnz Test5e
mov dword [MSR+ 7], $6F6E mov eax, PAT+6
jmp Test6 call show_next_bit
Test5e: mov eax, PSE36+7
mov dword [MSR+ 7], $736579 call show_next_bit
;;;; mov eax, PSNUM+7
Test6: call show_next_bit
test edx, PAE_FLAG
jnz Test6e
mov dword [PAE+ 7], $6F6E mov eax, CLFLUSHn+8
jmp Test7 call show_next_bit
Test6e: shr edx, 1 ; skip reserved bit
mov dword [PAE+ 7], $736579
;;;; mov eax, DTS+7
Test7: call show_next_bit
test edx, MCE_FLAG
jnz Test7e
mov dword [MCE+ 8], $6F6E mov eax, ACPI+7
jmp Test8 call show_next_bit
Test7e: mov eax, MMX+8
mov dword [MCE+ 8], $736579 call show_next_bit
mov eax, [eax]
mov [MMXs+7], eax
;;;; mov eax, FXSR+6
Test8: call show_next_bit
test edx, CX8_FLAG
jnz Test8e
mov dword [CX8+ 6], $6F6E mov eax, SSE+7
jmp Test9 call show_next_bit
Test8e: mov eax, SSE2+7
mov dword [CX8+ 6], $736579 call show_next_bit
;;;;
Test9: mov eax, SSn+8
test edx, APIC_FLAG call show_next_bit
jnz Test9e
mov dword [APIC+ 7], $6F6E shr edx, 1
jmp Test11 ; mov eax, HTT+8
; test edx, HTT_FLAG
; call write_yes_no
Test9e: mov eax, TM+7
mov dword [APIC+ 7], $736579 call show_next_bit
;;;;;
Test11: mov eax, IA64+7
test edx, SEP_FLAG call show_next_bit
jnz Test11e
mov dword [SEP+ 8], $6F6E mov eax, PBE+8
jmp Test12 call show_next_bit
Test11e: ret
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:
;test edx, HTT_FLAG
;jnz Test28e
;
;mov dword [HTT+ 8], $6F6E
;jmp Test29
;
;Test28e:
;mov dword [HTT+ 8], $736579
;;;;
Test29:
test edx, TM_FLAG
jnz Test29e
mov dword [TM+ 7], $6F6E
jmp Test30
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: decode_extended_features:
xor eax,eax ; is called immediately after decode_standard_features
inc eax ; xor eax, eax
cpuid ; inc eax
Tes1: ; cpuid
test ecx, SSE3_FLAG
jnz Tes1e
mov dword [SS3+ 8], $6F6E mov eax, SS3+8
jmp Tes2 test ecx, SSE3_FLAG
call write_yes_no
Tes1e: mov eax, MON+8
mov dword [SS3+ 8], $736579 test ecx, MON_FLAG
call write_yes_no
mov eax, DS_CPL+8
test ecx, DS_CPL_FLAG
call write_yes_no
Tes2: mov eax, EST+8
test ecx, MON_FLAG test ecx, EST_FLAG
jnz Tes2e call write_yes_no
mov dword [MON+ 8], $6F6E mov eax, TM2+8
jmp Tes3 test ecx, TM2_FLAG
call write_yes_no
Tes2e: mov eax, CNXT_ID+12
mov dword [MON+ 8], $736579 test ecx, CNXT_ID_FLAG
call write_yes_no
mov eax, CX16+12
test ecx, CX16_FLAG
call write_yes_no
Tes3: mov eax, ETPRD+12
test ecx, DS_CPL_FLAG test ecx, ETPRD_FLAG
jnz Tes3e call write_yes_no
mov dword [DS_CPL+ 8], $6F6E mov eax, VMX+8
jmp Tes4 test ecx, VMX_FLAG
call write_yes_no
Tes3e: mov eax, SSSE3+12
mov dword [DS_CPL+ 8], $736579 test ecx, SSSE3_FLAG
call write_yes_no
Tes4: mov eax, DCA+8
test ecx, EST_FLAG test ecx, DCA_FLAG
jnz Tes4e call write_yes_no
@@:
mov dword [EST+ 8], $6F6E ret
jmp Tes5
Tes4e:
mov dword [EST+ 8], $736579
Tes5:
test ecx, TM2_FLAG
jnz Tes5e
mov dword [TM2+ 8], $6F6E
jmp Tes6
Tes5e:
mov dword [TM2+ 8], $736579
Tes6:
test ecx, CNXT_ID_FLAG
jnz Tes6e
mov dword [CNXT_ID+ 12], $6F6E
jmp Tes7
Tes6e:
mov dword [CNXT_ID+ 12], $736579
Tes7:
test ecx, CX16_FLAG
jnz Tes7e
mov dword [CX16+ 12], $6F6E
jmp Tes8
Tes7e:
mov dword [CX16+ 12], $736579
Tes8:
test ecx, ETPRD_FLAG
jnz Tes8e
mov dword [ETPRD+ 12], $6F6E
jmp Tes9
Tes8e:
mov dword [ETPRD+ 12], $736579
Tes9:
test ecx, VMX_FLAG
jnz Tes9e
mov dword [VMX+ 8], $6F6E
jmp Tes10
Tes9e:
mov dword [VMX+ 8], $736579
Tes10:
test ecx, SSSE3_FLAG
jnz Tes10e
mov dword [SSSE3+ 12], $6F6E
jmp Tes11
Tes10e:
mov dword [SSSE3+ 12], $736579
Tes11:
test ecx, DCA_FLAG
jnz Tes11e
mov dword [DCA+ 8], $6F6E
jmp Tes12
Tes11e:
mov dword [DCA+ 8], $736579
Tes12:
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
decode_extended: decode_extended:
xor eax, eax mov eax, $80000000
mov eax,$80000000
cpuid 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 mov eax, $80000001 ;// Setup extended function 8000_0001h
cpuid cpuid
Tez1: mov eax, MP+8
test edx, MP_FLAG test edx, MP_FLAG
jnz Tez1e call write_yes_no
mov dword [MP+8], $6F6E mov eax, NX+8
jmp Tez2 test edx, NX_FLAG
call write_yes_no
Tez1e:
mov dword [MP+ 8], $736579
Tez2:
test edx, NX_FLAG
jnz Tez2e
mov dword [NX+ 8], $6F6E
jmp Tez4
;jmp Tez3 we do detection in another place, because of Cyrix specific MMX+ detection ;jmp Tez3 we do detection in another place, because of Cyrix specific MMX+ detection
; mov eax, MMXPi+8
; test edx, MMXPi_FLAG
; call write_yes_no
Tez2e: mov eax, MMXn+8
mov dword [NX+ 8], $736579 test edx, MMXn_FLAG
call write_yes_no
;Tez3: mov eax, FXSRn+8
;test edx, MMXPi_FLAG test edx, FXSRn_FLAG
;jnz Tez3e call write_yes_no
;mov dword [MMXPi+ 8], $6F6E mov eax, FFXSR+12
;jmp Tez4 test edx, FFXSR_FLAG
call write_yes_no
mov eax, TSCP+12
test edx, TSCP_FLAG
call write_yes_no
;Tez3e: mov eax, LM+12
;mov dword [MMXPi+ 8], $736579 test edx, LM_FLAG
call write_yes_no
Tez4: mov eax, DNo+12
test edx, MMXn_FLAG test edx, DNo_FLAG
jnz Tez4e call write_yes_no
mov dword [MMXn+ 8], $6F6E mov eax, DN+12
jmp Tez5 test edx, DN_FLAG
call write_yes_no
Tez4e:
mov dword [MMXn+ 8], $736579
Tez5:
test edx, FXSRn_FLAG
jnz Tez5e
mov dword [FXSRn+ 8], $6F6E
jmp Tez6
Tez5e:
mov dword [FXSRn+ 8], $736579
Tez6:
test edx, FFXSR_FLAG
jnz Tez6e
mov dword [FFXSR+ 12], $6F6E
jmp Tez7
Tez6e:
mov dword [FFXSR+ 12], $736579
Tez7:
test edx, TSCP_FLAG
jnz Tez7e
mov dword [TSCP+ 12], $6F6E
jmp Tez8
Tez7e:
mov dword [TSCP+ 12], $736579
Tez8:
test edx, LM_FLAG
jnz Tez8e
mov dword [LM+ 12], $6F6E
jmp Tez9
Tez8e:
mov dword [LM+ 12], $736579
Tez9:
test edx, DNo_FLAG
jnz Tez9e
mov dword [DNo+ 12], $6F6E
jmp Tez10
Tez9e:
mov dword [DNo+ 12], $736579
Tez10:
test edx, DN_FLAG
jnz Tez10e
mov dword [DN+ 12], $6F6E
jmp Tez11
Tez10e:
mov dword [DN+ 12], $736579
;Intel ;Intel
mov eax, SYS+12
test edx, SYS_FLAG
call write_yes_no
Tez11: mov eax, LAF+12
test edx, SYS_FLAG test ecx, LAHF_FLAG
jnz Tez11e call write_yes_no
mov dword [SYS+ 12], $6F6E mov eax, CMPL+12
jmp Tez12 test ecx, CMPL_FLAG
call write_yes_no
Tez11e: mov eax, SVM+8
mov dword [SYS+ 12], $736579 test ecx, SVM_FLAG
call write_yes_no
mov eax, MCR8+12
test ecx, MOVCR8_FLAG
call write_yes_no
Tez12: ret
test ecx, LAHF_FLAG
jnz Tez12e
mov dword [LAF+ 12], $6F6E
jmp Tez13
Tez12e:
mov dword [LAF+ 12], $736579
Tez13:
test ecx, CMPL_FLAG
jnz Tez13e
mov dword [CMPL+ 12], $6F6E
jmp Tez14
Tez13e:
mov dword [CMPL+ 12], $736579
Tez14:
test ecx, SVM_FLAG
jnz Tez14e
mov dword [SVM+ 8], $6F6E
jmp Tez15
Tez14e:
mov dword [SVM+ 8], $736579
Tez15:
test ecx, MOVCR8_FLAG
jnz Tez15e
mov dword [MCR8+ 12], $6F6E
jmp Tez16
Tez15e:
mov dword [MCR8+ 12], $736579
Tez16:
ret

View File

@ -4,9 +4,9 @@ gif_hash_offset = gif_hash_area
macro gif2img gifsrc,imgsrc macro gif2img gifsrc,imgsrc
{ {
local hasharea, ReadGIF, nextblock,_null local hasharea, ReadGIF, nextblock,_null
local globalColor, img_count, cur_info, img_start ;local globalColor, img_count, cur_info, img_start
local codesize, compsize, bit_count, CC, EOI, Palette ;local codesize, compsize, bit_count, CC, EOI, Palette
local block_ofs, table_ptr, gifmacend ;local block_ofs, table_ptr, gifmacend
local no_gc, block_skip, no_comm, noextblock, uselocal local no_gc, block_skip, no_comm, noextblock, uselocal
local setPal, filltable, reinit, cycle, zadd, noinc local setPal, filltable, reinit, cycle, zadd, noinc
local notintable, er, zend, nxt, continue, ex, Gif_skipmap local notintable, er, zend, nxt, continue, ex, Gif_skipmap
@ -29,7 +29,7 @@ end if
end if end if
call ReadGIF call ReadGIF
jmp gifmacend ret
if defined gif_hash_offset if defined gif_hash_offset
else else
@ -46,7 +46,7 @@ ReadGIF:
mov [img_count],eax mov [img_count],eax
inc eax inc eax
cmp dword[esi],'GIF8' cmp dword[esi],'GIF8'
jne er ; signature jne ex ; signature
mov ecx,[esi+0xa] mov ecx,[esi+0xa]
inc eax inc eax
add esi,0xd add esi,0xd
@ -81,7 +81,7 @@ no_comm:
jmp block_skip jmp block_skip
noextblock: noextblock:
cmp byte[edi],0x2c ; image beginning cmp byte[edi],0x2c ; image beginning
jne er jne ex
inc [img_count] inc [img_count]
inc edi inc edi
mov esi,[cur_info] mov esi,[cur_info]
@ -137,7 +137,6 @@ filltable:
inc eax inc eax
loop filltable loop filltable
pop edi pop edi
mov [img_start],edi
reinit: reinit:
mov edx,[EOI] mov edx,[EOI]
inc edx inc edx
@ -180,9 +179,6 @@ notintable:
call Gif_output call Gif_output
pop ebx eax pop ebx eax
jmp zadd jmp zadd
er:
pop edi
jmp ex
zend: zend:
; mov eax,[.cur_info] ; skip offset to next frame ; mov eax,[.cur_info] ; skip offset to next frame
; mov [eax],edi ; mov [eax],edi
@ -197,8 +193,6 @@ nxt:
continue: continue:
; cmp byte[edi],0x3b ;read next frame ; cmp byte[edi],0x3b ;read next frame
; jne nextblock ; jne nextblock
xor eax,eax
stosd
mov ecx,[img_count] mov ecx,[img_count]
ex: ex:
pop edi esi pop edi esi
@ -283,18 +277,6 @@ loop2:
pop edx eax esi pop edx eax esi
ret 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: gifmacend:
} }

View File

@ -1,29 +1,20 @@
amd: amd:
file 'amd.gif' ;include gif file file 'amd.gif' ;include gif file
rb 50 ;50 bytes temp back zone
cyrix: cyrix:
file 'cyrix.gif' ;include gif file file 'cyrix.gif' ;include gif file
rb 50 ;50 bytes temp back zone
idt: idt:
file 'idt.gif' ;include gif file file 'idt.gif' ;include gif file
rb 50 ;50 bytes temp back zone
intel: intel:
file 'intel.gif' ;include gif file file 'intel.gif' ;include gif file
rb 50 ;50 bytes temp back zone
transmeta: transmeta:
file 'transmet.gif' ;include gif file file 'transmet.gif' ;include gif file
rb 50 ;50 bytes temp back zone
via: via:
file 'via.gif' ;include gif file file 'via.gif' ;include gif file
rb 50 ;50 bytes temp back zone
knopka: knopka:
file 'knopka.gif' ;include gif file file 'knopka.gif' ;include gif file
rb 50 ;50 bytes temp back zone

View File

@ -596,9 +596,3 @@ module:
;p=1042128803351525332193283695592003066548124262686459610611886292768993621049491 ;p=1042128803351525332193283695592003066548124262686459610611886292768993621049491
;q=1273712981880077616387281148672409277231717442781838063285512054053473668300963 ;q=1273712981880077616387281148672409277231717442781838063285512054053473668300963
;n=1327372985619988354987062708438042005329282516404896732667039640816200186465366322016844458439816997285872910403676793109807015096535910981266920474905959833 ;n=1327372985619988354987062708438042005329282516404896732667039640816200186465366322016844458439816997285872910403676793109807015096535910981266920474905959833
num1 rd 40
num2 rd 40
num3 rd 40
iter rd 1
openkey rd 1

View File

@ -172,8 +172,8 @@ alt_tab_pressed:
mov eax, 9 mov eax, 9
jb .fill jb .fill
mov [alt_tab_list_size], edx mov [alt_tab_list_size], edx
cmp edx, 2 test edx, edx
jb begin_1.ret jz begin_1.ret
mcall 66,4,0,0 ; «®¢¨¬ ¬®¬¥­â ®â¯ã᪠­¨ï ¢á¥å ã¯à ¢«ïîé¨å ª« ¢¨è mcall 66,4,0,0 ; «®¢¨¬ ¬®¬¥­â ®â¯ã᪠­¨ï ¢á¥å ã¯à ¢«ïîé¨å ª« ¢¨è
test eax, eax test eax, eax
jnz begin_1.ret jnz begin_1.ret

View File

@ -25,8 +25,10 @@ version equ '1.2'
dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï) dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
dd 0x0 ; § à¥§¥à¢¨à®¢ ­® dd 0x0 ; § à¥§¥à¢¨à®¢ ­®
include '..\..\..\develop\examples\editbox\trunk\editbox.inc' include '..\..\develop\editbox\editbox.inc'
use_edit_box procinfo,22,5 use_edit_box procinfo,22,5
al equ eax ; \ decrease kpack'ed size
purge mov ; /
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;--- <20>€—€Ž <20><>Žƒ<C5BD>€ŒŒ ---------------------------------------------- ;--- <20>€—€Ž <20><>Žƒ<C5BD>€ŒŒ ----------------------------------------------
@ -44,9 +46,7 @@ red: ;
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
still: still:
push 10 mcall 10
pop eax
mcall
dec eax ; ¯¥à¥à¨á®¢ âì ®ª­®? dec eax ; ¯¥à¥à¨á®¢ âì ®ª­®?
jz red ; ¥á«¨ ¤  - ­  ¬¥âªã red jz red ; ¥á«¨ ¤  - ­  ¬¥âªã red
@ -56,7 +56,7 @@ still:
jz button jz button
mouse: mouse:
mouse_edit_boxes editbox,editbox_end mouse_edit_box editbox
jmp still jmp still
button: button:
@ -69,38 +69,26 @@ button:
mcall mcall
noclose: noclose:
cmp ah,2 push eax
jne path_2
call clear_err call clear_err
mov al,16 pop eax
mov ebx,1 push 16
mcall xor ebx, ebx
call check_for_error inc ebx ; 16.1 = save to /FD/1
jmp still cmp ah, 2
path_2: je doit
cmp ah,3 inc ebx ; 16.2 = save to /FD/2
jne path_3 cmp ah, 3
call clear_err je doit
mov al,16 pop ebx
mov ebx,2 push 18
mcall mov bl, 6 ; 18.6 = save to specified folder
call check_for_error mov ecx, path3
jmp still cmp ah, 4
path_3: je doit
cmp ah,4 mov ecx, path4
jne path_4 doit:
call clear_err pop eax
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
mov ecx,path4
mcall mcall
call check_for_error call check_for_error
jmp still jmp still
@ -108,56 +96,39 @@ noclose:
key: key:
mov al,2 mov al,2
mcall mcall
key_edit_boxes editbox,editbox_end key_edit_box editbox
jmp still jmp still
check_for_error: ;Ž¡à ¡®â稪 ®è¨¡®ª check_for_error: ;Ž¡à ¡®â稪 ®è¨¡®ª
cmp eax,0 mov ecx, [sc.work_text]
jne err1 mov edx, ok
mov ecx,[sc.work_text] test eax, eax
mov edx,ok jz print
jmp print mov ecx, 0xdd2222
err1: add edx, error3 - ok
cmp eax,1 dec eax
jne err3 dec eax
mov ecx,0xdd2222 jz print
mov edx,error11 add edx, error5 - error3
jmp print dec eax
err3: dec eax
cmp eax,3 jz print
jne err5 add edx, error8 - error5
mov ecx,0xdd2222 dec eax
mov edx,error3 dec eax
jmp print dec eax
err5: jz print
cmp eax,5 add edx, error9 - error8
jne err8 dec eax
mov ecx,0xdd2222 jz print
mov edx,error5 add edx, error10 - error9
jmp print dec eax
err8: jz print
cmp eax,8 add edx, error11 - error10
jne err9 dec eax
mov ecx,0xdd2222 jz print
mov edx,error8 add edx, aUnknownError - error11
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
print: print:
mov eax,4 ;­ ¤¯¨á¨ mov eax,4 ;­ ¤¯¨á¨
@ -167,7 +138,7 @@ err10:
ret ret
clear_err: clear_err:
mov al,13 mov eax,13
mov ebx,15 shl 16 + 240 mov ebx,15 shl 16 + 240
mov ecx,145 shl 16 +15 mov ecx,145 shl 16 +15
mov edx,[sc.work] mov edx,[sc.work]
@ -199,7 +170,7 @@ draw_window:
mov edi,title ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ<C5BD> mov edi,title ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ<C5BD>
mcall 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 al,13 ;®âà¨á®¢ª  ⥭¥© ª­®¯®ª
mov ebx,194 shl 16 + 60 mov ebx,194 shl 16 + 60
@ -306,6 +277,7 @@ error8 db '
error9 db '’ ¡«¨æ  FAT à §àã襭 ',0 error9 db '’ ¡«¨æ  FAT à §àã襭 ',0
error10 db '„®áâ㯠§ ¯à¥é¥­',0 error10 db '„®áâ㯠§ ¯à¥é¥­',0
error11 db 'Žè¨¡ª  ãáâனá⢠',0 error11 db 'Žè¨¡ª  ãáâனá⢠',0
aUnknownError db '<27>¥¨§¢¥áâ­ ï ®è¨¡ª ',0
else else
save db ' Save',0 save db ' Save',0
@ -319,6 +291,7 @@ error8 db 'Disk is full',0
error9 db 'FAT table corrupted',0 error9 db 'FAT table corrupted',0
error10 db 'Access denied',0 error10 db 'Access denied',0
error11 db 'Device error',0 error11 db 'Device error',0
aUnknownError db 'Unknown error',0
end if end if

View File

@ -5,115 +5,80 @@
use32 use32
org 0x0 org 0x0
used_memory = 0x10000
db 'MENUET01' ; 8 byte id db 'MENUET01' ; 8 byte id
dd 0x01 ; header version dd 0x01 ; header version
dd START ; start of code dd START ; start of code
dd I_END ; size of image dd I_END ; size of image
dd 0x40000 ; memory for app (256 Kb) dd used_memory ; memory for app
dd 0x40000 ; esp dd used_memory ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc' include 'lang.inc'
include '..\..\..\macros.inc' include '..\..\..\macros.inc'
purge mov ; decrease kpack'ed size
;include 'debug.inc' ;include 'debug.inc'
START: START:
mov eax,14
mcall
and eax,0xFFFF0000
mov [top_right_corner],eax
mov eax,40 ; ãáâ ­®¢¨âì ¬ áªã ᮡë⨩ mov eax,40 ; ãáâ ­®¢¨âì ¬ áªã ᮡë⨩
mov ebx,110010b ; ॠ£¨à㥬 ­  ª« ¢¨ âãàã, ¬ëèì, ®âà¨á®¢ªã ä®­  mov ebx,110010b ; ॠ£¨à㥬 ­  ª« ¢¨ âãàã, ¬ëèì, ®âà¨á®¢ªã ä®­ 
mcall mcall
mov eax,14 ; ¯®«ã稬 à §¬¥àë íªà ­  bgr_changed:
mov eax,14
mcall mcall
mov [y_max],ax mov [y_max], ax
shr eax,16 shr eax, 16
mov [x_max],ax mov [x_max], ax
shl eax, 16
mov [top_right_corner], eax
event: ; ®¡à ¡®â稪 ᮡë⨩ (¢á¥å) still:
mov eax,26 movzx ebx, [time]
mov ebx,9 imul ebx, 60*100
mcall ; ¯®«ãç¨âì ¢à¥¬ï á¨á⥬ë mcall 23 ; ¦¤ñ¬ ᮡëâ¨ï ¢ â¥ç¥­¨¥ [time] ¬¨­ãâ
; mov eax,3 test eax, eax
; mcall jz create_ss_thread
mov [evtime],eax ; § ¯®¬­¨âì ¥£® cmp al, 2 ; key in buffer?
mov eax,37 jz key
mov ebx,2 cmp al, 5 ; background redraw?
mcall jz bgr_changed
cmp eax,3 ; ¯à®¤®«¦¨¬, ¥á«¨ ­ ¦ â  á।­ïï ª­®¯ª  ¬ëè¨ ; mouse event
jne still mcall 37,2 ; ¯à®¢¥à¨¬ ª­®¯ª¨
mov eax,37 ; ¯à®¢¥à¨¬ ª®®à¤¨­ âë and al, 3
mov ebx,0 cmp al, 3 ; ­ ¦ âë ®¡¥ ª­®¯ª¨ ¬ëè¨?
mcall jnz still
cmp [top_right_corner],eax mcall 37,0 ; ¯à®¢¥à¨¬ ª®®à¤¨­ âë
je create_setup ; ᮧ¤ ñ¬ ®ª­® ­ áâனª¨, ¥á«¨ ¬ëèì ¢ ¢¥àå­¥¬ ¯à ¢®¬ cmp [top_right_corner], eax
; 㣫ã íªà ­  jnz still
create_setup:
test [params], 2
jnz still ; ®ª­® ­ áâ஥ª 㦥 ᮧ¤ ­®
still: ; ®á­®¢­®© 横« ¯à®£à ¬¬ë mcall 51,1,sthread,used_memory-0x1000
or [params], 2
mov eax,23 ; ¦¤ñ¬ ᮡëâ¨ï ¢ â¥ç¥­¨¥ 1 ᥪ㭤ë jmp still
mov ebx,100 key:
mcall mcall ; eax = 2
jmp still
bt dword [params],0 ; ssaver works?
jc event
bt dword [params],1 ; setup works?
jc event
cmp eax,2 ; key in buffer ?
je event
cmp eax,5
je event
cmp eax,6
je event
mov eax,26
mov ebx,9
mcall
sub eax,[evtime]
xor edx,edx
mov ebx,60*100 ; ¯®¤¥«¨¬ ­  60*100, ¯®«ã稬 ¢à¥¬ï ¢ ¬¨­ãâ å
div ebx
cmp al,[time]
jb still
; current_time-evtime/100/60 = ¢à¥¬ï ¢ ¬¨­ãâ å á ¯à®è«®£® ᮡëâ¨ï
create_ss_thread:
test [params], 3
jnz still
call create_ss call create_ss
jmp still jmp still
create_ss:
mcall 51,1,thread,used_memory-0x2000
create_setup: or [params], 1
bt dword [params],1
jc still
mov eax,51
mov ebx,1
mov ecx,sthread
mov edx,0x3F000
mcall
bts dword [params],1
jmp still
create_ss:
mov eax,51
mov ebx,1
mov ecx,thread
mov edx,0x3E000
mcall
bts dword [params],0
ret ret
thread: thread:
mov eax,5 ; mov eax,5
mov ebx,eax ; mov ebx,eax
mcall ; mcall
mov eax,40 mov eax,40
mov ebx,100010b mov ebx,100010b
mcall mcall
@ -133,22 +98,20 @@ still: ;
jmp drawsswin jmp drawsswin
asminit: ; for "assembler" asminit: ; for "assembler"
mov dword [delay],25 mov dword [delay],25
mov eax,58 mov eax,70
mov ebx,fileinfo mov ebx,fileinfo
mcall mcall
mov [filesize], ebx
asminit1: asminit1:
mov eax,data_from_file mov [stringstart],data_from_file
mov [stringstart],eax
mov dword [stringlen],1 mov dword [stringlen],1
newpage: newpage:
mov word [stringpos],10 mov word [stringpos],10
drawsswin: drawsswin:
xor eax,eax xor eax,eax
mov ebx,eax movzx ebx,[x_max]
mov ecx,eax movzx ecx,[y_max]
mov bx,[x_max]
mov cx,[y_max]
inc ebx inc ebx
inc ecx inc ecx
mov edx,0x01000000 mov edx,0x01000000
@ -160,10 +123,8 @@ still: ;
mov eax,23 mov eax,23
mov ebx,[delay] mov ebx,[delay]
mcall mcall
cmp eax,2 test eax,eax
je thr_end jnz thr_end
cmp eax,6
je thr_end
cmp dword [type],0 cmp dword [type],0
je tstill je tstill
cmp dword [type],24 cmp dword [type],24
@ -171,11 +132,7 @@ still: ;
call draw_line call draw_line
jmp tstill jmp tstill
thr_end: thr_end:
btr dword [params],0 and [params], not 1
mov eax,26
mov ebx,9
mcall
mov [evtime],eax
or eax,-1 or eax,-1
mcall mcall
@ -183,12 +140,15 @@ still: ;
mov edi,[stringstart] mov edi,[stringstart]
add edi,[stringlen] add edi,[stringlen]
dec edi dec edi
mov eax,edi lea eax,[edi-data_from_file]
sub eax,data_from_file cmp eax,[filesize]
cmp eax,10450
ja asminit1 ja asminit1
cmp word [edi],0x0a0d cmp word [edi],0x0a0d
je addstring
cmp byte [edi],0x0a
jne noaddstring jne noaddstring
dec edi
addstring:
add word [stringpos],10 add word [stringpos],10
add edi,2 add edi,2
mov [stringstart],edi mov [stringstart],edi
@ -211,11 +171,8 @@ still: ;
jmp tstill jmp tstill
draw_line: draw_line:
movzx esi,[x_max]
xor esi,esi movzx edi,[y_max]
xor edi,edi
mov si,[x_max]
mov di,[y_max]
mov eax,[addx1] mov eax,[addx1]
add [lx1],eax add [lx1],eax
@ -294,13 +251,12 @@ sstill:
mov eax,10 ; wait here for event mov eax,10 ; wait here for event
mcall mcall
cmp eax,1 ; redraw request ? dec eax ; redraw request ?
je sthread je sthread
cmp eax,2 ; key in buffer ? dec eax ; key in buffer ?
je sstill jne sbutton
cmp eax,3 ; button in buffer ? mov al,2
je sbutton mcall
jmp sstill jmp sstill
sbutton: ; button sbutton: ; button
@ -310,20 +266,20 @@ sstill:
cmp ah,1 ; button id=1 ? cmp ah,1 ; button id=1 ?
jne snoclose jne snoclose
btr dword [params],1 and [params], not 2
mov eax,-1 ; close this program mov eax,-1 ; close this program
mcall mcall
snoclose: snoclose:
cmp ah,7 cmp ah,7
jne nosetfl jne nosetfl
btc dword [params],0 xor [params], 1
call drawflag call drawflag
call drawtype call drawtype
call drawtime call drawtime
jmp sstill jmp sstill
nosetfl: nosetfl:
bt dword [params],0 test [params], 1
jc sstill jnz sstill
cmp ah,2 cmp ah,2
jne notypedown jne notypedown
mov eax,[type] mov eax,[type]
@ -345,7 +301,7 @@ sstill:
mov al,[time] mov al,[time]
cmp al,1 cmp al,1
jbe sstill jbe sstill
dec al dec eax
; das ; das
jmp timeupdn jmp timeupdn
notimedown: notimedown:
@ -354,17 +310,16 @@ sstill:
mov al,[time] mov al,[time]
cmp al,59 ; 0x59 cmp al,59 ; 0x59
jae sstill jae sstill
inc al inc eax
; daa ; daa
jmp timeupdn jmp timeupdn
notimeup: notimeup:
cmp ah,6 cmp ah,6
jne noshow jne noshow
mov eax,5 mov eax,5
mov ebx,150 mov ebx,10;150
mcall mcall
call create_ss call create_ss
jmp sstill
noshow: noshow:
jmp sstill jmp sstill
@ -397,7 +352,7 @@ sdraw_window:
mov edi,title mov edi,title
mcall mcall
mov eax,8 mov al,8
mov ebx,47*65536+10 mov ebx,47*65536+10
mov ecx,31*65536+10 mov ecx,31*65536+10
mov edx,2 mov edx,2
@ -420,19 +375,16 @@ sdraw_window:
inc edx inc edx
mcall mcall
mov eax,4 ; function 4 : write text to window mov al,4 ; function 4 : write text to window
mov ebx,15*65536+33 ; [x start] *65536 + [y start] mov ebx,15*65536+33 ; [x start] *65536 + [y start]
mov ecx,0xffffff mov ecx,0x80ffffff
mov edx,setuptext mov edx,setuptext
mov esi,9
mcall mcall
add ebx,15 add ebx,15
add edx,esi add edx,10
mov esi,30
mcall mcall
mov ebx,169*65536+32 mov ebx,169*65536+32
mov edx,buttext mov edx,buttext
mov esi,4
mcall mcall
call drawtype call drawtype
@ -450,12 +402,12 @@ drawtype:
mov ebx,80*65536+75 mov ebx,80*65536+75
mov ecx,30*65536+12 mov ecx,30*65536+12
mov edx,0xffffff mov edx,0xffffff
bt dword [params],0 test [params], 1
jnc noblue jz noblue
mov edx,0x4e00e7 mov edx,0x4e00e7
noblue: noblue:
mcall mcall
mov eax,4 mov al,4
mov ebx,82*65536+32 mov ebx,82*65536+32
xor ecx,ecx xor ecx,ecx
mov edx,typetext mov edx,typetext
@ -469,12 +421,12 @@ drawtime:
mov ebx,80*65536+15 mov ebx,80*65536+15
mov ecx,45*65536+12 mov ecx,45*65536+12
mov edx,0xffffff mov edx,0xffffff
bt dword [params],0 test [params], 1
jnc noblue1 jz noblue1
mov edx,0x4e00e7 mov edx,0x4e00e7
noblue1: noblue1:
mcall mcall
mov eax,47 mov al,47
mov edx,82*65536+47 mov edx,82*65536+47
xor esi,esi xor esi,esi
movzx ecx,byte [time] movzx ecx,byte [time]
@ -489,7 +441,7 @@ drawflag:
mov edx,7 mov edx,7
mov esi,0xe0e0e0 mov esi,0xe0e0e0
mcall mcall
mov eax,4 mov al,4
mov ebx,153*65536+47 mov ebx,153*65536+47
xor ecx,ecx xor ecx,ecx
mov esi,1 mov esi,1
@ -502,10 +454,11 @@ drawflag:
ret ret
; DATA AREA ; DATA AREA
buttext db 'SHOW' buttext db 'SHOW',0
flag db 'V ' flag db 'V '
title db 'SCREENSAVER SETUP',0 title db 'SCREENSAVER SETUP',0
setuptext db 'TYPE: < >TIME: < > MINUTES NEVER' setuptext db 'TYPE: < >',0
db 'TIME: < > MINUTES NEVER',0
typetext db 'BLACK SCREENCOLOR LINES ASSEMBLER ' typetext db 'BLACK SCREENCOLOR LINES ASSEMBLER '
type dd 12 type dd 12
time db 15 ; ¢à¥¬ï ¤® § ¯ã᪠ § áâ ¢ª¨ ¢ ¬¨­ãâ å time db 15 ; ¢à¥¬ï ¤® § ¯ã᪠ § áâ ¢ª¨ ¢ ¬¨­ãâ å
@ -527,11 +480,12 @@ stringlen dd 1
stringstart dd 0 stringstart dd 0
stringpos dw 10 stringpos dw 10
params dd 0 ;if bit 0 set-ssaver works if bit 1 set-setup works params db 0 ;if bit 0 set-ssaver works if bit 1 set-setup works
fileinfo: fileinfo:
dd 0,0,21,data_from_file,work_area ; used_memory-0x3000-data_from_file = ~50 Kb with current settings
db '/RD/1/SS.ASM',0 dd 0,0,0,used_memory-0x3000-data_from_file,data_from_file
db '/RD/1/NETWORK/PPP.ASM',0
I_END: I_END:
@ -539,11 +493,9 @@ I_END:
; UNINITIALIZED DATA: ; UNINITIALIZED DATA:
lcolor dd ? lcolor dd ?
evtime dd ? ; ¢à¥¬ï ¯à¥¤ë¤ã饣® ᮡëâ¨ï
x_max dw ? ; à §¬¥àë íªà ­  x_max dw ? ; à §¬¥àë íªà ­ 
y_max dw ? y_max dw ?
top_right_corner dd ? top_right_corner dd ?
work_area: filesize dd ?
rb 0x10000
data_from_file: data_from_file: