Rev 147 | Rev 485 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 147 | Rev 317 | ||
---|---|---|---|
Line 16... | Line 16... | ||
16 | 16 | ||
17 | include 'lang.inc' |
17 | include 'lang.inc' |
Line 18... | Line 18... | ||
18 | include 'macros.inc' |
18 | include 'macros.inc' |
19 | 19 | ||
20 | START: ; start of execution |
20 | START: ; start of execution |
Line 21... | Line 21... | ||
21 | 21 | red: |
|
Line 22... | Line 22... | ||
22 | call draw_window |
22 | call draw_window |
Line 33... | Line 33... | ||
33 | cmp eax,3 ; button in buffer ? |
33 | cmp eax,3 ; button in buffer ? |
34 | je button |
34 | je button |
Line 35... | Line 35... | ||
35 | 35 | ||
Line 36... | Line -... | ||
36 | jmp still |
- | |
37 | - | ||
38 | red: ; redraw |
- | |
39 | call draw_window |
- | |
40 | jmp still |
36 | jmp still |
41 | 37 | ||
42 | key: ; key |
38 | key: ; key |
43 | mov eax,2 ; just read it and ignore |
39 | mov eax,2 ; just read it and ignore |
44 | int 0x40 |
40 | int 0x40 |
Line 51... | Line 47... | ||
51 | int 0x40 |
47 | int 0x40 |
Line 52... | Line 48... | ||
52 | 48 | ||
53 | cmp ah,1 ; button id=1 ? |
49 | cmp ah,1 ; button id=1 ? |
Line 54... | Line 50... | ||
54 | jne noclose |
50 | jne noclose |
55 | 51 | ||
56 | mov eax,-1 ; close this program |
52 | or eax,-1 ; close this program |
Line 57... | Line 53... | ||
57 | int 0x40 |
53 | int 0x40 |
Line 76... | Line 72... | ||
76 | 72 | ||
77 | ; DRAW WINDOW |
73 | ; DRAW WINDOW |
78 | mov eax,0 ; function 0 : define and draw window |
74 | mov eax,0 ; function 0 : define and draw window |
79 | mov ebx,100*65536+270 ; [x start] *65536 + [x size] |
75 | mov ebx,100*65536+270 ; [x start] *65536 + [x size] |
80 | mov ecx,100*65536+80 ; [y start] *65536 + [y size] |
76 | mov ecx,100*65536+80 ; [y start] *65536 + [y size] |
81 | mov edx,0x83ffffff ; color of work area RRGGBB,8->color gl |
- | |
82 | mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl |
77 | mov edx,0x33ffffff ; color of work area RRGGBB,8->color gl |
83 | mov edi,0x005080d0 ; color of frames RRGGBB |
78 | mov edi,header |
Line 84... | Line 79... | ||
84 | int 0x40 |
79 | int 0x40 |
85 | - | ||
86 | mov eax,4 ; function 4 : write text to window |
- | |
87 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
- | |
88 | mov ecx,0x00ddeeff ; color of text RRGGBB |
- | |
89 | mov edx,labelt ; pointer to text beginning |
- | |
90 | mov esi,labellen-labelt ; text length |
80 | |
91 | int 0x40 |
81 | mov eax,4 ; function 4 : write text to window |
92 | xor ecx,0xFFFFFF |
82 | xor ecx,ecx |
93 | mov esi,4 |
83 | mov esi,4 |
94 | add ebx,23 |
84 | mov ebx,8*65536+8 |
95 | mov edx,tdec |
85 | mov edx,tdec |
96 | int 0x40 |
86 | int 0x40 |
97 | add ebx,23 |
87 | add ebx,23 |
Line 98... | Line 88... | ||
98 | mov edx,thex |
88 | mov edx,thex |
99 | int 0x40 |
89 | int 0x40 |
100 | 90 | ||
101 | mov ecx,[keyid] |
91 | mov ecx,[keyid] |
102 | mov eax,47 |
92 | mov eax,47 |
103 | mov ebx,3*65536 |
93 | mov ebx,3*65536 |
104 | mov edx,40*65536+31 |
94 | mov edx,40*65536+8 |
105 | mov esi,0x224466 |
95 | mov esi,0x224466 |
106 | int 0x40 |
96 | int 0x40 |
Line 117... | Line 107... | ||
117 | 107 | ||
Line 118... | Line 108... | ||
118 | ; DATA AREA |
108 | ; DATA AREA |
119 | 109 | ||
120 | tdec: db 'DEC:' |
- | |
121 | thex: db 'HEX:' |
110 | tdec: db 'DEC:' |
122 | labelt: |
- | |
123 | db 'KEYBOARD ASCIICODES-PRESS ANY KEY' |
111 | thex: db 'HEX:' |
124 | labellen:dd 0 |
112 | header db 'KEYBOARD ASCIICODES-PRESS ANY KEY',0 |