Rev 316 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 316 | Rev 485 | ||
---|---|---|---|
Line 16... | Line 16... | ||
16 | dd 0x1000 |
16 | dd 0x1000 |
17 | dd 0x1000 |
17 | dd 0x1000 |
18 | dd 0x0 , 0x0 |
18 | dd 0x0 , 0x0 |
Line 19... | Line 19... | ||
19 | 19 | ||
20 | include "lang.inc" |
20 | include "lang.inc" |
Line 21... | Line 21... | ||
21 | include "macros.inc" |
21 | include "..\..\..\macros.inc" |
22 | 22 | ||
23 | 23 | ||
Line 28... | Line 28... | ||
28 | still: |
28 | still: |
Line 29... | Line 29... | ||
29 | 29 | ||
30 | 30 | ||
31 | mov eax,23 ; wait for timeout |
31 | mov eax,23 ; wait for timeout |
Line 32... | Line 32... | ||
32 | mov ebx,50 |
32 | mov ebx,50 |
33 | int 0x40 |
33 | mcall |
Line 34... | Line 34... | ||
34 | 34 | ||
Line 42... | Line 42... | ||
42 | 42 | ||
Line 43... | Line 43... | ||
43 | jmp still |
43 | jmp still |
44 | 44 | ||
45 | button: |
45 | button: |
Line 46... | Line 46... | ||
46 | mov al,17 ; get id |
46 | mov al,17 ; get id |
47 | int 0x40 |
47 | mcall |
48 | 48 | ||
49 | cmp ah,1 ; button id=1 ? |
49 | cmp ah,1 ; button id=1 ? |
50 | jne noclose |
50 | jne noclose |
Line 51... | Line 51... | ||
51 | or eax,-1 ; close this program |
51 | or eax,-1 ; close this program |
Line 52... | Line 52... | ||
52 | int 0x40 |
52 | mcall |
Line 53... | Line 53... | ||
53 | noclose: |
53 | noclose: |
54 | 54 | ||
55 | jmp still |
55 | jmp still |
56 | 56 | ||
57 | drawclock: |
57 | drawclock: |
58 | 58 | ||
59 | mov eax,3 ; get time |
59 | mov eax,3 ; get time |
Line 80... | Line 80... | ||
80 | test byte[edi],8 |
80 | test byte[edi],8 |
81 | je nobit |
81 | je nobit |
82 | mov edx,0x00ff0000 |
82 | mov edx,0x00ff0000 |
83 | nobit: |
83 | nobit: |
84 | mov eax,13 ; plot 8,4,2,1 |
84 | mov eax,13 ; plot 8,4,2,1 |
85 | int 0x40 |
85 | mcall |
86 | add ecx,12*65536 |
86 | add ecx,12*65536 |
87 | shl byte[edi],1 |
87 | shl byte[edi],1 |
88 | inc esi |
88 | inc esi |
89 | cmp esi,4 |
89 | cmp esi,4 |
90 | jne plotlp |
90 | jne plotlp |
91 | shr byte[edi],4 |
91 | shr byte[edi],4 |
92 | mov edx,0x00880040 |
92 | mov edx,0x00880040 |
93 | mov eax,13 ; draw digit box |
93 | mov eax,13 ; draw digit box |
94 | int 0x40 |
94 | mcall |
95 | pusha |
95 | pusha |
96 | mov edx,ebx |
96 | mov edx,ebx |
97 | and edx,0xffff0000 |
97 | and edx,0xffff0000 |
98 | shr ecx,16 |
98 | shr ecx,16 |
99 | or edx,ecx |
99 | or edx,ecx |
100 | add edx,3*65536+2 |
100 | add edx,3*65536+2 |
101 | mov ebx,0x00010100 |
101 | mov ebx,0x00010100 |
102 | mov ecx,[edi] |
102 | mov ecx,[edi] |
103 | mov esi,0x00ffffff |
103 | mov esi,0x00ffffff |
104 | mov eax,47 ; display decimal |
104 | mov eax,47 ; display decimal |
105 | int 0x40 |
105 | mcall |
106 | popa |
106 | popa |
107 | sub ebx,12*65536 |
107 | sub ebx,12*65536 |
108 | inc edi |
108 | inc edi |
109 | cmp edi,dg1+6 |
109 | cmp edi,dg1+6 |
110 | jne digitlp |
110 | jne digitlp |
Line 114... | Line 114... | ||
114 | drawwindow: |
114 | drawwindow: |
Line 115... | Line 115... | ||
115 | 115 | ||
116 | 116 | ||
117 | mov eax,12 |
117 | mov eax,12 |
Line 118... | Line 118... | ||
118 | mov ebx,1 ; start redraw |
118 | mov ebx,1 ; start redraw |
119 | int 0x40 |
119 | mcall |
120 | 120 | ||
121 | xor eax,eax ; window |
121 | xor eax,eax ; window |
122 | mov ebx,100*65536+107 |
122 | mov ebx,100*65536+107 |
123 | mov ecx,100*65536+105 |
123 | mov ecx,100*65536+105 |
Line 124... | Line 124... | ||
124 | mov edx,0x33400088 |
124 | mov edx,0x33400088 |
Line 125... | Line 125... | ||
125 | mov edi,header |
125 | mov edi,title |
126 | int 0x40 |
126 | mcall |
127 | 127 | ||
Line 128... | Line 128... | ||
128 | call drawclock |
128 | call drawclock |
Line 129... | Line 129... | ||
129 | 129 | ||
130 | mov eax,12 |
130 | mov eax,12 |
131 | mov ebx,2 ; end redraw |
131 | mov ebx,2 ; end redraw |
132 | int 0x40 |
132 | mcall |