Subversion Repositories Kolibri OS

Rev

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

Rev 5763 Rev 6619
Line 1... Line 1...
1
; application : View3ds ver. 0.065 - tiny .3ds and .asc files viewer.
1
; application : View3ds ver. 0.066 - tiny .3ds and .asc files viewer
-
 
2
;		with a few graphics effects demonstration.
2
; compiler    : FASM
3
; compiler    : FASM
3
; system      : KolibriOS
4
; system      : KolibriOS
4
; author      : Macgub aka Maciej Guba
5
; author      : Macgub aka Maciej Guba
5
; email       : macgub3@wp.pl
6
; email       : macgub3@wp.pl
6
; web         : www.macgub.hekko.pl
7
; web	      : www.macgub.hekko.pl
7
; Fell free to use this intro in your own distribution of KolibriOS/MenuetOS.
8
; Fell free to use this intro in your own distribution of KolibriOS.
8
; Special greetings to all MenuetOS maniax in the world.
9
; Special greetings to KolibriOS team .
9
; I hope because my intros Christian Belive will be near to each of You.
10
; I hope because my intros Christian Belive will be near to each of You.
Line 10... Line 11...
10
 
11
 
11
 
12
 
12
; Some adjustments made by Madis Kalme
13
; Some adjustments made by Madis Kalme
13
; madis.kalme@mail.ee
14
; madis.kalme@mail.ee
14
; I tried optimizing it a bit, but don't know if it was successful. The objects
15
; I tried optimizing it a bit, but don't know if it was successful. The objects
15
; can be:
16
; can be:
16
; 1) Read from a file (*.3DS standard)
-
 
-
 
17
; 1) Read from a file (*.3DS standard)
Line 17... Line 18...
17
; 2) Written in manually (at the end of the code)
18
; 2) Written in manually (at the end of the code)
18
;include 'proc32.inc'
19
 
19
 
20
 
20
SIZE_X equ 512
21
SIZE_X equ 512
Line 51... Line 52...
51
	dd     0x0		; I_Icon
52
	dd     0x0		; I_Icon
52
 
53
 
Line 53... Line 54...
53
START:	  ; start of execution
54
START:	  ; start of execution
54
	cld
55
	cld
-
 
56
	mov    eax,14
-
 
57
	int    0x40
-
 
58
	sub    eax,150 shl 16 + 150
-
 
59
	mov    [size_y_var],ax
-
 
60
	shr    ax,1
-
 
61
	mov    [vect_y],ax
-
 
62
 
-
 
63
	shr    ax,1
-
 
64
	movzx  ebx,ax
-
 
65
	push   ebx
-
 
66
	fninit
-
 
67
	fild   dword[esp]
-
 
68
	fstp   [rsscale]
-
 
69
	pop    ebx
-
 
70
 
-
 
71
	shr    eax,16
-
 
72
	mov    [size_x_var],ax
-
 
73
	shr    ax,1
-
 
74
	mov    [vect_x],ax
-
 
75
 
-
 
76
 
55
	call   alloc_buffer_mem
77
	call   alloc_buffer_mem
56
	call   read_param
78
	call   read_param
57
	call   read_from_disk	 ; read, if all is ok eax = 0
79
	call   read_from_disk	 ; read, if all is ok eax = 0
58
	cmp    eax,0
80
	cmp    eax,0
59
	jne    .gen
81
	jne    .gen
Line 491... Line 513...
491
    cmp     [inc_bright_flag],0 	  ; increase brightness
513
    cmp     [inc_bright_flag],0 	  ; increase brightness
492
    je	    .no_inc_bright
514
    je	    .no_inc_bright
493
    movzx   ebx,[inc_bright_flag]
515
    movzx   ebx,[inc_bright_flag]
494
    shl     ebx,4
516
    shl     ebx,4
495
    mov     esi,screen
517
    mov     esi,[screen_ptr]
496
    mov     ecx,SIZE_X*SIZE_Y*3
518
    movzx   ecx,word[size_y_var]
-
 
519
    movzx   eax,word[size_x_var]
-
 
520
    mul     ecx
-
 
521
    lea     ecx,[eax*3]
497
if (Ext = MMX)|(Ext = SSE)
522
if (Ext = MMX)|(Ext = SSE)
498
    mov      bh,bl
523
    mov      bh,bl
499
    push     bx
524
    push     bx
500
    shl      ebx,16
525
    shl      ebx,16
501
    pop      bx
526
    pop      bx
Line 536... Line 561...
536
    paddusb xmm1,xmm0
561
    paddusb xmm1,xmm0
537
    movaps  [esi],xmm1
562
    movaps  [esi],xmm1
538
    add     esi,16
563
    add     esi,16
539
    sub     ecx,16
564
    sub     ecx,16
540
    jnz     .oop
565
    jnc     .oop
541
end if
566
end if
542
 
567
 
Line 543... Line 568...
543
.no_inc_bright:
568
.no_inc_bright:
Line 544... Line 569...
544
 
569
 
545
 
570
 
546
    cmp     [dec_bright_flag],0
571
    cmp     [dec_bright_flag],0
547
    je	    .no_dec_bright
572
    je	    .no_dec_bright
548
    movzx   ebx,[dec_bright_flag]
573
    movzx   ebx,[dec_bright_flag]
-
 
574
    shl     ebx,4
549
    shl     ebx,4
575
    mov     esi,[screen_ptr]
-
 
576
    movzx   eax,word[size_x_var]
-
 
577
    movzx   ecx,word[size_y_var]
550
    mov     esi,screen
578
    mul     ecx
551
    mov     ecx,SIZE_X*SIZE_Y*3
579
    lea     ecx,[eax*3]
552
if (Ext = MMX)|(Ext = SSE)
580
 if (Ext = MMX)|(Ext = SSE)
553
    mov      bh,bl
581
    mov      bh,bl
554
    push     bx
582
    push     bx
Line 588... Line 616...
588
    psubusb xmm1,xmm0
616
    psubusb xmm1,xmm0
589
    movaps  [esi],xmm1
617
    movaps  [esi],xmm1
590
    add     esi,16
618
    add     esi,16
591
    sub     ecx,16
619
    sub     ecx,16
592
    jnz     .oop1
620
    jnc     .oop1
593
end if
621
end if
594
  .no_dec_bright:
622
  .no_dec_bright:
595
;======================================commmented====================
623
;======================================commmented====================
596
if 0
624
if 0
597
if Ext >= SSE
625
if Ext >= SSE
598
    cmp     [max_flag],0
626
    cmp     [max_flag],0
Line 678... Line 706...
678
    pop eax
706
    pop eax
679
 
707
 
Line 680... Line 708...
680
    mov     eax,7	    ; put image
708
    mov     eax,7	    ; put image
681
    mov     ebx,screen
709
    mov     ebx,screen
-
 
710
    mov     ecx,[size_y_var]
682
    mov     ecx,SIZE_X shl 16 + SIZE_Y
711
  ;  mov     ecx,SIZE_X shl 16 + SIZE_Y
683
    mov     edx,5 shl 16 + 25
712
    mov     edx,5 shl 16 + 25
684
    int     0x40
713
    int     0x40
Line 685... Line 714...
685
 
714
 
686
	mov  eax,13
715
    mov  eax,13
-
 
716
    mov  bx,[size_x_var]
-
 
717
    add  ebx,18
-
 
718
    shl  ebx,16
687
    mov  ebx,530*65536+60
719
    mov  bx,60
-
 
720
    mov  cx,[size_y_var]
-
 
721
    sub  cx,2
-
 
722
    shl  ecx,16
688
    mov  ecx,510*65536+9
723
    mov  cx,9
689
    xor  edx,edx
724
    xor  edx,edx
Line 690... Line 725...
690
    int  40h
725
    int  40h
-
 
726
 
-
 
727
    mov  eax,4			   ; function 4 : write text to window
-
 
728
    mov  bx,[size_x_var]
-
 
729
    add  ebx,18
691
	
730
    shl  ebx,16
692
    mov  eax,4			   ; function 4 : write text to window
731
    mov  bx,[size_y_var]
693
    mov  ebx,530*65536+510	   ; [x start] *65536 + [y start]
732
    sub  bx,2	      ; [x start] *65536 + [y start]
694
    mov  ecx,0x00888888
733
    mov  ecx,0x00888888
695
    mov  edx,STRdata		   ; pointer to text beginning
734
    mov  edx,STRdata		   ; pointer to text beginning
Line 724... Line 763...
724
 
763
 
Line 725... Line 764...
725
 
764
 
726
 
765
 
727
alloc_buffer_mem:
766
alloc_buffer_mem:
728
    movzx    ecx,[size_x]
767
    movzx    ecx,word[size_x_var]
729
    movzx    eax,[size_y]
768
    movzx    eax,word[size_y_var]
-
 
769
    mul      ecx
-
 
770
    lea      ecx,[eax*3]
730
    mul      ecx
771
    add      ecx,16
731
    lea      ecx,[eax*3]
772
    and      ecx,0xfffffff0
732
    push     ecx
773
    push     ecx
733
    shl      eax,2
774
    shl      eax,2
734
    add      ecx,eax
775
    add      ecx,eax
Line 776... Line 817...
776
	lea	ecx,[ecx*5]
817
	lea	ecx,[ecx*5]
777
	add	ecx,28
818
	add	ecx,28
778
	shl	ecx,16
819
	shl	ecx,16
779
	add	ecx,14				;  ecx = [coord y]*65536 + [size y]
820
	add	ecx,14	 ;  ecx = [coord y]*65536 + [size y]
780
	mov	ebx,(SIZE_X+12+70)*65536+25	; [x start] *65536 + [size x]
821
	mov	bx,[size_x_var]
-
 
822
	shl	ebx,16
-
 
823
	add	ebx,(12+70)*65536+25	 ; [x start] *65536 + [size x]
781
	mov	edx,0x00000000			;  color  0x00RRGGBB
824
	mov	edx,0x00000000			;  color  0x00RRGGBB
782
	int	0x40
825
	int	0x40
783
 
826
 
Line 784... Line 827...
784
	mov	eax,4				; function 4 : write text to window
827
	mov	eax,4				; function 4 : write text to window
785
	movzx	ebx,byte[edi]
828
	movzx	ebx,byte[edi]
786
	sub	bl,2
829
	sub	bl,2
787
	lea	ebx,[ebx*3]
830
	lea	ebx,[ebx*3]
788
	lea	ebx,[ebx*5]
831
	lea	ebx,[ebx*5]
-
 
832
	mov	cx,[size_x_var]
-
 
833
	shl	ecx,16
-
 
834
	add	ebx,ecx
789
	add	ebx,(SIZE_X+12+70)*65536+28	; [x start] *65536 + [y start]
835
	add	ebx,(12+70)*65536+28	 ; [x start] *65536 + [y start]
790
	mov	ecx,0x00ddeeff			; font 1 & color ( 0xF0RRGGBB )
836
	mov	ecx,0x00ddeeff			; font 1 & color ( 0xF0RRGGBB )
791
	movzx	edx,byte[edi+12]		; current flag
837
	movzx	edx,byte[edi+12]		; current flag
792
	shl	edx,2				; * 4 = text length
838
	shl	edx,2				; * 4 = text length
793
	add	edx,dword[edi+13]		; pointer to text beginning
839
	add	edx,dword[edi+13]		; pointer to text beginning
794
	mov	esi,4				; text length -
840
	mov	esi,4				; text length -
Line 1601... Line 1647...
1601
ret
1647
ret
1602
 
1648
 
Line 1603... Line 1649...
1603
clrscr:
1649
clrscr:
1604
	mov	edi,screen
1650
	mov	edi,screen
1605
	mov	ecx,SIZE_X*SIZE_Y*3/4
1651
	movzx	ecx,word[size_x_var]
-
 
1652
	movzx	eax,word[size_y_var]
-
 
1653
	imul	ecx,eax
-
 
1654
	lea	ecx,[ecx*3]
-
 
1655
	shr	ecx,2
1606
	xor	eax,eax
1656
	xor	eax,eax
1607
      if Ext=NON
1657
      if Ext=NON
1608
	rep	stosd
1658
	rep	stosd
1609
      else
1659
      else if Ext = MMX
1610
	pxor	mm0,mm0
1660
	pxor	mm0,mm0
1611
      @@:
1661
      @@:
1612
	movq	[edi+00],mm0
1662
	movq	[edi+00],mm0
1613
	movq	[edi+08],mm0
1663
	movq	[edi+08],mm0
1614
	movq	[edi+16],mm0
1664
	movq	[edi+16],mm0
1615
	movq	[edi+24],mm0
1665
	movq	[edi+24],mm0
1616
	add	edi,32
1666
	add	edi,32
1617
	sub	ecx,8
1667
	sub	ecx,8
1618
	jnc	@b
1668
	jnc	@b
-
 
1669
      else
-
 
1670
	push	ecx
-
 
1671
	mov	ecx,edi
-
 
1672
	and	ecx,0x0000000f
-
 
1673
	rep	stosb
-
 
1674
	pop	ecx
-
 
1675
	and	ecx,0xfffffff0
-
 
1676
	xorps	xmm0,xmm0
-
 
1677
      @@:
-
 
1678
	movaps	[edi],xmm0
-
 
1679
	movaps	[edi+16],xmm0
-
 
1680
	movaps	[edi+32],xmm0
-
 
1681
	movaps	[edi+48],xmm0
-
 
1682
	add	edi,64
-
 
1683
	sub	ecx,16
-
 
1684
	jnz	@b
1619
      end if
1685
      end if
-
 
1686
 
1620
ret
1687
ret
Line 1621... Line 1688...
1621
 
1688
 
1622
 
1689
 
Line 2042... Line 2109...
2042
	mov	ebx,dword[xx2]
2109
	mov	ebx,dword[xx2]
2043
	ror	ebx,16
2110
	ror	ebx,16
2044
	mov	ecx,dword[xx3]
2111
	mov	ecx,dword[xx3]
2045
	ror	ecx,16
2112
	ror	ecx,16
2046
	mov	edi,screen
2113
	mov	edi,[screen_ptr]
2047
	mov	esi,envmap_cub
2114
	mov	esi,envmap_cub
2048
	cmp	[catmull_flag],0
2115
	cmp	[catmull_flag],0
2049
	je	@f
2116
	je	@f
2050
  ;      mov     edx,Z_buffer
2117
  ;	 mov	 edx,Z_buffer
2051
	mov	edx,[Zbuffer_ptr]
2118
	mov	edx,[Zbuffer_ptr]
2052
	call	tex_triangle_z
2119
	call	tex_triangle_z
Line 2570... Line 2637...
2570
 
2637
 
Line 2571... Line 2638...
2571
 
2638
 
2572
fill_Z_buffer:
2639
fill_Z_buffer:
2573
	mov	eax,0x70000000
-
 
2574
      ;  mov     edi,Z_buffer
2640
	mov	eax,0x70000000
2575
	mov	edi,[Zbuffer_ptr]
2641
	mov	edi,[Zbuffer_ptr]
-
 
2642
	movzx	ecx,word[size_x_var]
-
 
2643
	movzx	ebx,word[size_y_var]
-
 
2644
	imul	ecx,ebx
-
 
2645
      if     Ext>=SSE2
-
 
2646
	movd	xmm0,eax
-
 
2647
	shufps	xmm0,xmm0,0
-
 
2648
	push	ecx
-
 
2649
	mov	ecx,edi
-
 
2650
	and	edi,0xffffff00
-
 
2651
	and	ecx,0x000000ff
2576
	mov	ecx,SIZE_X*SIZE_Y
2652
	mov	edx,ecx
-
 
2653
	rep	stosd
-
 
2654
	pop	ecx
-
 
2655
	sub	ecx,edx
-
 
2656
      @@:
-
 
2657
	movaps	[edi],xmm0
-
 
2658
	movaps	[edi+16],xmm0
-
 
2659
	movaps	[edi+32],xmm0
-
 
2660
	movaps	[edi+48],xmm0
-
 
2661
	add	edi,64
-
 
2662
	sub	ecx,16
-
 
2663
	jnc	@b
-
 
2664
      else
-
 
2665
	rep	stosd
2577
	rep	stosd
2666
      end if
Line 2578... Line 2667...
2578
ret
2667
ret
2579
 
2668
 
2580
read_tp_variables:	      ; read [triangles_count_var] and  [points_count_var]
2669
read_tp_variables:	      ; read [triangles_count_var] and	[points_count_var]
Line 2957... Line 3046...
2957
buttons:				      ; draw some buttons (all but navigation and close )
3046
buttons:				      ; draw some buttons (all but navigation and close )
2958
	mov	edi,menu
3047
	mov	edi,menu
2959
      .again:
3048
      .again:
2960
	mov	eax,8			      ; function 8 : define and draw button
3049
	mov	eax,8		  ; function 8 : define and draw button
2961
	mov	ebx,(SIZE_X+10)*65536+62      ; [x start] *65536 + [x size]
3050
	mov	bx,[size_x_var]
-
 
3051
	shl	ebx,16
-
 
3052
	add	ebx,(10)*65536+62      ; [x start] *65536 + [x size]
2962
	movzx	ecx,byte[edi]		      ; button id = position+2
3053
	movzx	ecx,byte[edi]		      ; button id = position+2
2963
	sub	cl,2
3054
	sub	cl,2
2964
	lea	ecx,[ecx*5]
3055
	lea	ecx,[ecx*5]
2965
	lea	ecx,[ecx*3]
3056
	lea	ecx,[ecx*3]
2966
	add	ecx,25
3057
	add	ecx,25
2967
	shl	ecx,16
3058
	shl	ecx,16
Line 2974... Line 3065...
2974
	movzx	ebx,byte[edi]
3065
	movzx	ebx,byte[edi]
2975
	sub	bl,2				; button id, according to position
3066
	sub	bl,2				; button id, according to position
2976
	lea	ebx,[ebx*3]
3067
	lea	ebx,[ebx*3]
2977
	lea	ebx,[ebx*5]
3068
	lea	ebx,[ebx*5]
2978
	add	ebx,(SIZE_X+12)*65536+28	; [x start] *65536 + [y start]
3069
	mov	cx,[size_x_var]
-
 
3070
	shl	ecx,16
-
 
3071
	add	ebx,ecx
-
 
3072
	add	ebx,(12)*65536+28	 ; [x start] *65536 + [y start]
2979
	mov	ecx,0x00ddeeff			; font 1 & color ( 0xF0RRGGBB )
3073
	mov	ecx,0x00ddeeff			; font 1 & color ( 0xF0RRGGBB )
2980
	lea	edx,[edi+1]			; pointer to text beginning
3074
	lea	edx,[edi+1]			; pointer to text beginning
2981
	mov	esi,10				; text length
3075
	mov	esi,10				; text length
2982
	int	0x40
3076
	int	0x40
2983
	cmp	byte[edi+11],255		; if max_flag=255
3077
	cmp	byte[edi+11],255		; if max_flag=255
2984
	je	@f				; skip
3078
	je	@f				; skip
Line 3011... Line 3105...
3011
	int	0x40
3105
	int	0x40
3012
 
3106
 
Line 3013... Line 3107...
3013
	; DRAW WINDOW
3107
	; DRAW WINDOW
3014
	mov	eax,0		; function 0 : define and draw window
3108
	mov	eax,0		; function 0 : define and draw window
3015
	mov	ebx,100*65536;+SIZE_X;+80+30 ; [x start] *65536 + [x size]
3109
	mov	ebx,50*65536;+SIZE_X;+80+30 ; [x start] *65536 + [x size]
3016
	mov	ecx,100*65536;+SIZE_Y;+30    ; [y start] *65536 + [y size]
3110
	mov	ecx,50*65536;+SIZE_Y;+30    ; [y start] *65536 + [y size]
3017
	mov	bx,[size_x]
3111
	mov	bx,[size_x_var]
3018
	add	bx,115
3112
	add	bx,115
3019
	mov	cx,[size_y]
3113
	mov	cx,[size_y_var]
3020
	add	cx,30
3114
	add	cx,30
3021
	mov	edx,0x14000000	; color of work area RRGGBB,8->color gl
3115
	mov	edx,0x14000000	; color of work area RRGGBB,8->color gl
3022
	mov	edi,labelt	; WINDOW LABEL
3116
	mov	edi,labelt	; WINDOW LABEL
3023
	int	0x40
3117
	int	0x40
Line 3027... Line 3121...
3027
	.Y_ADD equ 1   ;-> offset of 'add vector' buttons
3121
	.Y_ADD equ 1   ;-> offset of 'add vector' buttons
Line 3028... Line 3122...
3028
 
3122
 
3029
	; ADD VECTOR LABEL      ; add vector buttons - 30 ++
3123
	; ADD VECTOR LABEL	; add vector buttons - 30 ++
-
 
3124
	mov	eax,4		; function 4 : write text to window
-
 
3125
	movzx	ebx,word[size_x_var]
3030
	mov	eax,4		; function 4 : write text to window
3126
	shl	ebx,16
3031
	mov	ebx,(SIZE_X+12)*65536+(168+15*(13+.Y_ADD))   ; [x start] *65536 + [y start]
3127
	add	ebx,(12)*65536+(168+15*(13+.Y_ADD))   ; [x start] *65536 + [y start]
3032
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3128
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3033
	mov	edx,labelvector      ; pointer to text beginning
3129
	mov	edx,labelvector      ; pointer to text beginning
3034
	mov	esi,labelvectorend-labelvector	   ; text length
3130
	mov	esi,labelvectorend-labelvector	   ; text length
3035
    ;    cmp     [move_flag],2
3131
    ;	 cmp	 [move_flag],2
3036
    ;    jne     @f
3132
    ;	 jne	 @f
3037
    ;    add     edx,navigation_size
3133
    ;	 add	 edx,navigation_size
3038
    ;  @@:
3134
    ;  @@:
3039
	int	0x40
3135
	int	0x40
3040
	 ; VECTOR Y- BUTTON
3136
	 ; VECTOR Y- BUTTON
-
 
3137
	mov	eax,8		; function 8 : define and draw button
-
 
3138
	movzx	ebx,word[size_x_var]
3041
	mov	eax,8		; function 8 : define and draw button
3139
	shl	ebx,16
3042
	mov	ebx,(SIZE_X+30)*65536+20     ; [x start] *65536 + [x size]
3140
	add	ebx,30*65536+20     ; [x start] *65536 + [x size]
3043
	mov	ecx,(165+15*(14+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3141
	mov	ecx,(165+15*(14+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3044
	mov	edx,30		 ; button id
3142
	mov	edx,30		 ; button id
3045
	mov	esi,0x6688dd	; button color RRGGBB
3143
	mov	esi,0x6688dd	; button color RRGGBB
3046
	int	0x40
3144
	int	0x40
3047
	;VECTOR Y- LABEL
3145
	;VECTOR Y- LABEL
-
 
3146
	mov	eax,4		; function 4 : write text to window
-
 
3147
	movzx	ebx,word[size_x_var]
3048
	mov	eax,4		; function 4 : write text to window
3148
	shl	ebx,16
3049
	mov	ebx,(SIZE_X+32)*65536+(168+15*(14+.Y_ADD))   ; [x start] *65536 + [y start]
3149
	add	ebx,(32)*65536+(168+15*(14+.Y_ADD))   ; [x start] *65536 + [y start]
3050
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3150
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3051
	mov	edx,labelyminus      ; pointer to text beginning
3151
	mov	edx,labelyminus      ; pointer to text beginning
3052
	mov	esi,labelyminusend-labelyminus	   ; text length
3152
	mov	esi,labelyminusend-labelyminus	   ; text length
3053
	cmp	[move_flag],2
3153
	cmp	[move_flag],2
3054
   ;     jne     @f
3154
   ;	 jne	 @f
3055
   ;     add     edx,navigation_size
3155
   ;	 add	 edx,navigation_size
3056
   ;   @@:
3156
   ;   @@:
3057
	int	0x40
3157
	int	0x40
3058
	; VECTOR Z+ BUTTON
3158
	; VECTOR Z+ BUTTON
-
 
3159
	mov	eax,8		; function 8 : define and draw button
-
 
3160
	movzx	ebx,word[size_x_var]
3059
	mov	eax,8		; function 8 : define and draw button
3161
	shl	ebx,16
3060
	mov	ebx,(SIZE_X+51)*65536+21     ; [x start] *65536 + [x size]
3162
	add	ebx,(51)*65536+21     ; [x start] *65536 + [x size]
3061
	mov	ecx,(165+15*(14+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3163
	mov	ecx,(165+15*(14+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3062
	mov	edx,31		 ; button id
3164
	mov	edx,31		 ; button id
3063
	mov	esi,0x6688dd	; button color RRGGBB
3165
	mov	esi,0x6688dd	; button color RRGGBB
3064
	int	0x40
3166
	int	0x40
3065
	;VECTOR Z+ LABEL
3167
	;VECTOR Z+ LABEL
-
 
3168
	mov	eax,4		; function 4 : write text to window
-
 
3169
	movzx	ebx,word[size_x_var]
3066
	mov	eax,4		; function 4 : write text to window
3170
	shl	ebx,16
3067
	mov	ebx,(SIZE_X+53)*65536+(168+15*(14+.Y_ADD))   ; [x start] *65536 + [y start]
3171
	add	ebx,(53)*65536+(168+15*(14+.Y_ADD))   ; [x start] *65536 + [y start]
3068
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3172
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3069
	mov	edx,labelzplus	    ; pointer to text beginning
3173
	mov	edx,labelzplus	    ; pointer to text beginning
3070
	mov	esi,labelzplusend-labelzplus	 ; text length
3174
	mov	esi,labelzplusend-labelzplus	 ; text length
3071
   ;     cmp     [move_flag],2
3175
   ;	 cmp	 [move_flag],2
Line 3075... Line 3179...
3075
 
3179
 
Line 3076... Line 3180...
3076
	int	0x40
3180
	int	0x40
3077
	; VECTOR x- BUTTON
3181
	; VECTOR x- BUTTON
3078
	mov	eax,8		; function 8 : define and draw button
3182
	mov	eax,8		; function 8 : define and draw button
-
 
3183
	movzx	ebx,word[size_x_var]
-
 
3184
	shl	ebx,16
3079
	mov	ebx,(SIZE_X+10)*65536+21     ; [x start] *65536 + [x size]
3185
	add	ebx,(10)*65536+21     ; [x start] *65536 + [x size]
3080
	mov	ecx,(165+15*(15+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3186
	mov	ecx,(165+15*(15+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3081
	mov	edx,32		 ; button id
3187
	mov	edx,32		 ; button id
3082
	mov	esi,0x6688dd	; button color RRGGBB
3188
	mov	esi,0x6688dd	; button color RRGGBB
3083
	int	0x40
3189
	int	0x40
3084
	;VECTOR x- LABEL
3190
	;VECTOR x- LABEL
3085
	mov	eax,4		; function 4 : write text to window
3191
	mov	eax,4		; function 4 : write text to window
-
 
3192
	movzx	ebx,word[size_x_var]
-
 
3193
	shl	ebx,16
3086
	mov	ebx,(SIZE_X+12)*65536+(168+15*(15+.Y_ADD))   ; [x start] *65536 + [y start]
3194
	add	ebx,(12)*65536+(168+15*(15+.Y_ADD))   ; [x start] *65536 + [y start]
3087
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3195
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3088
	mov	edx,labelxminus      ; pointer to text beginning
3196
	mov	edx,labelxminus      ; pointer to text beginning
3089
	mov	esi,labelxminusend-labelxminus	   ; text length
3197
	mov	esi,labelxminusend-labelxminus	   ; text length
3090
   ;     cmp     [move_flag],2
3198
   ;	 cmp	 [move_flag],2
3091
   ;     jne     @f
3199
   ;	 jne	 @f
3092
   ;     add     edx,navigation_size
3200
   ;	 add	 edx,navigation_size
3093
   ;   @@:
3201
   ;   @@:
3094
	int	0x40
3202
	int	0x40
3095
	; VECTOR x+ BUTTON
3203
	; VECTOR x+ BUTTON
3096
	mov	eax,8		; function 8 : define and draw button
3204
	mov	eax,8		; function 8 : define and draw button
-
 
3205
	movzx	ebx,word[size_x_var]
-
 
3206
	shl	ebx,16
3097
	mov	ebx,(SIZE_X+51)*65536+21     ; [x start] *65536 + [x size]
3207
	add	ebx,(51)*65536+21     ; [x start] *65536 + [x size]
3098
	mov	ecx,(165+15*(15+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3208
	mov	ecx,(165+15*(15+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3099
	mov	edx,33		 ; button id
3209
	mov	edx,33		 ; button id
3100
	mov	esi,0x6688dd	; button color RRGGBB
3210
	mov	esi,0x6688dd	; button color RRGGBB
3101
	int	0x40
3211
	int	0x40
3102
	;VECTOR x+ LABEL
3212
	;VECTOR x+ LABEL
3103
	mov	eax,4		; function 4 : write text to window
3213
	mov	eax,4		; function 4 : write text to window
-
 
3214
	movzx	ebx,word[size_x_var]
-
 
3215
	shl	ebx,16
3104
	mov	ebx,(SIZE_X+53)*65536+(168+15*(15+.Y_ADD))   ; [x start] *65536 + [y start]
3216
	add	ebx,(53)*65536+(168+15*(15+.Y_ADD))   ; [x start] *65536 + [y start]
3105
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3217
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3106
	mov	edx,labelxplus	    ; pointer to text beginning
3218
	mov	edx,labelxplus	    ; pointer to text beginning
3107
	mov	esi,labelxplusend-labelxplus	 ; text length
3219
	mov	esi,labelxplusend-labelxplus	 ; text length
3108
   ;     cmp     [move_flag],2
3220
   ;	 cmp	 [move_flag],2
3109
   ;     jne     @f
3221
   ;	 jne	 @f
3110
   ;     add     edx,navigation_size
3222
   ;	 add	 edx,navigation_size
3111
   ;   @@:
3223
   ;   @@:
3112
	int	0x40
3224
	int	0x40
3113
	; VECTOR z- BUTTON
3225
	; VECTOR z- BUTTON
3114
	mov	eax,8		; function 8 : define and draw button
3226
	mov	eax,8		; function 8 : define and draw button
-
 
3227
	movzx	ebx,word[size_x_var]
-
 
3228
	shl	ebx,16
3115
	mov	ebx,(SIZE_X+10)*65536+62-41	; [x start] *65536 + [x size]
3229
	add	ebx,(10)*65536+62-41	 ; [x start] *65536 + [x size]
3116
	mov	ecx,(25+140+15*(16+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3230
	mov	ecx,(25+140+15*(16+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3117
	mov	edx,34		 ; button id
3231
	mov	edx,34		 ; button id
3118
	mov	esi,0x6688dd	; button color RRGGBB
3232
	mov	esi,0x6688dd	; button color RRGGBB
3119
	int	0x40
3233
	int	0x40
3120
	;VECTOR z- LABEL
3234
	;VECTOR z- LABEL
3121
	mov	eax,4		; function 4 : write text to window
3235
	mov	eax,4		; function 4 : write text to window
-
 
3236
	movzx	ebx,word[size_x_var]
-
 
3237
	shl	ebx,16
3122
	mov	ebx,(SIZE_X+12)*65536+(168+15*(16+.Y_ADD))   ; [x start] *65536 + [y start]
3238
	add	ebx,(12)*65536+(168+15*(16+.Y_ADD))   ; [x start] *65536 + [y start]
3123
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3239
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3124
	mov	edx,labelzminus      ; pointer to text beginning
3240
	mov	edx,labelzminus      ; pointer to text beginning
3125
	mov	esi,labelzminusend-labelzminus	   ; text length
3241
	mov	esi,labelzminusend-labelzminus	   ; text length
3126
   ;     cmp     [move_flag],2
3242
   ;	 cmp	 [move_flag],2
3127
   ;     jne     @f
3243
   ;	 jne	 @f
3128
   ;     add     edx,navigation_size
3244
   ;	 add	 edx,navigation_size
3129
   ;   @@:
3245
   ;   @@:
3130
	int	0x40
3246
	int	0x40
3131
       ;VECTOR Y+ BUTTON
3247
       ;VECTOR Y+ BUTTON
3132
	mov	eax,8		; function 8 : define and draw button
3248
	mov	eax,8		; function 8 : define and draw button
-
 
3249
	movzx	ebx,word[size_x_var]
-
 
3250
	shl	ebx,16
3133
	mov	ebx,(SIZE_X+10+20)*65536+20	; [x start] *65536 + [x size]
3251
	add	ebx,(10+20)*65536+20	 ; [x start] *65536 + [x size]
3134
	mov	ecx,(165+15*(16+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3252
	mov	ecx,(165+15*(16+.Y_ADD))*65536+12  ; [y start] *65536 + [y size]
3135
	mov	edx,35		 ; button id
3253
	mov	edx,35		 ; button id
3136
	mov	esi,0x6688dd	; button color RRGGBB
3254
	mov	esi,0x6688dd	; button color RRGGBB
3137
	int	0x40
3255
	int	0x40
3138
	;VECTOR Y+ LABEL
3256
	;VECTOR Y+ LABEL
3139
	mov	eax,4		; function 4 : write text to window
3257
	mov	eax,4		; function 4 : write text to window
-
 
3258
	movzx	ebx,word[size_x_var]
-
 
3259
	shl	ebx,16
3140
	mov	ebx,(SIZE_X+32)*65536+(168+15*(16+.Y_ADD))   ; [x start] *65536 + [y start]
3260
	add	ebx,(32)*65536+(168+15*(16+.Y_ADD))   ; [x start] *65536 + [y start]
3141
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3261
	mov	ecx,0x00ddeeff	; font 1 & color ( 0xF0RRGGBB )
3142
	mov	edx,labelyplus	    ; pointer to text beginning
3262
	mov	edx,labelyplus	    ; pointer to text beginning
3143
	mov	esi,labelyplusend-labelyplus	 ; text length
3263
	mov	esi,labelyplusend-labelyplus	 ; text length
3144
   ;     cmp     [move_flag],2
3264
   ;	 cmp	 [move_flag],2
3145
   ;     jne     @f
3265
   ;	 jne	 @f
Line 3155... Line 3275...
3155
 
3275
 
Line 3156... Line 3276...
3156
   ; DATA AREA  ************************************
3276
   ; DATA AREA	************************************
3157
 
3277
 
3158
   include 'DATA.INC'
3278
   include 'DATA.INC'