Subversion Repositories Kolibri OS

Rev

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

Rev 5064 Rev 5160
Line 1... Line 1...
1
;=============================================================================
1
;=============================================================================
2
; Kolibri Graphics Benchmark 0.81
2
; Kolibri Graphics Benchmark 0.82
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.82
-
 
9
; last update:  03/11/2014
-
 
10
; written by:   Marat Zakiyanov aka Mario79, aka Mario
-
 
11
; changes:      fix "benchmark GS selector" for 16bpp (support SVN r.5154)
-
 
12
;---------------------------------------------------------------------
8
; version:	0.81
13
; version:	0.81
9
; last update:  01/05/2014
14
; last update:  01/05/2014
10
; written by:   Marat Zakiyanov aka Mario79, aka Mario
15
; written by:   Marat Zakiyanov aka Mario79, aka Mario
11
; changes:      fix "benchmark GS selector" for some display sizes
16
; changes:      fix "benchmark GS selector" for some display sizes
12
;               (for example, 1366 by horizontal) and code optimization
17
;               (for example, 1366 by horizontal) and code optimization
Line 372... Line 377...
372
	mov	edi,[area_for_f36]
377
	mov	edi,[area_for_f36]
Line 373... Line 378...
373
 
378
 
374
	mcall	61,2
379
	mcall	61,2
375
	cmp	eax,24
380
	cmp	eax,24
-
 
381
	je	get_area_with_GS_24
-
 
382
	
-
 
383
	cmp	eax,16
376
	je	get_area_with_GS_24
384
	je	get_area_with_GS_16
377
;-----------------------------------------------------------------------------
385
;-----------------------------------------------------------------------------
378
align 4
386
align 4
379
get_area_with_GS_32:
387
get_area_with_GS_32:
380
	mcall	61,3
388
	mcall	61,3
Line 456... Line 464...
456
 
464
 
457
	pop	edi
465
	pop	edi
458
	ret
466
	ret
459
;-----------------------------------------------------------------------------
467
;-----------------------------------------------------------------------------
-
 
468
align 4
-
 
469
get_area_with_GS_16:
-
 
470
	mcall	61,3
-
 
471
	mov	ebx,eax
-
 
472
 
-
 
473
	mov	esi,GS_start_y
-
 
474
	imul	esi,eax
-
 
475
 
-
 
476
	mov	eax,GS_start_x
-
 
477
	shl	eax,1
-
 
478
	add	esi,eax
-
 
479
 
-
 
480
	mov	ebp,GS_size_x
-
 
481
	mov	eax,ebp
-
 
482
	shl	eax,1
-
 
483
	sub	ebx,eax
-
 
484
 
-
 
485
	mov	edx,GS_size_y
-
 
486
	sub	esi,ebx
-
 
487
;--------------------------------------
-
 
488
align 4
-
 
489
.start_y:
-
 
490
	add	esi,ebx
-
 
491
	mov	ecx,ebp
-
 
492
;--------------------------------------
-
 
493
align 4
-
 
494
.start_x:
-
 
495
	xor	eax,eax
-
 
496
	mov	ax,[gs:esi]
-
 
497
        shl     eax, 3
-
 
498
        ror     eax, 8
-
 
499
        shl     ax, 2
-
 
500
        ror     eax, 8
-
 
501
        shl     al, 3
-
 
502
        rol     eax, 16
-
 
503
	mov	[edi],eax
-
 
504
	add	esi,2
-
 
505
	add	edi,3
-
 
506
 
-
 
507
        dec     ecx
-
 
508
        jnz     .start_x
-
 
509
 
-
 
510
        dec     edx
-
 
511
        jnz     .start_y
-
 
512
 
-
 
513
	pop	edi
-
 
514
	ret
-
 
515
;-----------------------------------------------------------------------------
460
align 4
516
align 4
461
testDrawVertLine:
517
testDrawVertLine:
462
	mcall	38,<300,300>,<30,380>,1090207Fh
518
	mcall	38,<300,300>,<30,380>,1090207Fh
463
	ret
519
	ret
464
;---------------------------------------------------------------------
520
;---------------------------------------------------------------------
Line 758... Line 814...
758
	aDrawingNumber	db 'Decimal Number, 8 digits',0
814
	aDrawingNumber	db 'Decimal Number, 8 digits',0
759
	aDrawingPixel	db 'Singolo pixel',0
815
	aDrawingPixel	db 'Singolo pixel',0
Line 760... Line 816...
760
 
816
 
761
	aTestText	db 'This is a 34-charachters test text'
817
	aTestText	db 'This is a 34-charachters test text'
762
	aButtonsText	db 'Test      Commenti    Pattern+     Apri        Salva',0
818
	aButtonsText	db 'Test      Commenti    Pattern+     Apri        Salva',0
Line 763... Line 819...
763
	aCaption	db 'Kolibri Graphical Benchmark 0.81',0
819
	aCaption	db 'Kolibri Graphical Benchmark 0.82',0
764
 
820
 
Line 765... Line 821...
765
	aLeft	db 'Sinistra:',0
821
	aLeft	db 'Sinistra:',0