Subversion Repositories Kolibri OS

Rev

Rev 551 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 551 Rev 4079
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;                                                           ;
2
;                                                           ;
3
;    Audio CD player; code by Dmitry Yushko - dma@bn.by     ;
3
;    Audio CD player; code by Dmitry Yushko - dma@bn.by     ;
4
;                                                           ;
4
;                                                           ;
5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
 
6
 
7
include "..\..\..\macros.inc"
7
include "..\..\..\macros.inc"
8
include "lang.inc"
8
include "lang.inc"
9
 
9
 
10
FALSE  equ 0
10
FALSE  equ 0
11
TRUE   equ 1
11
TRUE   equ 1
12
 
12
 
13
ESC_KEY   equ 27
13
ESC_KEY   equ 27
14
LEFT_KEY  equ 176
14
LEFT_KEY  equ 176
15
RIGHT_KEY equ 179
15
RIGHT_KEY equ 179
16
 
16
 
17
NORMAL_PLAY  equ 0
17
NORMAL_PLAY  equ 0
18
REPEAT_TRACK equ 1
18
REPEAT_TRACK equ 1
19
REPEAT_DISK  equ 2
19
REPEAT_DISK  equ 2
20
SHUFFLE_DISK equ 3
20
SHUFFLE_DISK equ 3
21
 
21
 
22
COLOR_FUNC_BUTS equ 0x00dddddd
22
COLOR_FUNC_BUTS equ 0x00dddddd
23
 
23
 
24
use32
24
use32
25
 
25
 
26
                  org    0x0
26
                  org    0x0
27
                  db     'MENUET01'              ; 8 byte id
27
                  db     'MENUET01'              ; 8 byte id
28
                  dd     0x01                      ; required os
28
                  dd     0x01                      ; required os
29
                  dd     START                   ; program start
29
                  dd     START                   ; program start
30
                  dd     I_END                   ; program image size
30
                  dd     I_END                   ; program image size
31
                  dd     0x2000                  ; required amount of memory
31
                  dd     0x2000                  ; required amount of memory
32
                  dd     0x2000                  ; esp = 0x7fff0
32
                  dd     0x2000                  ; esp = 0x7fff0
33
                  dd     0x0, 0x0              ; reserved=no extended header
33
                  dd     0x0, 0x0              ; reserved=no extended header
34
 
34
 
35
START:
35
START:
36
    call chk_cdrom                      ; start of execution
36
    call chk_cdrom                      ; start of execution
37
    call read_cd
37
    call read_cd
38
 
38
 
39
  red:                          ; redraw
39
  red:                          ; redraw
40
    call draw_window            ; at first, draw the window
40
    call draw_window            ; at first, draw the window
41
still:
41
still:
42
 
42
 
43
    mov  eax,23
43
    mov  eax,23
44
    mov  ebx,10                 ; wait here for event
44
    mov  ebx,10                 ; wait here for event
45
    mcall
45
    mcall
46
 
46
 
47
    cmp  eax,1                  ; redraw request ?
47
    cmp  eax,1                  ; redraw request ?
48
    jz   red
48
    jz   red
49
    cmp  eax,2                  ; key in buffer ?
49
    cmp  eax,2                  ; key in buffer ?
50
    jz   key
50
    jz   key
51
    cmp  eax,3                  ; button in buffer ?
51
    cmp  eax,3                  ; button in buffer ?
52
    jz   button
52
    jz   button
53
 
53
 
54
    call draw_info
54
    call draw_info
55
    cmp  [curr_trk],0
55
    cmp  [curr_trk],0
56
    je   @f
56
    je   @f
57
    call current_trk_time
57
    call current_trk_time
58
   @@:
58
   @@:
59
    jmp  still
59
    jmp  still
60
 
60
 
61
 
61
 
62
  key:                          ; key
62
  key:                          ; key
63
    mov  eax,2                  ; just read it and ignore
63
    mov  eax,2                  ; just read it and ignore
64
    mcall
64
    mcall
65
 
65
 
66
;======  hotkeys:
66
;======  hotkeys:
67
    cmp  ah,0x61
67
    cmp  ah,0x61
68
    jb   @f
68
    jb   @f
69
    cmp  ah,0x7a
69
    cmp  ah,0x7a
70
    ja   @f
70
    ja   @f
71
    and  ah,11011111b
71
    and  ah,11011111b
72
   @@:
72
   @@:
73
 
73
 
74
    cmp  ah,'P' ;PLAY
74
    cmp  ah,'P' ;PLAY
75
    jne  no_key_play
75
    jne  no_key_play
76
    call play_acd
76
    call play_acd
77
    jmp still
77
    jmp still
78
 no_key_play:
78
 no_key_play:
79
 
79
 
80
    cmp ah,'S' ;STOP
80
    cmp ah,'S' ;STOP
81
    jne no_key_stop
81
    jne no_key_stop
82
    mov [if_paused],FALSE
82
    mov [if_paused],FALSE
83
    call stop_playing
83
    call stop_playing
84
    jmp still
84
    jmp still
85
 no_key_stop:
85
 no_key_stop:
86
 
86
 
87
    cmp ah,'N' ;NEXT
87
    cmp ah,'N' ;NEXT
88
    jne no_key_next
88
    jne no_key_next
89
    call play_next_trk
89
    call play_next_trk
90
    jmp still
90
    jmp still
91
 no_key_next:
91
 no_key_next:
92
 
92
 
93
    cmp ah,'B' ;BACK
93
    cmp ah,'B' ;BACK
94
    jne no_key_back
94
    jne no_key_back
95
    call play_back_trk
95
    call play_back_trk
96
    jmp still
96
    jmp still
97
 no_key_back:
97
 no_key_back:
98
 
98
 
99
    cmp  ah,'F' ;FORWARD
99
    cmp  ah,'F' ;FORWARD
100
    jne  no_key_fwd
100
    jne  no_key_fwd
101
    call fast_forward
101
    call fast_forward
102
    jmp still
102
    jmp still
103
 no_key_fwd:
103
 no_key_fwd:
104
 
104
 
105
    cmp ah,'R' ;REWIND
105
    cmp ah,'R' ;REWIND
106
    jne no_key_rewind
106
    jne no_key_rewind
107
    call fast_rewind
107
    call fast_rewind
108
    jmp still
108
    jmp still
109
 no_key_rewind:
109
 no_key_rewind:
110
 
110
 
111
    cmp ah,'M' ;MODE
111
    cmp ah,'M' ;MODE
112
    jne no_key_mode
112
    jne no_key_mode
113
    call change_mode
113
    call change_mode
114
    jmp still
114
    jmp still
115
 no_key_mode:
115
 no_key_mode:
116
 
116
 
117
 
117
 
118
    cmp ah,'L' ;READ PLAYLIST
118
    cmp ah,'L' ;READ PLAYLIST
119
    jne no_key_list
119
    jne no_key_list
120
    mov [if_paused],FALSE
120
    mov [if_paused],FALSE
121
    mov [curr_trk],0
121
    mov [curr_trk],0
122
    call stop_playing
122
    call stop_playing
123
    call chk_cdrom
123
    call chk_cdrom
124
    call read_cd
124
    call read_cd
125
    jmp still
125
    jmp still
126
 no_key_list:
126
 no_key_list:
127
 
127
 
128
    cmp ah,50      ;F1 key
128
    cmp ah,50      ;F1 key
129
    jz  itsahelpkey
129
    jz  itsahelpkey
130
 
130
 
131
    cmp ah,'H' ;HELP
131
    cmp ah,'H' ;HELP
132
    jne no_key_help
132
    jne no_key_help
133
   itsahelpkey:
133
   itsahelpkey:
134
    cmp [flag],4
134
    cmp [flag],4
135
    je  still
135
    je  still
136
    cmp [flag],1
136
    cmp [flag],1
137
    jne was_it_ok_false
137
    jne was_it_ok_false
138
    mov [was_it_ok],TRUE
138
    mov [was_it_ok],TRUE
139
    jmp flag4_done
139
    jmp flag4_done
140
   was_it_ok_false:
140
   was_it_ok_false:
141
    mov [was_it_ok],FALSE
141
    mov [was_it_ok],FALSE
142
   flag4_done:
142
   flag4_done:
143
    mov [flag],4
143
    mov [flag],4
144
    mov [help_screen],1
144
    mov [help_screen],1
145
    call draw_window
145
    call draw_window
146
    jmp still
146
    jmp still
147
 no_key_help:
147
 no_key_help:
148
 
148
 
149
 
149
 
150
    cmp ah,ESC_KEY
150
    cmp ah,ESC_KEY
151
    jne no_esc_key
151
    jne no_esc_key
152
    cmp [flag],4
152
    cmp [flag],4
153
    jne still
153
    jne still
154
    cmp [was_it_ok],FALSE
154
    cmp [was_it_ok],FALSE
155
    jne was_it_ok_true
155
    jne was_it_ok_true
156
    mov [flag],0
156
    mov [flag],0
157
    jmp end_esc_key
157
    jmp end_esc_key
158
   was_it_ok_true:
158
   was_it_ok_true:
159
    mov [flag],1
159
    mov [flag],1
160
   end_esc_key:
160
   end_esc_key:
161
    call draw_window
161
    call draw_window
162
 no_esc_key:
162
 no_esc_key:
163
 
163
 
164
    cmp ah,LEFT_KEY
164
    cmp ah,LEFT_KEY
165
    jne no_left_key
165
    jne no_left_key
166
    cmp [flag],4
166
    cmp [flag],4
167
    jne still
167
    jne still
168
    cmp [help_screen],1
168
    cmp [help_screen],1
169
    jz  still
169
    jz  still
170
    dec [help_screen]
170
    dec [help_screen]
171
    call draw_window
171
    call draw_window
172
   no_left_key:
172
   no_left_key:
173
 
173
 
174
    cmp ah,RIGHT_KEY
174
    cmp ah,RIGHT_KEY
175
    jne no_right_key
175
    jne no_right_key
176
    cmp [flag],4
176
    cmp [flag],4
177
    jne still
177
    jne still
178
    cmp [help_screen],3
178
    cmp [help_screen],3
179
    jz  still
179
    jz  still
180
    inc [help_screen]
180
    inc [help_screen]
181
    call draw_window
181
    call draw_window
182
   no_right_key:
182
   no_right_key:
183
 
183
 
184
 
184
 
185
    jmp  still
185
    jmp  still
186
 
186
 
187
 
187
 
188
  button:                       ; button
188
  button:                       ; button
189
    mov  eax,17
189
    mov  eax,17
190
    mcall
190
    mcall
191
 
191
 
192
    cmp  ah,1                   ; button id=1 ?
192
    cmp  ah,1                   ; button id=1 ?
193
    jnz  no_but_close
193
    jnz  no_but_close
194
    mov  eax,24
194
    mov  eax,24
195
    mov  ebx,3
195
    mov  ebx,3
196
    mcall
196
    mcall
197
    mov  eax,0xffffffff         ; close this program
197
    mov  eax,0xffffffff         ; close this program
198
    mcall
198
    mcall
199
  no_but_close:
199
  no_but_close:
200
 
200
 
201
    cmp  ah,2
201
    cmp  ah,2
202
    jne  no_but_play
202
    jne  no_but_play
203
    call play_acd
203
    call play_acd
204
    jmp still
204
    jmp still
205
 no_but_play:
205
 no_but_play:
206
 
206
 
207
    cmp ah,3
207
    cmp ah,3
208
    jne no_but_stop
208
    jne no_but_stop
209
    mov [if_paused],FALSE
209
    mov [if_paused],FALSE
210
    call stop_playing
210
    call stop_playing
211
    jmp still
211
    jmp still
212
 no_but_stop:
212
 no_but_stop:
213
 
213
 
214
    cmp ah,4
214
    cmp ah,4
215
    jne no_but_reread
215
    jne no_but_reread
216
    mov [curr_trk],0
216
    mov [curr_trk],0
217
    call chk_cdrom
217
    call chk_cdrom
218
    call read_cd
218
    call read_cd
219
    mov [if_paused],FALSE
219
    mov [if_paused],FALSE
220
    call stop_playing
220
    call stop_playing
221
    jmp still
221
    jmp still
222
 no_but_reread:
222
 no_but_reread:
223
 
223
 
224
    cmp ah,5
224
    cmp ah,5
225
    jne no_but_next
225
    jne no_but_next
226
    call play_next_trk
226
    call play_next_trk
227
    jmp still
227
    jmp still
228
   no_but_next:
228
   no_but_next:
229
 
229
 
230
    cmp ah,6
230
    cmp ah,6
231
    jne no_but_back
231
    jne no_but_back
232
    call play_back_trk
232
    call play_back_trk
233
    jmp still
233
    jmp still
234
   no_but_back:
234
   no_but_back:
235
 
235
 
236
    cmp ah,7
236
    cmp ah,7
237
    jne no_but_mode
237
    jne no_but_mode
238
    call change_mode
238
    call change_mode
239
    jmp still
239
    jmp still
240
   no_but_mode:
240
   no_but_mode:
241
 
241
 
242
    cmp ah,8
242
    cmp ah,8
243
    jne no_but_frew
243
    jne no_but_frew
244
    call fast_rewind
244
    call fast_rewind
245
    jmp still
245
    jmp still
246
   no_but_frew:
246
   no_but_frew:
247
 
247
 
248
    cmp ah,9
248
    cmp ah,9
249
    jne no_but_ffwd
249
    jne no_but_ffwd
250
    call fast_forward
250
    call fast_forward
251
    jmp still
251
    jmp still
252
   no_but_ffwd:
252
   no_but_ffwd:
253
 
253
 
254
    cmp  ah,10
254
    cmp  ah,10
255
    jb   no_but_track
255
    jb   no_but_track
256
    cmp  ah,40
256
    cmp  ah,40
257
    ja   no_but_track
257
    ja   no_but_track
258
    call read_cd
258
    call read_cd
259
    cmp  [flag],1
259
    cmp  [flag],1
260
    jne  no_but_track
260
    jne  no_but_track
261
    mov  cl,ah
261
    mov  cl,ah
262
    sub  cl,10
262
    sub  cl,10
263
    mov  [curr_trk],cl
263
    mov  [curr_trk],cl
264
    mov  cl,[max_trk]
264
    mov  cl,[max_trk]
265
    mov  [shuftab],cl
265
    mov  [shuftab],cl
266
    call stop_playing
266
    call stop_playing
267
    call renew_shuftab
267
    call renew_shuftab
268
    call play_n_track
268
    call play_n_track
269
    call rem_time_trk
269
    call rem_time_trk
270
    jmp still
270
    jmp still
271
  no_but_track:
271
  no_but_track:
272
 
272
 
273
    jmp  still
273
    jmp  still
274
 
274
 
275
 
275
 
276
change_mode:
276
change_mode:
277
    cmp [mode],3
277
    cmp [mode],3
278
    jne inc_mode
278
    jne inc_mode
279
    mov [mode],0
279
    mov [mode],0
280
    jmp end_but_mode
280
    jmp end_but_mode
281
   inc_mode:
281
   inc_mode:
282
    inc [mode]
282
    inc [mode]
283
   end_but_mode:
283
   end_but_mode:
284
    call draw_info
284
    call draw_info
285
ret
285
ret
286
 
286
 
287
play_next_trk:
287
play_next_trk:
288
    cmp [curr_trk],0
288
    cmp [curr_trk],0
289
    je  @play_next_trk
289
    je  @play_next_trk
290
    cmp [if_paused],TRUE
290
    cmp [if_paused],TRUE
291
    je  @play_next_trk
291
    je  @play_next_trk
292
    cmp [mode],NORMAL_PLAY
292
    cmp [mode],NORMAL_PLAY
293
    jne play_next_mode1
293
    jne play_next_mode1
294
    xor eax,eax
294
    xor eax,eax
295
    mov al,[curr_trk]
295
    mov al,[curr_trk]
296
    cmp [max_trk],al
296
    cmp [max_trk],al
297
    je  @play_next_trk
297
    je  @play_next_trk
298
    inc [curr_trk]
298
    inc [curr_trk]
299
    cmp [if_stopped],TRUE
299
    cmp [if_stopped],TRUE
300
    je @play_next_trk
300
    je @play_next_trk
301
    call play_n_track
301
    call play_n_track
302
    jmp  @play_next_trk
302
    jmp  @play_next_trk
303
   play_next_mode1:
303
   play_next_mode1:
304
    cmp [mode],REPEAT_TRACK
304
    cmp [mode],REPEAT_TRACK
305
    jne play_next_mode2
305
    jne play_next_mode2
306
    cmp [if_stopped],TRUE
306
    cmp [if_stopped],TRUE
307
    je @play_next_trk
307
    je @play_next_trk
308
    call play_n_track
308
    call play_n_track
309
    jmp  @play_next_trk
309
    jmp  @play_next_trk
310
   play_next_mode2:
310
   play_next_mode2:
311
    cmp [mode],REPEAT_DISK
311
    cmp [mode],REPEAT_DISK
312
    jne play_next_mode3
312
    jne play_next_mode3
313
    xor eax,eax
313
    xor eax,eax
314
    mov al,[curr_trk]
314
    mov al,[curr_trk]
315
    cmp [max_trk],al
315
    cmp [max_trk],al
316
    jne  play_next_mode2_go
316
    jne  play_next_mode2_go
317
    mov [curr_trk],1
317
    mov [curr_trk],1
318
    cmp [if_stopped],TRUE
318
    cmp [if_stopped],TRUE
319
    je @play_next_trk
319
    je @play_next_trk
320
    call play_n_track
320
    call play_n_track
321
    jmp  @play_next_trk
321
    jmp  @play_next_trk
322
   play_next_mode2_go:
322
   play_next_mode2_go:
323
    inc  [curr_trk]
323
    inc  [curr_trk]
324
    cmp [if_stopped],TRUE
324
    cmp [if_stopped],TRUE
325
    je @play_next_trk
325
    je @play_next_trk
326
    call play_n_track
326
    call play_n_track
327
    jmp  @play_next_trk
327
    jmp  @play_next_trk
328
   play_next_mode3:
328
   play_next_mode3:
329
    cmp  [mode],SHUFFLE_DISK
329
    cmp  [mode],SHUFFLE_DISK
330
    jne  @play_next_trk
330
    jne  @play_next_trk
331
   call shuffle_track
331
   call shuffle_track
332
   @play_next_trk:
332
   @play_next_trk:
333
ret
333
ret
334
 
334
 
335
play_back_trk:
335
play_back_trk:
336
    cmp [curr_trk],0
336
    cmp [curr_trk],0
337
    je  @play_back_trk
337
    je  @play_back_trk
338
    cmp [if_paused],TRUE
338
    cmp [if_paused],TRUE
339
    je  @play_back_trk
339
    je  @play_back_trk
340
    cmp [mode],NORMAL_PLAY
340
    cmp [mode],NORMAL_PLAY
341
    jne play_back_mode1
341
    jne play_back_mode1
342
    xor eax,eax
342
    xor eax,eax
343
    mov al,[curr_trk]
343
    mov al,[curr_trk]
344
    cmp al,1
344
    cmp al,1
345
    je  @play_back_trk
345
    je  @play_back_trk
346
    dec [curr_trk]
346
    dec [curr_trk]
347
    cmp [if_stopped],TRUE
347
    cmp [if_stopped],TRUE
348
    je @play_next_trk
348
    je @play_next_trk
349
    call play_n_track
349
    call play_n_track
350
    jmp  @play_back_trk
350
    jmp  @play_back_trk
351
   play_back_mode1:
351
   play_back_mode1:
352
    cmp [mode],REPEAT_TRACK
352
    cmp [mode],REPEAT_TRACK
353
    jne play_back_mode2
353
    jne play_back_mode2
354
    cmp [if_stopped],TRUE
354
    cmp [if_stopped],TRUE
355
    je @play_next_trk
355
    je @play_next_trk
356
    call play_n_track
356
    call play_n_track
357
    jmp  @play_back_trk
357
    jmp  @play_back_trk
358
   play_back_mode2:
358
   play_back_mode2:
359
    cmp [mode],REPEAT_DISK
359
    cmp [mode],REPEAT_DISK
360
    jne play_back_mode3
360
    jne play_back_mode3
361
    xor eax,eax
361
    xor eax,eax
362
    mov al,[curr_trk]
362
    mov al,[curr_trk]
363
    cmp al,1
363
    cmp al,1
364
    jne  play_back_mode2_go
364
    jne  play_back_mode2_go
365
    mov al,[max_trk]
365
    mov al,[max_trk]
366
    mov [curr_trk],al
366
    mov [curr_trk],al
367
    cmp [if_stopped],TRUE
367
    cmp [if_stopped],TRUE
368
    je @play_next_trk
368
    je @play_next_trk
369
    call play_n_track
369
    call play_n_track
370
    jmp  @play_back_trk
370
    jmp  @play_back_trk
371
   play_back_mode2_go:
371
   play_back_mode2_go:
372
    dec  [curr_trk]
372
    dec  [curr_trk]
373
    cmp [if_stopped],TRUE
373
    cmp [if_stopped],TRUE
374
    je @play_next_trk
374
    je @play_next_trk
375
    call play_n_track
375
    call play_n_track
376
    jmp  @play_back_trk
376
    jmp  @play_back_trk
377
   play_back_mode3: ;(shuffle)
377
   play_back_mode3: ;(shuffle)
378
;   call shuffle_track
378
;   call shuffle_track
379
   @play_back_trk:
379
   @play_back_trk:
380
ret
380
ret
381
 
381
 
382
 
382
 
383
current_trk_time:
383
current_trk_time:
384
    cmp [if_stopped],TRUE
384
    cmp [if_stopped],TRUE
385
    je  menshe
385
    je  menshe
386
    call get_uptime
386
    call get_uptime
387
    mov ebx,[stimtrk]
387
    mov ebx,[stimtrk]
388
    sub eax,ebx
388
    sub eax,ebx
389
   ; eax now is seconds from track start * 100
389
   ; eax now is seconds from track start * 100
390
    xor edx,edx
390
    xor edx,edx
391
    mov ecx,100
391
    mov ecx,100
392
    div ecx
392
    div ecx
393
    mov [curr_trk_pg_time],eax
393
    mov [curr_trk_pg_time],eax
394
    mov ebx,[curr_trk_length]
394
    mov ebx,[curr_trk_length]
395
;    add eax,1 ;{inc curr time on 1 sec)
395
;    add eax,1 ;{inc curr time on 1 sec)
396
    cmp eax,ebx
396
    cmp eax,ebx
397
    jb  menshe
397
    jb  menshe
398
    call stop_playing
398
    call stop_playing
399
    cmp [mode],SHUFFLE_DISK
399
    cmp [mode],SHUFFLE_DISK
400
    jne @f
400
    jne @f
401
    call shuffle_track
401
    call shuffle_track
402
   @@:
402
   @@:
403
    cmp [mode],REPEAT_TRACK
403
    cmp [mode],REPEAT_TRACK
404
    je  @@mode_repeat_1
404
    je  @@mode_repeat_1
405
    mov al,[max_trk]
405
    mov al,[max_trk]
406
    cmp [curr_trk],al
406
    cmp [curr_trk],al
407
    jb  @@next_trk_ok
407
    jb  @@next_trk_ok
408
    cmp [mode],REPEAT_DISK
408
    cmp [mode],REPEAT_DISK
409
    jne menshe
409
    jne menshe
410
    mov [curr_trk],0
410
    mov [curr_trk],0
411
   @@next_trk_ok:
411
   @@next_trk_ok:
412
    inc [curr_trk]
412
    inc [curr_trk]
413
   @@mode_repeat_1:
413
   @@mode_repeat_1:
414
    call play_n_track
414
    call play_n_track
415
   menshe:
415
   menshe:
416
ret
416
ret
417
 
417
 
418
 
418
 
419
rem_time_trk:
419
rem_time_trk:
420
    call get_uptime
420
    call get_uptime
421
    mov  [stimtrk],eax
421
    mov  [stimtrk],eax
422
    ret
422
    ret
423
 
423
 
424
fast_forward:
424
fast_forward:
425
    cmp [if_stopped],TRUE
425
    cmp [if_stopped],TRUE
426
    je end_ffwd
426
    je end_ffwd
427
    mov eax,[curr_trk_pg_time]
427
    mov eax,[curr_trk_pg_time]
428
    add eax,5
428
    add eax,5
429
    cmp eax,[curr_trk_length]
429
    cmp eax,[curr_trk_length]
430
    jae end_ffwd
430
    jae end_ffwd
431
    cmp [stimtrk],500
431
    cmp [stimtrk],500
432
    jbe end_ffwd
432
    jbe end_ffwd
433
    sub [stimtrk],500
433
    sub [stimtrk],500
434
    call current_trk_time
434
    call current_trk_time
435
    call play_from_x_time
435
    call play_from_x_time
436
   end_ffwd:
436
   end_ffwd:
437
ret
437
ret
438
 
438
 
439
fast_rewind:
439
fast_rewind:
440
    cmp [if_stopped],TRUE
440
    cmp [if_stopped],TRUE
441
    je end_frew
441
    je end_frew
442
    cmp [curr_trk_pg_time],5
442
    cmp [curr_trk_pg_time],5
443
    jbe end_frew
443
    jbe end_frew
444
    add [stimtrk],500
444
    add [stimtrk],500
445
    call current_trk_time
445
    call current_trk_time
446
    call play_from_x_time
446
    call play_from_x_time
447
   end_frew:
447
   end_frew:
448
ret
448
ret
449
 
449
 
450
renew_shuftab:
450
renew_shuftab:
451
    mov  ecx,40
451
    mov  ecx,40
452
   @rn:
452
   @rn:
453
    mov  [shuftab+ecx],cl
453
    mov  [shuftab+ecx],cl
454
    loop @rn
454
    loop @rn
455
    mov  cl,[max_trk]
455
    mov  cl,[max_trk]
456
    mov  [shuftab],cl
456
    mov  [shuftab],cl
457
ret
457
ret
458
 
458
 
459
 
459
 
460
shuffle_track:
460
shuffle_track:
461
   call get_uptime
461
   call get_uptime
462
   ror  eax,16
462
   ror  eax,16
463
   cmp  eax,0
463
   cmp  eax,0
464
   je   shuffle_track
464
   je   shuffle_track
465
   xor  ecx,ecx
465
   xor  ecx,ecx
466
   mov  cl,[shuftab]
466
   mov  cl,[shuftab]
467
   cmp  ecx,1
467
   cmp  ecx,1
468
   je   @enddsk
468
   je   @enddsk
469
   xor  edx,edx
469
   xor  edx,edx
470
   div  ecx
470
   div  ecx
471
   cmp  edx,0
471
   cmp  edx,0
472
   je   shuffle_track
472
   je   shuffle_track
473
   xor  ecx,ecx
473
   xor  ecx,ecx
474
   mov  cl,[max_trk]
474
   mov  cl,[max_trk]
475
 @main_loop:
475
 @main_loop:
476
   xor  eax,eax
476
   xor  eax,eax
477
   mov  al,[shuftab+ecx]
477
   mov  al,[shuftab+ecx]
478
   cmp  al,0
478
   cmp  al,0
479
   je   @f
479
   je   @f
480
   dec  edx
480
   dec  edx
481
   cmp  edx,0
481
   cmp  edx,0
482
   jne  @f
482
   jne  @f
483
   mov  cl,[shuftab]
483
   mov  cl,[shuftab]
484
   dec  cl
484
   dec  cl
485
   mov  [shuftab],cl
485
   mov  [shuftab],cl
486
   mov  [shuftab+eax],0
486
   mov  [shuftab+eax],0
487
   mov  [curr_trk],al
487
   mov  [curr_trk],al
488
   call play_n_track
488
   call play_n_track
489
   jmp  @endofshuffle
489
   jmp  @endofshuffle
490
 @@:
490
 @@:
491
   loop @main_loop
491
   loop @main_loop
492
   jmp  @endofshuffle
492
   jmp  @endofshuffle
493
 @enddsk:
493
 @enddsk:
494
   call stop_playing
494
   call stop_playing
495
 @endofshuffle:
495
 @endofshuffle:
496
 
496
 
497
ret
497
ret
498
 
498
 
499
 
499
 
500
 
500
 
501
 
501
 
502
play_from_x_time:
502
play_from_x_time:
503
    xor  ecx,ecx
503
    xor  ecx,ecx
504
    mov  cl,[curr_trk]
504
    mov  cl,[curr_trk]
505
    shl  cl,3
505
    shl  cl,3
506
    add  cl,1
506
    add  cl,1
507
    add  ecx,cdp
507
    add  ecx,cdp
508
    mov  ebx,[ecx]
508
    mov  ebx,[ecx]
509
    mov  ecx,ebx
509
    mov  ecx,ebx
510
    and  ecx,0x00ffffff
510
    and  ecx,0x00ffffff
511
 
511
 
512
    mov  eax,[curr_trk_pg_time]
512
    mov  eax,[curr_trk_pg_time]
513
    xor  edx,edx
513
    xor  edx,edx
514
    mov  ebx,60
514
    mov  ebx,60
515
    div  ebx
515
    div  ebx
516
    add  cl,al ;mins
516
    add  cl,al ;mins
517
    add  dl,ch
517
    add  dl,ch
518
    xor eax,eax
518
    xor eax,eax
519
    mov al,dl
519
    mov al,dl
520
    xor edx,edx
520
    xor edx,edx
521
    div ebx
521
    div ebx
522
    add cl,al   ;real min
522
    add cl,al   ;real min
523
    mov ch,dl   ;real sec
523
    mov ch,dl   ;real sec
524
 
524
 
525
    mov  eax,24
525
    mov  eax,24
526
    mov  ebx,1
526
    mov  ebx,1
527
    mcall
527
    mcall
528
    ret
528
    ret
529
 
529
 
530
play_n_track:
530
play_n_track:
531
    mov  [if_paused],FALSE
531
    mov  [if_paused],FALSE
532
    mov  [if_stopped],FALSE
532
    mov  [if_stopped],FALSE
533
    mov  [curr_trk_pg_time],0
533
    mov  [curr_trk_pg_time],0
534
    call draw_window
534
    call draw_window
535
;    mov  eax,26
535
;    mov  eax,26
536
;    mov  ebx,9
536
;    mov  ebx,9
537
;    mcall
537
;    mcall
538
    call get_uptime
538
    call get_uptime
539
    mov  [stimtrk],eax
539
    mov  [stimtrk],eax
540
    xor  ebx,ebx
540
    xor  ebx,ebx
541
    xor  ecx,ecx
541
    xor  ecx,ecx
542
    mov  cl,[curr_trk]
542
    mov  cl,[curr_trk]
543
    inc  cl
543
    inc  cl
544
    shl  cl,3
544
    shl  cl,3
545
    add  cl,1
545
    add  cl,1
546
    add  ecx,cdp
546
    add  ecx,cdp
547
    mov  ebx,[ecx]
547
    mov  ebx,[ecx]
548
    and  ecx,0x00ffffff
548
    and  ecx,0x00ffffff
549
    mov  ecx,ebx
549
    mov  ecx,ebx
550
   ;get_minutes:
550
   ;get_minutes:
551
   and  ecx,0x000000ff
551
   and  ecx,0x000000ff
552
   mov  eax,ecx
552
   mov  eax,ecx
553
   imul eax,60
553
   imul eax,60
554
   ;get_seconds:
554
   ;get_seconds:
555
   mov ecx,ebx
555
   mov ecx,ebx
556
   and ecx,0x0000ff00
556
   and ecx,0x0000ff00
557
   shr ecx,8
557
   shr ecx,8
558
   add eax,ecx
558
   add eax,ecx
559
   ;eax now is next pos in secs
559
   ;eax now is next pos in secs
560
   mov [next_pos_sec],eax
560
   mov [next_pos_sec],eax
561
 ;eax now is current pos in secs
561
 ;eax now is current pos in secs
562
    xor  ebx,ebx
562
    xor  ebx,ebx
563
    xor  ecx,ecx
563
    xor  ecx,ecx
564
    mov  cl,[curr_trk]
564
    mov  cl,[curr_trk]
565
    shl  cl,3
565
    shl  cl,3
566
    add  cl,1
566
    add  cl,1
567
    add  ecx,cdp
567
    add  ecx,cdp
568
    mov  ebx,[ecx]
568
    mov  ebx,[ecx]
569
    and  ecx,0x00ffffff
569
    and  ecx,0x00ffffff
570
    mov  ecx,ebx
570
    mov  ecx,ebx
571
   ;get_minutes:
571
   ;get_minutes:
572
   and  ecx,0x000000ff
572
   and  ecx,0x000000ff
573
   mov  eax,ecx
573
   mov  eax,ecx
574
   imul eax,60
574
   imul eax,60
575
   ;get_seconds:
575
   ;get_seconds:
576
   mov ecx,ebx
576
   mov ecx,ebx
577
   and ecx,0x0000ff00
577
   and ecx,0x0000ff00
578
   shr ecx,8
578
   shr ecx,8
579
   add eax,ecx
579
   add eax,ecx
580
   ;eax now is current pos in secs
580
   ;eax now is current pos in secs
581
   mov ecx,[next_pos_sec]
581
   mov ecx,[next_pos_sec]
582
   sub ecx,eax
582
   sub ecx,eax
583
   ;eax now is length of trk in sec
583
   ;eax now is length of trk in sec
584
   mov [curr_trk_length],ecx
584
   mov [curr_trk_length],ecx
585
;now play that!
585
;now play that!
586
    mov ecx,ebx
586
    mov ecx,ebx
587
    mov  eax,24
587
    mov  eax,24
588
    mov  ebx,1
588
    mov  ebx,1
589
    mcall
589
    mcall
590
    ret
590
    ret
591
 
591
 
592
 
592
 
593
play_acd:
593
play_acd:
594
    call chk_cdrom
594
    call chk_cdrom
595
    call read_cd
595
    call read_cd
596
    call draw_window
596
    call draw_window
597
    call renew_shuftab
597
    call renew_shuftab
598
    mov  cl,[curr_trk]
598
    mov  cl,[curr_trk]
599
    cmp  cl,0
599
    cmp  cl,0
600
    jnz  play_acd_trk_ok
600
    jnz  play_acd_trk_ok
601
    mov  cl,[max_trk]
601
    mov  cl,[max_trk]
602
    mov  [shuftab],cl
602
    mov  [shuftab],cl
603
    mov  [curr_trk],1
603
    mov  [curr_trk],1
604
    jmp  playing_no_pause
604
    jmp  playing_no_pause
605
   play_acd_trk_ok:
605
   play_acd_trk_ok:
606
;   start_chk_on_pause:
606
;   start_chk_on_pause:
607
    cmp  [if_paused],TRUE
607
    cmp  [if_paused],TRUE
608
    jne   pause_playing
608
    jne   pause_playing
609
    mov  [if_stopped],FALSE
609
    mov  [if_stopped],FALSE
610
    mov  [if_paused],FALSE
610
    mov  [if_paused],FALSE
611
    call current_trk_time
611
    call current_trk_time
612
    mov  eax,[curr_trk_pg_time]
612
    mov  eax,[curr_trk_pg_time]
613
    mov  ebx,[paused_time]
613
    mov  ebx,[paused_time]
614
    sub  eax,ebx
614
    sub  eax,ebx
615
    imul eax,100
615
    imul eax,100
616
    add  [stimtrk],eax
616
    add  [stimtrk],eax
617
    call current_trk_time
617
    call current_trk_time
618
    call play_from_x_time
618
    call play_from_x_time
619
    call draw_window
619
    call draw_window
620
    jmp  end_play_acd
620
    jmp  end_play_acd
621
   pause_playing:
621
   pause_playing:
622
    cmp  [curr_trk_pg_time],0
622
    cmp  [curr_trk_pg_time],0
623
    je   playing_no_pause
623
    je   playing_no_pause
624
    mov  eax,[curr_trk_pg_time]
624
    mov  eax,[curr_trk_pg_time]
625
    mov  [paused_time],eax
625
    mov  [paused_time],eax
626
    mov  [if_paused],TRUE
626
    mov  [if_paused],TRUE
627
    call stop_playing
627
    call stop_playing
628
    call draw_window
628
    call draw_window
629
    jmp  end_play_acd
629
    jmp  end_play_acd
630
   playing_no_pause:
630
   playing_no_pause:
631
    mov  [if_paused],FALSE
631
    mov  [if_paused],FALSE
632
    call rem_time_trk
632
    call rem_time_trk
633
    call  play_n_track
633
    call  play_n_track
634
    call  draw_window
634
    call  draw_window
635
   end_play_acd:
635
   end_play_acd:
636
    ret
636
    ret
637
 
637
 
638
stop_playing:
638
stop_playing:
639
    mov eax, 24
639
    mov eax, 24
640
    mov ebx,3
640
    mov ebx,3
641
    mcall
641
    mcall
642
    mov  cl,[max_trk]
642
    mov  cl,[max_trk]
643
    mov  [shuftab],cl
643
    mov  [shuftab],cl
644
    mov [if_stopped],TRUE
644
    mov [if_stopped],TRUE
645
    cmp [if_paused],TRUE
645
    cmp [if_paused],TRUE
646
    je  end_stop_playing
646
    je  end_stop_playing
647
    mov [curr_trk_pg_time],0
647
    mov [curr_trk_pg_time],0
648
   end_stop_playing:
648
   end_stop_playing:
649
    call draw_window
649
    call draw_window
650
ret
650
ret
651
 
651
 
652
;   *********************************************
652
;   *********************************************
653
;   *******  WINDOW DEFINITIONS AND DRAW ********
653
;   *******  WINDOW DEFINITIONS AND DRAW ********
654
;   *********************************************
654
;   *********************************************
655
 
655
 
656
draw_info:
656
draw_info:
657
    ;bar->
657
    ;bar->
658
    mov eax,13
658
    mov eax,13
659
    mov ebx, 10 shl 16 + 41
659
    mov ebx, 10 shl 16 + 41
660
    mov ecx,120 shl 16 + 9
660
    mov ecx,120 shl 16 + 9
661
    mov edx,0x00ffffff
661
    mov edx,0x00ffffff
662
    mcall
662
    mcall
663
    mov ebx, 96 shl 16 + 11
663
    mov ebx, 96 shl 16 + 11
664
    mcall
664
    mcall
665
    mov ebx, 185 shl 16 + 11
665
    mov ebx, 185 shl 16 + 11
666
    mcall
666
    mcall
667
    mov ebx, 200 shl 16 + 11
667
    mov ebx, 200 shl 16 + 11
668
    mcall
668
    mcall
669
    mov ebx, 150 shl 16 + 11
669
    mov ebx, 150 shl 16 + 11
670
    mcall
670
    mcall
671
    mov ebx, 165 shl 16 + 11
671
    mov ebx, 165 shl 16 + 11
672
    mcall
672
    mcall
673
   ;bar<-
673
   ;bar<-
674
 
674
 
675
    mov  eax,4
675
    mov  eax,4
676
    mov  ebx,10 shl 16 +120
676
    mov  ebx,10 shl 16 +120
677
    mov  ecx,0x00111111
677
    mov  ecx,0x00111111
678
    cmp  [mode],NORMAL_PLAY
678
    cmp  [mode],NORMAL_PLAY
679
    jne  info_mode_1
679
    jne  info_mode_1
680
    mov  edx,mode_normal
680
    mov  edx,mode_normal
681
    jmp  info_mode_end
681
    jmp  info_mode_end
682
   info_mode_1:
682
   info_mode_1:
683
    cmp  [mode],REPEAT_TRACK
683
    cmp  [mode],REPEAT_TRACK
684
    jne  info_mode_2
684
    jne  info_mode_2
685
    mov  edx,mode_repeat_1
685
    mov  edx,mode_repeat_1
686
    jmp  info_mode_end
686
    jmp  info_mode_end
687
   info_mode_2:
687
   info_mode_2:
688
    cmp  [mode],REPEAT_DISK
688
    cmp  [mode],REPEAT_DISK
689
    jne  info_mode_3
689
    jne  info_mode_3
690
    mov  edx,mode_repeat_all
690
    mov  edx,mode_repeat_all
691
    jmp  info_mode_end
691
    jmp  info_mode_end
692
   info_mode_3:
692
   info_mode_3:
693
    cmp  [mode],SHUFFLE_DISK
693
    cmp  [mode],SHUFFLE_DISK
694
    jne  info_mode_end
694
    jne  info_mode_end
695
    mov  edx,mode_shuffle
695
    mov  edx,mode_shuffle
696
;    mov  ecx,0x00aaaaaa
696
;    mov  ecx,0x00aaaaaa
697
;    mov  cl,[max_trk]
697
;    mov  cl,[max_trk]
698
;    mov  [shuftab],cl
698
;    mov  [shuftab],cl
699
    jmp  info_mode_end
699
    jmp  info_mode_end
700
   info_mode_end:
700
   info_mode_end:
701
    mov  esi,7
701
    mov  esi,7
702
    mcall
702
    mcall
703
 
703
 
704
  ;num info ->
704
  ;num info ->
705
    mov  eax,47
705
    mov  eax,47
706
    xor  ebx,ebx
706
    xor  ebx,ebx
707
    mov  bl,0
707
    mov  bl,0
708
    mov  bh,0
708
    mov  bh,0
709
    or   ebx,0x20000            ;X0000 - number of digits to draw
709
    or   ebx,0x20000            ;X0000 - number of digits to draw
710
    xor  ecx,ecx
710
    xor  ecx,ecx
711
    mov  cl, [curr_trk]            ;number to draw
711
    mov  cl, [curr_trk]            ;number to draw
712
    mov  edx,96 shl 16 + 120
712
    mov  edx,96 shl 16 + 120
713
    mov  esi,0x111111
713
    mov  esi,0x111111
714
    mcall
714
    mcall
715
    mov  eax,[curr_trk_pg_time]
715
    mov  eax,[curr_trk_pg_time]
716
    xor  edx,edx
716
    xor  edx,edx
717
    mov  ecx,60
717
    mov  ecx,60
718
    div  ecx
718
    div  ecx
719
    push edx
719
    push edx
720
    mov  ecx,eax
720
    mov  ecx,eax
721
    mov  eax,47
721
    mov  eax,47
722
    mov  edx,150 shl 16 + 120
722
    mov  edx,150 shl 16 + 120
723
    mcall
723
    mcall
724
    pop ecx
724
    pop ecx
725
    mov  edx,165 shl 16 + 120
725
    mov  edx,165 shl 16 + 120
726
    mcall
726
    mcall
727
    mov  eax,[curr_trk_length]
727
    mov  eax,[curr_trk_length]
728
    xor  edx,edx
728
    xor  edx,edx
729
    mov  ecx,60
729
    mov  ecx,60
730
    div  ecx
730
    div  ecx
731
    push edx
731
    push edx
732
    mov  ecx,eax
732
    mov  ecx,eax
733
    mov  eax,47
733
    mov  eax,47
734
    mov  edx,185 shl 16 + 120
734
    mov  edx,185 shl 16 + 120
735
    mcall
735
    mcall
736
    pop  ecx
736
    pop  ecx
737
    mov  edx,200 shl 16 + 120
737
    mov  edx,200 shl 16 + 120
738
    mcall
738
    mcall
739
   ;num info <-
739
   ;num info <-
740
ret
740
ret
741
 
741
 
742
 
742
 
743
draw_window:
743
draw_window:
744
 
744
 
745
    mov  eax,12                    ; function 12:tell os about windowdraw
745
    mov  eax,12                    ; function 12:tell os about windowdraw
746
    mov  ebx,1                     ; 1, start of draw
746
    mov  ebx,1                     ; 1, start of draw
747
    mcall
747
    mcall
748
                                   ; DRAW WINDOW
748
                                   ; DRAW WINDOW
749
    mov  eax,0                     ; function 0 : define and draw window
749
    mov  eax,0                     ; function 0 : define and draw window
750
    mov  ebx, 50*65536+219         ; [x start] *65536 + [x size]
750
    mov  ebx, 50*65536+219         ; [x start] *65536 + [x size]
751
    mov  ecx,100*65536+168         ; [y start] *65536 + [y size]
751
    mov  ecx,100*65536+168         ; [y start] *65536 + [y size]
752
    mov  edx,0x04ffffff            ; color of work area RRGGBB
752
    mov  edx,0x04ffffff            ; color of work area RRGGBB
753
    mov  esi,0x8099bbff            ; color of grab bar  RRGGBB,8->color glide
753
    mov  esi,0x8099bbff            ; color of grab bar  RRGGBB,8->color glide
754
    mov  edi,0x0099bbee            ; color of frames    RRGGBB
754
    mov  edi,0x0099bbee            ; color of frames    RRGGBB
755
    mcall
755
    mcall
756
                                   ; WINDOW LABEL
756
                                   ; WINDOW TITLE
757
    mov  eax,4                     ; function 4 : write text to window
-
 
758
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
-
 
759
    mov  ecx,0x1000ffff            ; color of text RRGGBB
-
 
760
    mov  edx,labelt                ; pointer to text beginning
-
 
761
    mov  esi,labellen-labelt       ; text length
-
 
762
    mcall
757
    mcall
-
 
758
	mov eax,71
-
 
759
	mov ebx,1
-
 
760
	mov ecx,labelt
-
 
761
	int 40h
763
 
762
 
764
    mov  eax,13                    ;bar
763
    mov  eax,13                    ;bar
765
    mov  ebx,8 shl 16 + 204
764
    mov  ebx,8 shl 16 + 204
766
    mov  ecx,28 shl 16 + 84
765
    mov  ecx,28 shl 16 + 84
767
    mov  edx,0x000fe6f5
766
    mov  edx,0x000fe6f5
768
    mcall
767
    mcall
769
 
768
 
770
    ;info ->
769
    ;info ->
771
    mov  eax,4
770
    mov  eax,4
772
    mov  ebx,63 shl 16 + 120
771
    mov  ebx,63 shl 16 + 120
773
    mov  ecx,0x00111111
772
    mov  ecx,0x00111111
774
    mov  edx,playing_trk_info
773
    mov  edx,playing_trk_info
775
    mov  esi,6
774
    mov  esi,6
776
    mcall
775
    mcall
777
    mov  ebx,120 shl 16 + 120
776
    mov  ebx,120 shl 16 + 120
778
    mov  edx,playing_time_info
777
    mov  edx,playing_time_info
779
;    mov  esi,5
778
;    mov  esi,5
780
    dec  esi
779
    dec  esi
781
    mcall
780
    mcall
782
    mov  ebx,178 shl 16 + 120
781
    mov  ebx,178 shl 16 + 120
783
    mov  edx,slash
782
    mov  edx,slash
784
    mov  esi,1
783
    mov  esi,1
785
    mcall
784
    mcall
786
    mov  ebx,196 shl 16 + 120
785
    mov  ebx,196 shl 16 + 120
787
    mov  edx,column
786
    mov  edx,column
788
;    mov  esi,1
787
;    mov  esi,1
789
    mcall
788
    mcall
790
    mov  ebx,161 shl 16 + 120
789
    mov  ebx,161 shl 16 + 120
791
    mov  edx,column
790
    mov  edx,column
792
;    mov  esi,1
791
;    mov  esi,1
793
    mcall
792
    mcall
794
    ;info <-
793
    ;info <-
795
 
794
 
796
; button  MODE
795
; button  MODE
797
    mov  eax,8
796
    mov  eax,8
798
    mov  ebx,12*65536+20
797
    mov  ebx,12*65536+20
799
    mov  ecx,135*65536+20
798
    mov  ecx,135*65536+20
800
    mov  edx,7
799
    mov  edx,7
801
    mov  esi,COLOR_FUNC_BUTS
800
    mov  esi,COLOR_FUNC_BUTS
802
    mcall
801
    mcall
803
   ; text
802
   ; text
804
    mov  eax,4
803
    mov  eax,4
805
    mov  ebx,19*65536+142
804
    mov  ebx,19*65536+142
806
    mov  ecx,0x100f73f5;ffff0f
805
    mov  ecx,0x100f73f5;ffff0f
807
    mov  edx,but_mode_lab
806
    mov  edx,but_mode_lab
808
    mov  esi,1
807
    mov  esi,1
809
    mcall
808
    mcall
810
 
809
 
811
; button  BACK
810
; button  BACK
812
    mov  eax,8
811
    mov  eax,8
813
    mov  ebx,37*65536+20
812
    mov  ebx,37*65536+20
814
    mov  ecx,135*65536+20
813
    mov  ecx,135*65536+20
815
    mov  edx,6
814
    mov  edx,6
816
    mov  esi,COLOR_FUNC_BUTS
815
    mov  esi,COLOR_FUNC_BUTS
817
    mcall
816
    mcall
818
    mov [coord_x],51
817
    mov [coord_x],51
819
    mov [coord_y],141
818
    mov [coord_y],141
820
    call draw_left_triangle
819
    call draw_left_triangle
821
    mov [coord_x],44
820
    mov [coord_x],44
822
    call draw_vertical_line
821
    call draw_vertical_line
823
 
822
 
824
; button  NEXT
823
; button  NEXT
825
    mov  eax,8
824
    mov  eax,8
826
    mov  ebx,62*65536+20
825
    mov  ebx,62*65536+20
827
    mov  ecx,135*65536+20
826
    mov  ecx,135*65536+20
828
    mov  edx,5
827
    mov  edx,5
829
    mov  esi,COLOR_FUNC_BUTS
828
    mov  esi,COLOR_FUNC_BUTS
830
    mcall
829
    mcall
831
    mov [coord_x],68
830
    mov [coord_x],68
832
    mov [coord_y],141
831
    mov [coord_y],141
833
    call draw_right_triangle
832
    call draw_right_triangle
834
    mov [coord_x],74
833
    mov [coord_x],74
835
    call draw_vertical_line
834
    call draw_vertical_line
836
 
835
 
837
; button  REWIND
836
; button  REWIND
838
    mov  eax,8
837
    mov  eax,8
839
    mov  ebx,87*65536+20
838
    mov  ebx,87*65536+20
840
    mov  ecx,135*65536+20
839
    mov  ecx,135*65536+20
841
    mov  edx,8
840
    mov  edx,8
842
    mov  esi,COLOR_FUNC_BUTS
841
    mov  esi,COLOR_FUNC_BUTS
843
    mcall
842
    mcall
844
    mov [coord_x],102
843
    mov [coord_x],102
845
    mov [coord_y],141
844
    mov [coord_y],141
846
    call draw_left_triangle
845
    call draw_left_triangle
847
    mov [coord_x],97
846
    mov [coord_x],97
848
    call draw_left_triangle
847
    call draw_left_triangle
849
 
848
 
850
; button   STOP
849
; button   STOP
851
    mov  eax,8
850
    mov  eax,8
852
    mov  ebx,112*65536+20
851
    mov  ebx,112*65536+20
853
    mov  ecx,135*65536+20
852
    mov  ecx,135*65536+20
854
    mov  edx,3
853
    mov  edx,3
855
    mov  esi,COLOR_FUNC_BUTS
854
    mov  esi,COLOR_FUNC_BUTS
856
    mcall
855
    mcall
857
    mov [coord_x],118
856
    mov [coord_x],118
858
    mov [coord_y],142
857
    mov [coord_y],142
859
    call draw_square
858
    call draw_square
860
 
859
 
861
 
860
 
862
; button  PLAY
861
; button  PLAY
863
    mov  eax,8
862
    mov  eax,8
864
    mov  ebx,137*65536+20
863
    mov  ebx,137*65536+20
865
    mov  ecx,135*65536+20
864
    mov  ecx,135*65536+20
866
    mov  edx,2
865
    mov  edx,2
867
    mov  esi,COLOR_FUNC_BUTS
866
    mov  esi,COLOR_FUNC_BUTS
868
    mcall
867
    mcall
869
    cmp [if_stopped],TRUE
868
    cmp [if_stopped],TRUE
870
    je  playing_paused
869
    je  playing_paused
871
    cmp [if_paused],TRUE
870
    cmp [if_paused],TRUE
872
    je  playing_paused
871
    je  playing_paused
873
    mov [coord_x],144
872
    mov [coord_x],144
874
    mov [coord_y],141
873
    mov [coord_y],141
875
    call draw_vertical_line
874
    call draw_vertical_line
876
    mov [coord_x],149
875
    mov [coord_x],149
877
    call draw_vertical_line
876
    call draw_vertical_line
878
    jmp end_draw_play
877
    jmp end_draw_play
879
   playing_paused:
878
   playing_paused:
880
    mov [coord_x],144
879
    mov [coord_x],144
881
    mov [coord_y],141
880
    mov [coord_y],141
882
    call draw_right_triangle
881
    call draw_right_triangle
883
   end_draw_play:
882
   end_draw_play:
884
 
883
 
885
 
884
 
886
; button   FORWARD
885
; button   FORWARD
887
    mov  eax,8
886
    mov  eax,8
888
    mov  ebx,162*65536+20
887
    mov  ebx,162*65536+20
889
    mov  ecx,135*65536+20
888
    mov  ecx,135*65536+20
890
    mov  edx,9
889
    mov  edx,9
891
    mov  esi,COLOR_FUNC_BUTS
890
    mov  esi,COLOR_FUNC_BUTS
892
    mcall
891
    mcall
893
    mov [coord_x],167
892
    mov [coord_x],167
894
    mov [coord_y],141
893
    mov [coord_y],141
895
    call draw_right_triangle
894
    call draw_right_triangle
896
    mov [coord_x],172
895
    mov [coord_x],172
897
    call draw_right_triangle
896
    call draw_right_triangle
898
 
897
 
899
; button  RE-READ PLAYLIST
898
; button  RE-READ PLAYLIST
900
    mov  eax,8
899
    mov  eax,8
901
    mov  ebx,187*65536+20
900
    mov  ebx,187*65536+20
902
    mov  ecx,135*65536+20
901
    mov  ecx,135*65536+20
903
    mov  edx,4
902
    mov  edx,4
904
    mov  esi,COLOR_FUNC_BUTS
903
    mov  esi,COLOR_FUNC_BUTS
905
    mcall
904
    mcall
906
    mov  [coord_x],192
905
    mov  [coord_x],192
907
    mov  [coord_y],140
906
    mov  [coord_y],140
908
    call draw_vert_list_line
907
    call draw_vert_list_line
909
    dec  [coord_y]
908
    dec  [coord_y]
910
    call draw_hor_list_line
909
    call draw_hor_list_line
911
    mov  [coord_y], 151
910
    mov  [coord_y], 151
912
    call draw_hor_list_line
911
    call draw_hor_list_line
913
    mov  [coord_x],202
912
    mov  [coord_x],202
914
    mov  [coord_y],140
913
    mov  [coord_y],140
915
    call draw_vert_list_line
914
    call draw_vert_list_line
916
    mov  [coord_x],195
915
    mov  [coord_x],195
917
    mov  [coord_y], 142
916
    mov  [coord_y], 142
918
    call draw_str_list_line
917
    call draw_str_list_line
919
    mov  [coord_y],145
918
    mov  [coord_y],145
920
    call draw_str_list_line
919
    call draw_str_list_line
921
    mov  [coord_y],148
920
    mov  [coord_y],148
922
    call draw_str_list_line
921
    call draw_str_list_line
923
 
922
 
924
    cmp  [flag],1
923
    cmp  [flag],1
925
    jne  flag2
924
    jne  flag2
926
;Draw tracs buttons
925
;Draw tracs buttons
927
    xor  eax,eax
926
    xor  eax,eax
928
    xor  ebx,ebx
927
    xor  ebx,ebx
929
    mov  ecx,10
928
    mov  ecx,10
930
    mov  al,[cdp+3]
929
    mov  al,[cdp+3]
931
    mov  [max_trk],al
930
    mov  [max_trk],al
932
    xor  edi,edi
931
    xor  edi,edi
933
    mov  di,ax
932
    mov  di,ax
934
    mov  [posx],12
933
    mov  [posx],12
935
    mov  [posy],32
934
    mov  [posy],32
936
    mov  [tracs],1
935
    mov  [tracs],1
937
 draw_tracs_buttons:
936
 draw_tracs_buttons:
938
    mov  eax,8
937
    mov  eax,8
939
    xor  ebx,ebx
938
    xor  ebx,ebx
940
    mov  bl,[posx]
939
    mov  bl,[posx]
941
    shl  ebx,16
940
    shl  ebx,16
942
    add  ebx,15
941
    add  ebx,15
943
    xor  ecx,ecx
942
    xor  ecx,ecx
944
    mov  cl,[posy]
943
    mov  cl,[posy]
945
    shl  ecx,16
944
    shl  ecx,16
946
    add  ecx,15
945
    add  ecx,15
947
    xor  edx,edx
946
    xor  edx,edx
948
    mov  dx,[tracs]
947
    mov  dx,[tracs]
949
    add  edx,10
948
    add  edx,10
950
    mov  esi,0xaaaaaa
949
    mov  esi,0xaaaaaa
951
    add  esi,edi
950
    add  esi,edi
952
    mcall
951
    mcall
953
   ;---draw tracs numbers
952
   ;---draw tracs numbers
954
    mov  eax,47
953
    mov  eax,47
955
    xor  ebx,ebx
954
    xor  ebx,ebx
956
    mov  bl,0
955
    mov  bl,0
957
    or   ebx,0x20000            ;number of digits to draw
956
    or   ebx,0x20000            ;number of digits to draw
958
    xor  ecx,ecx
957
    xor  ecx,ecx
959
    mov  cx, [tracs]            ;number to draw
958
    mov  cx, [tracs]            ;number to draw
960
    xor  edx,edx
959
    xor  edx,edx
961
    mov  dl,[posx]
960
    mov  dl,[posx]
962
    add  dl,3
961
    add  dl,3
963
    shl  edx,16
962
    shl  edx,16
964
    add  dl,[posy]
963
    add  dl,[posy]
965
    add  dl,5
964
    add  dl,5
966
    mov  esi,0xffffff
965
    mov  esi,0xffffff
967
    mcall
966
    mcall
968
   ;---
967
   ;---
969
    mov  al,[posx]
968
    mov  al,[posx]
970
    add  al,20
969
    add  al,20
971
    mov  [posx],al
970
    mov  [posx],al
972
    xor  eax,eax
971
    xor  eax,eax
973
    mov  ax,[tracs]
972
    mov  ax,[tracs]
974
    mov  bl,10
973
    mov  bl,10
975
    div  bl
974
    div  bl
976
    cmp  ah,0
975
    cmp  ah,0
977
    jnz  no_new_str
976
    jnz  no_new_str
978
    mov  al,[posxstart]
977
    mov  al,[posxstart]
979
    mov  [posx], al
978
    mov  [posx], al
980
    mov  al,[posy]
979
    mov  al,[posy]
981
    add  al,20
980
    add  al,20
982
    mov  [posy],al
981
    mov  [posy],al
983
  no_new_str:
982
  no_new_str:
984
    inc  [tracs]
983
    inc  [tracs]
985
    cmp  [tracs],41
984
    cmp  [tracs],41
986
    je   flag2
985
    je   flag2
987
    dec  edi
986
    dec  edi
988
    cmp  edi,0
987
    cmp  edi,0
989
    jnz  draw_tracs_buttons
988
    jnz  draw_tracs_buttons
990
 
989
 
991
  flag2:
990
  flag2:
992
    cmp [flag],2
991
    cmp [flag],2
993
    jne flag3
992
    jne flag3
994
    mov eax,4
993
    mov eax,4
995
    mov ebx, 20 shl 16 +67
994
    mov ebx, 20 shl 16 +67
996
    mov ecx,0x10ffff00
995
    mov ecx,0x10ffff00
997
    mov edx,define_cdrom
996
    mov edx,define_cdrom
998
    mov esi,define_cdrom_len-define_cdrom
997
    mov esi,define_cdrom_len-define_cdrom
999
    mcall
998
    mcall
1000
  flag3:
999
  flag3:
1001
    cmp [flag],3
1000
    cmp [flag],3
1002
    jne flag4
1001
    jne flag4
1003
    mov eax,4
1002
    mov eax,4
1004
    mov ebx, 47 shl 16 +67
1003
    mov ebx, 47 shl 16 +67
1005
    mov ecx,0x10ffff00
1004
    mov ecx,0x10ffff00
1006
    mov edx,no_cda
1005
    mov edx,no_cda
1007
    mov esi,no_cda_len-no_cda
1006
    mov esi,no_cda_len-no_cda
1008
    mcall
1007
    mcall
1009
  flag4:
1008
  flag4:
1010
    cmp [flag],4
1009
    cmp [flag],4
1011
    jne flag5
1010
    jne flag5
1012
   ;help screen
1011
   ;help screen
1013
   cmp [help_screen],1
1012
   cmp [help_screen],1
1014
   jnz @hs2
1013
   jnz @hs2
1015
   mov edx,help1
1014
   mov edx,help1
1016
   jmp @ehs
1015
   jmp @ehs
1017
  @hs2:
1016
  @hs2:
1018
   cmp [help_screen],2
1017
   cmp [help_screen],2
1019
   jnz @hs3
1018
   jnz @hs3
1020
   mov edx,help2
1019
   mov edx,help2
1021
   jmp @ehs
1020
   jmp @ehs
1022
  @hs3:
1021
  @hs3:
1023
   mov edx,help3
1022
   mov edx,help3
1024
  @ehs:
1023
  @ehs:
1025
   xor edi,edi
1024
   xor edi,edi
1026
   mov ebx,25*65536+30
1025
   mov ebx,25*65536+30
1027
  new_line:
1026
  new_line:
1028
   mov eax,4
1027
   mov eax,4
1029
   mov ecx,0x111111
1028
   mov ecx,0x111111
1030
   mov esi,31
1029
   mov esi,31
1031
   mcall
1030
   mcall
1032
  noline:
1031
  noline:
1033
   add ebx,10
1032
   add ebx,10
1034
   add edx,31
1033
   add edx,31
1035
   inc edi
1034
   inc edi
1036
   cmp [edx],byte 'x'
1035
   cmp [edx],byte 'x'
1037
   jnz new_line
1036
   jnz new_line
1038
  flag5:
1037
  flag5:
1039
  call draw_info
1038
  call draw_info
1040
 
1039
 
1041
    mov  eax,12                    ; function 12:tell os about windowdraw
1040
    mov  eax,12                    ; function 12:tell os about windowdraw
1042
    mov  ebx,2                     ; 2, end of draw
1041
    mov  ebx,2                     ; 2, end of draw
1043
    mcall
1042
    mcall
1044
 
1043
 
1045
ret
1044
ret
1046
 
1045
 
1047
draw_right_triangle:
1046
draw_right_triangle:
1048
    mov ebx,[coord_x]
1047
    mov ebx,[coord_x]
1049
    mov ecx,[coord_y]
1048
    mov ecx,[coord_y]
1050
    mov edx,0x00111111
1049
    mov edx,0x00111111
1051
    mov esi,5
1050
    mov esi,5
1052
    mov eax,9
1051
    mov eax,9
1053
   start_draw_pixel:
1052
   start_draw_pixel:
1054
    push ebx
1053
    push ebx
1055
    cmp  eax,5
1054
    cmp  eax,5
1056
    jb   y_menshe_5
1055
    jb   y_menshe_5
1057
    mov  esi,10
1056
    mov  esi,10
1058
    sub  esi,eax
1057
    sub  esi,eax
1059
    jmp  draw_pixel
1058
    jmp  draw_pixel
1060
   y_menshe_5:
1059
   y_menshe_5:
1061
    mov  esi,eax
1060
    mov  esi,eax
1062
   draw_pixel:
1061
   draw_pixel:
1063
    dec  esi
1062
    dec  esi
1064
    inc  ebx
1063
    inc  ebx
1065
    push eax
1064
    push eax
1066
    mov  eax,1
1065
    mov  eax,1
1067
    mcall
1066
    mcall
1068
    pop  eax
1067
    pop  eax
1069
    cmp  esi,0
1068
    cmp  esi,0
1070
    jne  draw_pixel
1069
    jne  draw_pixel
1071
    pop  ebx
1070
    pop  ebx
1072
    dec  eax
1071
    dec  eax
1073
    inc  ecx
1072
    inc  ecx
1074
    cmp  eax,0
1073
    cmp  eax,0
1075
    jne  start_draw_pixel
1074
    jne  start_draw_pixel
1076
ret
1075
ret
1077
 
1076
 
1078
draw_square:
1077
draw_square:
1079
    mov ebx,[coord_x]
1078
    mov ebx,[coord_x]
1080
    mov ecx,[coord_y]
1079
    mov ecx,[coord_y]
1081
    mov edx,0x00111111
1080
    mov edx,0x00111111
1082
    mov eax,7
1081
    mov eax,7
1083
   q_start_draw_pixel:
1082
   q_start_draw_pixel:
1084
    push ebx
1083
    push ebx
1085
    mov  esi,7
1084
    mov  esi,7
1086
   q_draw_pixel:
1085
   q_draw_pixel:
1087
    dec  esi
1086
    dec  esi
1088
    inc  ebx
1087
    inc  ebx
1089
    push eax
1088
    push eax
1090
    mov  eax,1
1089
    mov  eax,1
1091
    mcall
1090
    mcall
1092
    pop  eax
1091
    pop  eax
1093
    cmp  esi,0
1092
    cmp  esi,0
1094
    jne  q_draw_pixel
1093
    jne  q_draw_pixel
1095
    pop  ebx
1094
    pop  ebx
1096
    dec  eax
1095
    dec  eax
1097
    inc  ecx
1096
    inc  ecx
1098
    cmp  eax,0
1097
    cmp  eax,0
1099
    jne  q_start_draw_pixel
1098
    jne  q_start_draw_pixel
1100
ret
1099
ret
1101
 
1100
 
1102
draw_left_triangle:
1101
draw_left_triangle:
1103
    mov ebx,[coord_x]
1102
    mov ebx,[coord_x]
1104
    mov ecx,[coord_y]
1103
    mov ecx,[coord_y]
1105
    mov edx,0x00111111
1104
    mov edx,0x00111111
1106
    mov esi,5
1105
    mov esi,5
1107
    mov eax,9
1106
    mov eax,9
1108
   l_start_draw_pixel:
1107
   l_start_draw_pixel:
1109
    push ebx
1108
    push ebx
1110
    cmp  eax,5
1109
    cmp  eax,5
1111
    jb   l_y_menshe_5
1110
    jb   l_y_menshe_5
1112
    mov  esi,10
1111
    mov  esi,10
1113
    sub  esi,eax
1112
    sub  esi,eax
1114
    jmp  l_draw_pixel
1113
    jmp  l_draw_pixel
1115
   l_y_menshe_5:
1114
   l_y_menshe_5:
1116
    mov  esi,eax
1115
    mov  esi,eax
1117
   l_draw_pixel:
1116
   l_draw_pixel:
1118
    dec  esi
1117
    dec  esi
1119
    dec  ebx
1118
    dec  ebx
1120
    push eax
1119
    push eax
1121
    mov  eax,1
1120
    mov  eax,1
1122
    mcall
1121
    mcall
1123
    pop  eax
1122
    pop  eax
1124
    cmp  esi,0
1123
    cmp  esi,0
1125
    jne  l_draw_pixel
1124
    jne  l_draw_pixel
1126
    pop  ebx
1125
    pop  ebx
1127
    dec  eax
1126
    dec  eax
1128
    inc  ecx
1127
    inc  ecx
1129
    cmp  eax,0
1128
    cmp  eax,0
1130
    jne  l_start_draw_pixel
1129
    jne  l_start_draw_pixel
1131
ret
1130
ret
1132
 
1131
 
1133
draw_vertical_line:
1132
draw_vertical_line:
1134
    mov  eax,2
1133
    mov  eax,2
1135
    mov  ebx,[coord_x]
1134
    mov  ebx,[coord_x]
1136
    mov  edx,0x00111111
1135
    mov  edx,0x00111111
1137
  @@draw_2_line:
1136
  @@draw_2_line:
1138
    mov  ecx,[coord_y]
1137
    mov  ecx,[coord_y]
1139
    dec  ecx
1138
    dec  ecx
1140
    mov  esi,9
1139
    mov  esi,9
1141
   start_draw_vline:
1140
   start_draw_vline:
1142
    inc  ecx
1141
    inc  ecx
1143
    push eax
1142
    push eax
1144
    mov  eax,1
1143
    mov  eax,1
1145
    mcall
1144
    mcall
1146
    pop  eax
1145
    pop  eax
1147
    dec  esi
1146
    dec  esi
1148
    cmp  esi,0
1147
    cmp  esi,0
1149
    jne  start_draw_vline
1148
    jne  start_draw_vline
1150
    dec  eax
1149
    dec  eax
1151
    inc ebx
1150
    inc ebx
1152
    cmp  eax,0
1151
    cmp  eax,0
1153
    jne  @@draw_2_line
1152
    jne  @@draw_2_line
1154
ret
1153
ret
1155
 
1154
 
1156
draw_vert_list_line:
1155
draw_vert_list_line:
1157
    mov  eax,1
1156
    mov  eax,1
1158
    mov  ebx,[coord_x]
1157
    mov  ebx,[coord_x]
1159
    mov  edx,0x00111111
1158
    mov  edx,0x00111111
1160
    mov  ecx,[coord_y]
1159
    mov  ecx,[coord_y]
1161
    dec  ecx
1160
    dec  ecx
1162
    mov  esi,11
1161
    mov  esi,11
1163
   vlstart_draw_vline:
1162
   vlstart_draw_vline:
1164
    inc  ecx
1163
    inc  ecx
1165
    mcall
1164
    mcall
1166
    dec  esi
1165
    dec  esi
1167
    cmp  esi,0
1166
    cmp  esi,0
1168
    jne  vlstart_draw_vline
1167
    jne  vlstart_draw_vline
1169
    dec  eax
1168
    dec  eax
1170
    inc ebx
1169
    inc ebx
1171
ret
1170
ret
1172
 
1171
 
1173
draw_hor_list_line:
1172
draw_hor_list_line:
1174
    mov  eax,1
1173
    mov  eax,1
1175
    mov  ebx,[coord_x]
1174
    mov  ebx,[coord_x]
1176
    mov  edx,0x00111111
1175
    mov  edx,0x00111111
1177
    mov  ecx,[coord_y]
1176
    mov  ecx,[coord_y]
1178
    dec  ebx
1177
    dec  ebx
1179
    mov  esi,11
1178
    mov  esi,11
1180
   hlstart_draw_vline:
1179
   hlstart_draw_vline:
1181
    inc  ebx
1180
    inc  ebx
1182
    mcall
1181
    mcall
1183
    dec  esi
1182
    dec  esi
1184
    cmp  esi,0
1183
    cmp  esi,0
1185
    jne  hlstart_draw_vline
1184
    jne  hlstart_draw_vline
1186
    dec  eax
1185
    dec  eax
1187
    inc ebx
1186
    inc ebx
1188
ret
1187
ret
1189
 
1188
 
1190
draw_str_list_line:
1189
draw_str_list_line:
1191
    mov  eax,1
1190
    mov  eax,1
1192
    mov  ebx,[coord_x]
1191
    mov  ebx,[coord_x]
1193
    mov  edx,0x00111111
1192
    mov  edx,0x00111111
1194
    mov  ecx,[coord_y]
1193
    mov  ecx,[coord_y]
1195
    dec  ebx
1194
    dec  ebx
1196
    mov  esi,5
1195
    mov  esi,5
1197
   slstart_draw_vline:
1196
   slstart_draw_vline:
1198
    inc  ebx
1197
    inc  ebx
1199
    mcall
1198
    mcall
1200
    dec  esi
1199
    dec  esi
1201
    cmp  esi,0
1200
    cmp  esi,0
1202
    jne  slstart_draw_vline
1201
    jne  slstart_draw_vline
1203
    dec  eax
1202
    dec  eax
1204
    inc ebx
1203
    inc ebx
1205
ret
1204
ret
1206
 
1205
 
1207
 
1206
 
1208
 chk_cdrom:
1207
 chk_cdrom:
1209
    mov eax,24
1208
    mov eax,24
1210
    mov ebx,1
1209
    mov ebx,1
1211
    mcall
1210
    mcall
1212
    cmp eax,0
1211
    cmp eax,0
1213
    je chk_cdrom_ok
1212
    je chk_cdrom_ok
1214
    mov [flag],2
1213
    mov [flag],2
1215
    call draw_window
1214
    call draw_window
1216
    jmp  chk_cdrom_end
1215
    jmp  chk_cdrom_end
1217
   chk_cdrom_ok:
1216
   chk_cdrom_ok:
1218
    mov [flag],0
1217
    mov [flag],0
1219
   chk_cdrom_end:
1218
   chk_cdrom_end:
1220
ret
1219
ret
1221
 
1220
 
1222
read_cd:
1221
read_cd:
1223
    mov [if_stopped],TRUE
1222
    mov [if_stopped],TRUE
1224
    push ax
1223
    push ax
1225
    cmp [flag],2
1224
    cmp [flag],2
1226
    je  read_cd_end
1225
    je  read_cd_end
1227
    mov al,101
1226
    mov al,101
1228
    mov [cdp+3],al
1227
    mov [cdp+3],al
1229
    mov eax,24
1228
    mov eax,24
1230
    mov ebx,2
1229
    mov ebx,2
1231
    mov ecx, cdp
1230
    mov ecx, cdp
1232
    mov edx,321
1231
    mov edx,321
1233
    mcall
1232
    mcall
1234
    mov [flag],1
1233
    mov [flag],1
1235
    mov al,100
1234
    mov al,100
1236
    cmp [cdp+3],al
1235
    cmp [cdp+3],al
1237
    jb  read_cd_end
1236
    jb  read_cd_end
1238
    mov [flag],3
1237
    mov [flag],3
1239
    call draw_window
1238
    call draw_window
1240
 read_cd_end:
1239
 read_cd_end:
1241
    pop ax
1240
    pop ax
1242
ret
1241
ret
1243
 
1242
 
1244
get_uptime:
1243
get_uptime:
1245
    push ebx
1244
    push ebx
1246
    mov  eax,26
1245
    mov  eax,26
1247
    mov  ebx,9
1246
    mov  ebx,9
1248
    mcall
1247
    mcall
1249
    pop  ebx
1248
    pop  ebx
1250
ret
1249
ret
1251
 
1250
 
1252
; DATA AREA
1251
; DATA AREA
1253
 
1252
 
1254
paused_time dd 0
1253
paused_time dd 0
1255
if_paused db FALSE
1254
if_paused db FALSE
1256
coord_x dd 0
1255
coord_x dd 0
1257
coord_y dd 0
1256
coord_y dd 0
1258
flag db 0
1257
flag db 0
1259
tracs dw 1
1258
tracs dw 1
1260
posx db 12
1259
posx db 12
1261
posy db 32
1260
posy db 32
1262
posxstart db 12
1261
posxstart db 12
1263
curr_trk db 0
1262
curr_trk db 0
1264
max_trk db 0
1263
max_trk db 0
1265
stimtrk dd 0
1264
stimtrk dd 0
1266
help_screen db 0
1265
help_screen db 0
1267
next_pos_sec dd 0
1266
next_pos_sec dd 0
1268
curr_trk_length dd 0
1267
curr_trk_length dd 0
1269
curr_trk_pg_time dd 0
1268
curr_trk_pg_time dd 0
1270
was_it_ok db FALSE
1269
was_it_ok db FALSE
1271
if_stopped db FALSE
1270
if_stopped db FALSE
1272
mode db NORMAL_PLAY
1271
mode db NORMAL_PLAY
1273
 
1272
 
1274
shuftab  db 00,01,02,03,04,05,06,07,08,09
1273
shuftab  db 00,01,02,03,04,05,06,07,08,09
1275
         db 10,11,12,13,14,15,16,17,18,19
1274
         db 10,11,12,13,14,15,16,17,18,19
1276
         db 20,21,22,23,24,25,26,27,28,29
1275
         db 20,21,22,23,24,25,26,27,28,29
1277
         db 30,31,32,33,34,35,36,37,38,39
1276
         db 30,31,32,33,34,35,36,37,38,39
1278
         db 40
1277
         db 40
1279
 
1278
 
1280
but_mode_lab: db 'M'
1279
but_mode_lab: db 'M'
1281
 
1280
 
1282
playing_time_info: db 'Time '
1281
playing_time_info: db 'Time '
1283
slash  db '/'
1282
slash  db '/'
1284
column db ':'
1283
column db ':'
1285
mode_normal db     'Normal '
1284
mode_normal db     'Normal '
1286
mode_repeat_1 db   'Rep trk'
1285
mode_repeat_1 db   'Rep trk'
1287
mode_repeat_all db 'Rep all'
1286
mode_repeat_all db 'Rep all'
1288
mode_shuffle db    'Shuffle'
1287
mode_shuffle db    'Shuffle'
1289
playing_trk_info: db 'Track '
1288
playing_trk_info: db 'Track '
1290
 
1289
 
1291
define_cdrom: db 'Please, define your CD-ROM'
1290
define_cdrom: db 'Please, define your CD-ROM'
1292
define_cdrom_len:
1291
define_cdrom_len:
1293
 
1292
 
1294
no_cda: db 'Audio CD not found'
1293
no_cda: db 'Audio CD not found'
1295
no_cda_len:
1294
no_cda_len:
1296
 
1295
 
1297
labelt:
1296
labelt:
1298
   db   'CD player'
1297
   db   'CD player',0
1299
labellen:
1298
labellen:
1300
 
1299
 
1301
help1: db 'HotKeys:                       '
1300
help1: db 'HotKeys:                       '
1302
       db 'H - this screen (Help)         '
1301
       db 'H - this screen (Help)         '
1303
       db 'P - Play/Pause current track   '
1302
       db 'P - Play/Pause current track   '
1304
       db 'S - Stop playing               '
1303
       db 'S - Stop playing               '
1305
       db 'L - re-read playList           '
1304
       db 'L - re-read playList           '
1306
       db 'N - play Next track            '
1305
       db 'N - play Next track            '
1307
       db 'B - play previous track (Back) '
1306
       db 'B - play previous track (Back) '
1308
       db '                        next ->'
1307
       db '                        next ->'
1309
       db 'x'
1308
       db 'x'
1310
help2: db 'HotKeys:                       '
1309
help2: db 'HotKeys:                       '
1311
       db 'F - fast Forward track         '
1310
       db 'F - fast Forward track         '
1312
       db 'R - fast Rewind track          '
1311
       db 'R - fast Rewind track          '
1313
       db 'M - change Mode                '
1312
       db 'M - change Mode                '
1314
       db '                               '
1313
       db '                               '
1315
       db '                               '
1314
       db '                               '
1316
       db '                               '
1315
       db '                               '
1317
       db '<- prev                 next ->'
1316
       db '<- prev                 next ->'
1318
       db 'x'
1317
       db 'x'
1319
help3: db 'About:                         '
1318
help3: db 'About:                         '
1320
       db 'Audio CD Player ver 1.1beta-2  '
1319
       db 'Audio CD Player ver 1.1beta-2  '
1321
       db 'All questions, wishes and      '
1320
       db 'All questions, wishes and      '
1322
       db 'advices please send to:        '
1321
       db 'advices please send to:        '
1323
       db '       E-mail:  dma@bn.by      '
1322
       db '       E-mail:  dma@bn.by      '
1324
       db '       FidoNet: 2:450/258.75   '
1323
       db '       FidoNet: 2:450/258.75   '
1325
       db '                               '
1324
       db '                               '
1326
       db '<- prev                        '
1325
       db '<- prev                        '
1327
       db 'x'
1326
       db 'x'
1328
cdp:
1327
cdp:
1329
 
1328
 
1330
 I_END:
1329
 I_END:
1331
 
1330
 
1332
;>
1331
;>
1333
ret
1332
ret
1334
 
1333
 
1335
 
1334
 
1336
draw_window:
1335
draw_window:
1337
 
1336
 
1338
>
1337
>
1339
 
1338
 
1340
>
1339
>