Subversion Repositories Kolibri OS

Rev

Rev 3943 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3943 Rev 4915
Line 1... Line 1...
1
;=============================================================================
1
;=============================================================================
2
; Kolibri Graphics Benchmark 0.7
2
; Kolibri Graphics Benchmark 0.81
3
;--------------------------------------
3
;--------------------------------------
4
; MGB - Menuet Graphics Benchmark 0.3
4
; MGB - Menuet Graphics Benchmark 0.3
5
; Compile with FASM
5
; Compile with FASM
6
;
6
;
7
;=============================================================================
7
;=============================================================================
-
 
8
; version:	0.81
-
 
9
; last update:  01/05/2014
-
 
10
; written by:   Marat Zakiyanov aka Mario79, aka Mario
-
 
11
; changes:      fix "benchmark GS selector" for some display sizes
-
 
12
;               (for example, 1366 by horizontal) and code optimization
-
 
13
;---------------------------------------------------------------------
8
; version:	0.8
14
; version:	0.8
9
; last update:  08/07/2013
15
; last update:  08/07/2013
10
; written by:   Marat Zakiyanov aka Mario79, aka Mario
16
; written by:   Marat Zakiyanov aka Mario79, aka Mario
11
; changes:      benchmark f4 with memory + f65
17
; changes:      benchmark f4 with memory + f65
12
;---------------------------------------------------------------------
18
;---------------------------------------------------------------------
Line 336... Line 342...
336
testGetScreen_f36:
342
testGetScreen_f36:
337
	xor	ebx,ebx
343
	xor	ebx,ebx
338
	mcall	36,[area_for_f36],<90,123>,<15,33>
344
	mcall	36,[area_for_f36],<90,123>,<15,33>
339
	ret
345
	ret
340
;---------------------------------------------------------------------
346
;---------------------------------------------------------------------
-
 
347
GS_start_x = 15
-
 
348
GS_start_y = 33
-
 
349
GS_size_x = 90
-
 
350
GS_size_y = 123
-
 
351
;-----------------------------------------------------------------------------
341
align 4
352
align 4
342
testGetScreen_GS:
353
testGetScreen_GS:
343
	push	edi
354
	push	edi
344
	mov	[start_x],15
-
 
345
	mov	[start_y],33
-
 
346
	mov	[size_x],90
-
 
347
	mov	[size_y],123
-
 
348
	mov	edi,[area_for_f36]
355
	mov	edi,[area_for_f36]
Line 349... Line 356...
349
 
356
 
350
	mcall	61,2
357
	mcall	61,2
351
	cmp	eax,24
358
	cmp	eax,24
352
	je	get_area_with_GS_24
359
	je	get_area_with_GS_24
353
;-----------------------------------------------------------------------------
360
;-----------------------------------------------------------------------------
354
align 4
361
align 4
355
get_area_with_GS_32:
362
get_area_with_GS_32:
356
	mcall	61,1
-
 
357
	shr	eax,16
-
 
358
	shl	eax,2
363
	mcall	61,3
Line 359... Line 364...
359
	mov	[offset_x],eax
364
	mov	ebx,eax
360
 
365
 
Line 361... Line 366...
361
	mov	esi,[start_y]
366
	mov	esi,GS_start_y
362
	imul	esi,eax
367
	imul	esi,eax
363
 
368
 
Line 364... Line 369...
364
	mov	eax,[start_x]
369
	mov	eax,GS_start_x
-
 
370
	shl	eax,2
365
	shl	eax,2
371
	add	esi,eax
366
	add	esi,eax
372
 
Line 367... Line 373...
367
 
373
	mov	ebp,GS_size_x
368
	mov	eax,[size_x]
-
 
369
	shl	eax,2
374
	mov	eax,ebp
370
	sub	[offset_x],eax
-
 
371
 
375
	shl	eax,2
372
	mov	edx,[size_y]
376
	sub	ebx,eax
373
	mov	ebx,[offset_x]
377
 
374
	sub	esi,ebx
378
	mov	edx,GS_size_y
375
	mov	ebp,[size_x]
379
	sub	esi,ebx
Line 395... Line 399...
395
	pop	edi
399
	pop	edi
396
	ret
400
	ret
397
;-----------------------------------------------------------------------------
401
;-----------------------------------------------------------------------------
398
align 4
402
align 4
399
get_area_with_GS_24:
403
get_area_with_GS_24:
400
	mcall	61,1
404
	mcall	61,3
401
	shr	eax,16
-
 
402
	lea	eax,[eax*3]
-
 
403
	mov	[offset_x],eax
405
	mov	ebx,eax
Line 404... Line 406...
404
 
406
 
405
	mov	esi,[start_y]
407
	mov	esi,GS_start_y
Line 406... Line 408...
406
	imul	esi,eax
408
	imul	esi,eax
407
 
409
 
408
	mov	eax,[start_x]
410
	mov	eax,GS_start_x
Line 409... Line 411...
409
	lea	eax,[eax*3]
411
	lea	eax,[eax*3]
-
 
412
	add	esi,eax
410
	add	esi,eax
413
 
411
 
414
	mov	ebp,GS_size_x
Line 412... Line 415...
412
	mov	eax,[size_x]
415
	mov	eax,ebp
413
	lea	eax,[eax*3]
-
 
414
	sub	[offset_x],eax
416
	lea	eax,[eax*3]
415
 
-
 
416
	mov	edx,[size_y]
417
	sub	ebx,eax
417
	mov	ebx,[offset_x]
418
 
418
	sub	esi,ebx
419
	mov	edx,GS_size_y
419
	mov	ebp,[size_x]
420
	sub	esi,ebx
420
;--------------------------------------
421
;--------------------------------------
Line 740... Line 741...
740
	aDrawingNumber	db 'Decimal Number, 8 digits',0
741
	aDrawingNumber	db 'Decimal Number, 8 digits',0
741
	aDrawingPixel	db 'Singolo pixel',0
742
	aDrawingPixel	db 'Singolo pixel',0
Line 742... Line 743...
742
 
743
 
743
	aTestText	db 'This is a 34-charachters test text'
744
	aTestText	db 'This is a 34-charachters test text'
744
	aButtonsText	db 'Test      Commenti    Pattern+     Apri        Salva',0
745
	aButtonsText	db 'Test      Commenti    Pattern+     Apri        Salva',0
Line 745... Line 746...
745
	aCaption	db 'Kolibri Graphical Benchmark 0.8',0
746
	aCaption	db 'Kolibri Graphical Benchmark 0.81',0
746
 
747
 
Line 747... Line 748...
747
	aLeft	db 'Sinistra:',0
748
	aLeft	db 'Sinistra:',0
Line 767... Line 768...
767
	aDrawingNumber	db 'Decimal Number, 8 digits',0
768
	aDrawingNumber	db 'Decimal Number, 8 digits',0
768
	aDrawingPixel	db 'Single Pixel',0
769
	aDrawingPixel	db 'Single Pixel',0
Line 769... Line 770...
769
 
770
 
770
	aTestText	db 'This is a 34-charachters test text'
771
	aTestText	db 'This is a 34-charachters test text'
771
	aButtonsText	db 'Test      Comment+    Pattern+      Open        Save',0
772
	aButtonsText	db 'Test      Comment+    Pattern+      Open        Save',0
Line 772... Line 773...
772
	aCaption	db 'Kolibri Graphical Benchmark 0.8',0
773
	aCaption	db 'Kolibri Graphical Benchmark 0.81',0
773
 
774
 
Line 774... Line 775...
774
	aLeft	db 'Left    :',0
775
	aLeft	db 'Left    :',0
Line 973... Line 974...
973
mouse_dd	rd 1
974
mouse_dd	rd 1
974
area_for_f36	rd 1
975
area_for_f36	rd 1
975
dwTestEndTime	rd 1
976
dwTestEndTime	rd 1
976
dwMainPID	rd 1
977
dwMainPID	rd 1
977
;-----------------------------------------------------------------------------
978
;-----------------------------------------------------------------------------
978
start_x		rd 1
-
 
979
start_y		rd 1
-
 
980
size_x		rd 1
-
 
981
size_y		rd 1
-
 
982
offset_x	rd 1
-
 
983
;---------------------------------------------------------------------
-
 
984
text_scren_buffer	rd 1
979
text_scren_buffer	rd 1
985
text_scren_buffer2	rd 1
980
text_scren_buffer2	rd 1
986
;---------------------------------------------------------------------
981
;---------------------------------------------------------------------
987
textarea:
982
textarea:
988
	rb 8
983
	rb 8