Rev 485 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 485 | Rev 532 | ||
---|---|---|---|
1 | ; Interface |
1 | ; Interface |
2 | 2 | ||
3 | macro Window xStart,yStart,xSize,ySize,bColor,gColor,fColor |
3 | macro Window xStart,yStart,xSize,ySize,bColor,gColor,fColor |
4 | { |
4 | { |
5 | mov ebx,xStart |
5 | __mov ebx,xStart,xSize |
6 | shl ebx,16 |
- | |
7 | add ebx,xSize |
- | |
8 | mov ecx,yStart |
6 | __mov ecx,yStart,ySize |
9 | shl ecx,16 |
- | |
10 | add ecx,ySize |
- | |
11 | mov edx,bColor |
7 | __mov edx,bColor |
12 | mov esi,gColor |
8 | __mov esi,gColor |
13 | mov edi,fColor |
9 | __mov edi,fColor |
14 | xor eax,eax |
10 | xor eax,eax |
15 | mcall |
11 | mcall |
16 | } |
12 | } |
17 | 13 | ||
18 | 14 | ||
19 | ;WriteTextToWindow |
15 | ;WriteTextToWindow |
20 | macro Text xStart,yStart,rgbColor,pText,nTextLen |
16 | macro Text xStart,yStart,rgbColor,pText,nTextLen |
21 | { |
17 | { |
22 | mov ebx,xStart |
18 | __mov ebx,xStart,yStart |
23 | shl ebx,16 |
- | |
24 | add ebx,yStart |
- | |
25 | mov ecx,rgbColor |
19 | __mov ecx,rgbColor |
26 | mov edx,pText |
20 | __mov edx,pText |
27 | mov esi,nTextLen |
21 | __mov esi,nTextLen |
28 | mov eax,4 |
22 | mov eax,4 |
29 | mcall |
23 | mcall |
30 | } |
24 | } |
31 | 25 | ||
32 | ;DisplayNumber |
26 | ;DisplayNumber |
33 | macro Number xStart,yStart,nPrintType,noOfDigits,Data,rgbColor |
27 | macro Number xStart,yStart,nPrintType,noOfDigits,Data,rgbColor |
34 | { |
28 | { |
35 | - | ||
36 | mov edx,xStart |
29 | __mov edx,xStart,yStart |
37 | shl edx,16 |
- | |
38 | add edx,yStart |
- | |
39 | mov ebx,noOfDigits |
30 | __mov ebx,noOfDigits,nPrintType |
40 | shl ebx,16 |
- | |
41 | or ebx,nPrintType |
- | |
42 | mov ecx,Data |
31 | __mov ecx,Data |
43 | mov esi,rgbColor |
32 | __mov esi,rgbColor |
44 | mov eax,47 |
33 | mov eax,47 |
45 | mcall |
34 | mcall |
46 | } |
35 | } |
47 | 36 | ||
48 | macro DrawLine xStart,xEnd,yStart,yEnd,rgbColor |
37 | macro DrawLine xStart,xEnd,yStart,yEnd,rgbColor |
49 | { |
38 | { |
50 | mov ebx,xStart |
39 | __mov ebx,xStart,xEnd |
51 | shl ebx,16 |
- | |
52 | add ebx,xEnd |
- | |
53 | mov ecx,yStart |
40 | __mov ecx,yStart,yEnd |
54 | shl ecx,16 |
- | |
55 | add ecx, yEnd |
- | |
56 | mov edx,rgbColor |
41 | __mov edx,rgbColor |
57 | mov eax,38 |
42 | mov eax,38 |
58 | mcall |
43 | mcall |
59 | } |
44 | } |
60 | 45 | ||
61 | macro PutImage xPos,yPos,xImage,yImage,pImage |
46 | macro PutImage xPos,yPos,xImage,yImage,pImage |
62 | { |
47 | { |
63 | mov ecx,xImage |
48 | __mov ecx,xImage,yImage |
64 | shl ecx,16 |
- | |
65 | add ecx, yImage |
- | |
66 | mov edx,xPos |
49 | __mov edx,xPos,yPos |
67 | shl edx,16 |
- | |
68 | add edx,yPos |
- | |
69 | mov ebx,pImage |
50 | __mov ebx,pImage |
70 | mov eax,7 |
51 | mov eax,7 |
71 | mcall |
52 | mcall |
72 | } |
53 | } |
73 | 54 | ||
74 | macro Button xStart,yStart,xSize,ySize,nID,rgbColor |
55 | macro Button xStart,yStart,xSize,ySize,nID,rgbColor |
75 | { |
56 | { |
76 | mov ebx,xStart |
57 | __mov ebx,xStart,xSize |
77 | shl ebx,16 |
- | |
78 | add ebx,xSize |
- | |
79 | mov ecx,yStart |
58 | __mov ecx,yStart,ySize |
80 | shl ecx,16 |
- | |
81 | add ecx,ySize |
- | |
82 | mov edx,nID |
59 | __mov edx,nID |
83 | mov esi,rgbColor |
60 | __mov esi,rgbColor |
84 | mov eax,8 |
61 | mov eax,8 |
85 | mcall |
62 | mcall |
86 | } |
63 | } |
87 | 64 | ||
88 | macro CreateTread EntryPoint,StackPos |
65 | macro CreateTread EntryPoint,StackPos |
89 | { |
66 | { |
90 | xor ebx,ebx |
67 | xor ebx,ebx |
91 | inc ebx |
68 | inc ebx |
92 | mov ecx,EntryPoint |
69 | mov ecx,EntryPoint |
93 | mov edx,StackPos |
70 | mov edx,StackPos |
94 | mov eax,51 |
71 | mov eax,51 |
95 | mcall |
72 | mcall |
96 | } |
73 | } |