Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
31 halyavin 1
;
2
;    SOUND BLASTER
3
;
4
;    Compile with FASM for Menuet
5
;
6
 
7
include 'lang.inc'
8
include 'macros.inc'
9
 
10
use32
11
 
12
                org     0x0
13
 
14
                db      'MENUET01'              ; 8 byte id
15
                dd      0x01
16
                dd      START                   ; program start
17
                dd      I_END                   ; program image size
18
                dd      0x80000                 ; required amount of memory
19
                dd      0xfff0                  ; stack position
20
                dd      0,0
21
 
22
 
23
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
24
 
25
vol_data             dd 0x40000
26
playposition         dd 0x20000
27
next_tic             dd 0x0
28
onoff                dd 0x0
29
pause_between_songs  dd 100
30
delay                dd 100
31
repeat_song          db 0
32
mono_stereo          dd 1
33
 
34
 
35
; 0x10000 data from hd
36
; 0x20000 play position for sb
37
; 0x40000 volume indicator data
38
 
39
 
40
START:                          ; start of execution
41
 
42
    call draw_window            ; at first, draw the window
43
 
44
    mov  eax,26
45
    mov  ebx,9
46
    int  0x40
47
    mov  [next_tic],eax
48
 
49
still:
50
 
51
    mov  [delay],145
52
    cmp  [mono_stereo],2
53
    jne  no_stereo
54
    mov  [delay],73
55
  no_stereo:
56
 
57
    mov  eax,55
58
    mov  ebx,2
59
    mov  ecx,0
60
    mov  edx,[mono_stereo]
61
    int  0x40
62
 
63
    mov  eax,23                 ; wait here for event
64
    mov  ebx,1
65
    int  0x40
66
 
67
    cmp  eax,0
68
    jne  do_task
69
 
70
still2:
71
 
72
    cmp  [onoff],0
73
    je   still
74
 
75
    mov  eax,26
76
    mov  ebx,9
77
    int  0x40
78
    mov  ebx,[next_tic]
79
    cmp  eax,ebx
80
    jge  play_wave_block
81
 
82
    mov  edi,[next_tic]
83
    sub  edi,eax
84
    mov  eax,[delay]
85
    sub  eax,edi
86
    mov  edi,eax
87
    call draw_volume
88
 
89
    jmp  still
90
 
91
  do_task:
92
 
93
    cmp  eax,1                  ; redraw request ?
94
    je   red
95
    cmp  eax,2                  ; key in buffer ?
96
    je   key
97
    cmp  eax,3                  ; button in buffer ?
98
    je   button
99
 
100
    cmp  eax,16+4
101
    jne  no_irman
102
    mov  eax,42
103
    mov  ebx,4
104
    int  0x40
105
    dec  [ir_count]
106
    cmp  bl,140
107
    jne  no_first
108
    mov  [ir_count],3
109
  no_first:
110
    cmp  [ir_count],0
111
    jne  no_irman
112
    call give_wav
113
    cmp  bl,215
114
    je   play
115
    mov  ah,4
116
;;    cmp  bl,55
117
;;    je   rev
118
    mov  ah,3
119
;;;    cmp  bl,183
120
;;;    je   rev
121
    cmp  bl,127
122
    jne  no_block_dec
123
    add  [block],65536/512*10
124
  no_block_dec:
125
    cmp  bl,191
126
    jne  no_block_inc
127
    sub  [block],65536/512*10
128
  no_block_inc:
129
    jmp  still
130
   no_irman:
131
 
132
    jmp  still
133
 
134
  play_wave_block:
135
 
136
    mov  eax,55    ; load wave
137
    mov  ebx,0
138
    mov  ecx,[playposition]
139
    int  0x40
140
 
141
    mov  eax,55    ; play wave
142
    mov  ebx,1
143
    int  0x40
144
 
145
    mov  eax,26
146
    mov  ebx,9
147
    int  0x40
148
    add  eax,[delay]
149
    mov  [next_tic],eax
150
 
151
    call draw_wave
152
    call read_wav
153
 
154
    jmp  still
155
 
156
  red:                          ; redraw
157
    call draw_window
158
    jmp  still
159
 
160
  key:                          ; key
161
    mov  eax,2                  ; just read it and ignore
162
    int  0x40
163
    jmp  still2
164
 
165
  button:                       ; button
166
    mov  eax,17                 ; get id
167
    int  0x40
168
 
169
    cmp  ah,6
170
    jne  no_ir
171
    call enable_ir
172
    jmp  still
173
  no_ir:
174
 
175
    cmp  ah,7
176
    jne  no_file_name
177
    call read_string
178
    jmp  still
179
  no_file_name:
180
 
181
    cmp  ah,2                   ; button id=2
182
    jne  noplay
183
  play:
184
    mov  eax,[onoff]
185
    not  eax
186
    and  eax,1
187
    mov  [onoff],eax
188
    mov  [playposition],0x20000
189
    mov  [block],2
190
    call read_header
191
    call read_wav
192
;    mov  [next_tic],0
193
    jmp  still
194
 
195
  noplay:
196
 
197
    cmp  ah,3
198
    jb   no_rev
199
    cmp  ah,4
200
    jg   no_rev
201
    sub  ah,3
202
    shr  eax,8
203
    imul eax,4000
204
    sub  eax,2000
205
    add  [block],eax
206
    cmp  [block],0x0f000000
207
    jb   block_ok
208
    mov  [block],2
209
  block_ok:
210
    call display_progress
211
    jmp  still2
212
  no_rev:
213
 
214
    cmp  ah,5                   ; repeat song ?
215
    jne  no_repeat
216
    mov  al,[repeat_song]
217
    inc  al
218
    and  eax,1
219
    mov  [repeat_song],al
220
    shl  eax,2
221
    mov  eax,[repeat_text+eax]
222
    mov  [text+40*5+31],eax
223
    call draw_window
224
    jmp  still
225
    repeat_text: db 'OFF ON  '
226
  no_repeat:
227
 
228
 
229
    cmp  ah,1
230
    jne  noclose
231
    cmp  [infrared_enabled],1
232
    jne  no_dis
233
    mov  eax,45
234
    mov  ebx,1
235
    mov  ecx,4
236
    int  0x40
237
    mov  eax,46
238
    mov  ebx,1
239
    mov  ecx,0x3f0
240
    mov  edx,0x3ff
241
    int  0x40
242
  no_dis:
243
    mov  eax,-1                 ; close this program
244
    int  0x40
245
  noclose:
246
 
247
    jmp  still2
248
 
249
 
250
give_wav:
251
 
252
    pusha
253
 
254
    mov  eax,55
255
    mov  ebx,0
256
    mov  ecx,0x20000
257
    int  0x40
258
 
259
    popa
260
    ret
261
 
262
ir_count db 0x0
263
 
264
 
265
drop_rate dd 100
266
 
267
draw_volume:
268
 
269
; edi = tic to show
270
 
271
    ret
272
 
273
    pusha
274
 
275
    add  edi,[vol_data]
276
 
277
    mov  eax,[drop_rate]
278
    cmp  eax,2
279
    jb   no_drop
280
    sub  eax,2
281
  no_drop:
282
    mov  [drop_rate],eax
283
 
284
    movzx eax,byte [edi]
285
    cmp  eax,[drop_rate]
286
    jge  drop_ok
287
    mov  eax,[drop_rate]
288
    mov  [edi],al
289
    jmp  fixed_drop
290
  drop_ok:
291
    mov  [drop_rate],eax
292
  fixed_drop:
293
 
294
    mov  eax,13
295
    mov  ebx,320*65536+20
296
    mov  ecx,50*65536+1
297
    movzx edx,byte [edi]
298
    shr   edx,1
299
    mov  esi,128
300
    sub  esi,edx
301
    add  ecx,esi
302
    mov  edx,0x00ff00
303
    int  0x40
304
 
305
    mov  eax,13
306
    mov  ebx,320*65536+20
307
    movzx edx,byte [edi]
308
    shr  edx,1
309
    mov  ecx,edx
310
    add  ecx,(50+128)*65536+1
311
    shl  edx,16
312
    sub  ecx,edx
313
    mov  edx,0xff0000
314
    int  0x40
315
 
316
    popa
317
 
318
    ret
319
 
320
 
321
read_header:
322
 
323
    pusha
324
 
325
    mov  dword [file_info+4],0               ; block to read
326
    mov  dword [file_info+8],1               ; blocks to read
327
    mov  dword [file_info+12],0x10000+1024   ; return data pointer
328
    mov  dword [file_info+16],0x60000        ; work area for os
329
 
330
    mov  eax,58
331
    mov  ebx,file_info
332
    int  0x40
333
 
334
    movzx eax,byte [0x10000+1024+12+10]
335
    mov   [channels],eax
336
    movzx eax,byte [0x10000+1024+12+20]
337
    mov   [bytes_per_sample],eax
338
 
339
    cmp   [0x10000+1024],dword 'RIFF'
340
    jne   unknownformat
341
    cmp   [0x10000+1024+8],dword 'WAVE'
342
    jne   unknownformat
343
 
344
    mov [addb],128
345
    cmp [channels],1
346
    je  addb_ok
347
    mov [addb],256
348
  addb_ok:
349
    cmp [bytes_per_sample],1
350
    je  addb_ok2
351
    mov [addb],256
352
  addb_ok2:
353
 
354
    mov [bmul],256
355
    cmp [addb],256
356
    je  bmok
357
    mov [bmul],512
358
  bmok:
359
 
360
    cmp [bytes_per_sample],4
361
    jne no16s
362
    mov [addb],512   ;mono_stereo
363
    mov ecx,[mono_stereo]
364
    shr ecx,1
365
    shr [addb],cl
366
    mov [bmul],128   ;mono_stereo
367
    shl [bmul],cl
368
  no16s:
369
 
370
    popa
371
 
372
    ret
373
 
374
unknownformat:
375
 
376
    mov  [onoff],0
377
 
378
    call display_progress
379
 
380
    mov  eax,13
381
    mov  ebx,190*65536+10
382
    mov  ecx,104*65536+10
383
    mov  edx,0xff0000
384
    int  0x40
385
    pusha
386
 
387
    mov  eax,5
388
    mov  ebx,[pause_between_songs]
389
    int  0x40
390
 
391
    popa
392
    mov  eax,13
393
    mov  edx,0x000000
394
    int  0x40
395
 
396
    popa
397
 
398
    ret
399
 
400
 
401
 
402
channels           dd 0x0  ; 1=mono, 2 stereo
403
bytes_per_sample   dd 0x0  ; 1=8 2=2*8/16 4=16
404
 
405
buffer dd 0x20000
406
 
407
block  dd 0x2
408
addb   dd 256    ;  128 = mono 8 bit , 256 = stereo 8 bit/16 bit mono
409
bmul   dd 0x0    ;  512 = mono 8 bit , 256 = stereo 8 bit/16 bit mono
410
 
411
file_size dd 100
412
 
413
current_play dd wavfile+40*0
414
 
415
 
416
read_wav:
417
 
418
    pusha
419
 
420
  new_file:
421
 
422
    mov  edx,[block]
423
 
424
  newread:
425
 
426
    mov  dword [file_info+4],edx             ; block to read
427
    mov  dword [file_info+8],1               ; blocks to read
428
    mov  dword [file_info+12],0x10000+1024   ; return data pointer
429
    mov  dword [file_info+16],0x60000        ; work area for os
430
 
431
    mov  eax,58
432
    mov  ebx,file_info
433
    int  0x40
434
 
435
 
436
    pusha
437
    mov  eax,11
438
    int  0x40
439
    cmp  eax,1
440
    jne  no_wd
441
    call draw_window
442
  no_wd:
443
    popa
444
 
445
    pusha
446
    mov  eax,38
447
    mov  ebx,1*65536+128
448
    mov  ecx,71*65536+71
449
    add  ebx,25*65536+25
450
    mov  edx,0x555555
451
;    int  0x40
452
    mov  eax,38
453
    mov  ebx,[esp+32-12]
454
    and  ebx,65536/512 -1
455
    or   ebx,1*65536
456
    add  ebx,25*65536+25
457
    mov  ecx,71*65536+71
458
    mov  edx,0x999999
459
;    int  0x40
460
    popa
461
 
462
    cmp  eax,0
463
    je   conp
464
 
465
    movzx eax,byte [repeat_song]
466
    inc   eax
467
    and   eax,1
468
    imul  eax,40
469
    mov  [current_play],wavfile
470
  play_ok:
471
 
472
    mov  [onoff],1
473
    mov  [playposition],0x20000
474
    mov  [block],20
475
 
476
    mov  eax,5
477
    mov  ebx,[pause_between_songs]
478
    add  ebx,[delay]
479
    int  0x40
480
 
481
    call read_header
482
 
483
    cmp  [onoff],0
484
    je   noplay2
485
    cmp  [repeat_song],0
486
    je   noplay2
487
 
488
    call display_progress
489
 
490
    jmp  new_file
491
 
492
  noplay2:
493
 
494
    mov  [onoff],0
495
    mov  [block],2
496
    call display_progress
497
 
498
    popa
499
    ret
500
  conp:
501
 
502
    mov  [file_size],ebx
503
 
504
    mov  esi,0x10000+1024   ; 8 bit stereo & 16 bit mono
505
    mov  edi,edx
506
    sub  edi,[block]
507
    imul edi,[bmul]
508
    add  edi,[buffer]
509
    mov  ecx,512
510
 
511
  movedata:
512
 
513
    mov  al,[esi+1]
514
 
515
    cmp  [bytes_per_sample],4 ; for 16 bit stereo
516
    jne  no_16_stereo
517
    mov  al,[esi+1]
518
    add  al,128
519
  no_16_stereo:
520
 
521
    cmp  [bytes_per_sample],1 ; for 16 bit mono
522
    je   no_16_mono
523
    cmp  [channels],2
524
    je   no_16_mono
525
    mov  al,[esi+1]
526
    add  al,128
527
  no_16_mono:
528
 
529
    mov  [edi],al
530
    mov  eax,[bytes_per_sample]
531
    cmp  [mono_stereo],1
532
    je   bps1
533
    mov  eax,[bytes_per_sample]
534
    push ecx
535
    mov  ecx,[mono_stereo]
536
    dec  ecx
537
    shr  eax,cl
538
    pop  ecx
539
  bps1:
540
    add  esi,eax ; 2;[bytes_per_sample] ; / mono_stereo
541
    add  edi,1
542
    loop movedata
543
 
544
    add  edx,1
545
    mov  ecx,[block]
546
    add  ecx,[addb]
547
    cmp  edx,ecx
548
    jbe  newread
549
 
550
    mov  ecx,[addb]
551
    add  [block],ecx
552
 
553
    call display_progress
554
 
555
  rewr:
556
 
557
    popa
558
 
559
    call set_vol_data
560
 
561
    ret
562
 
563
 
564
set_vol_data:
565
 
566
;    ret
567
 
568
    pusha
569
 
570
    mov  eax,65536
571
    xor  edx,edx
572
    mov  ebx,[delay]
573
    div  ebx
574
    push eax
575
 
576
    mov  esi,[playposition]
577
    mov  edi,[vol_data]
578
    mov  ecx,[delay]
579
 
580
  svd:
581
 
582
    mov   eax,0
583
    mov   edx,100
584
  svd3:
585
    movzx ebx,byte [esi]
586
    cmp   ebx,128
587
    jge   svd2
588
    mov   ebx,0
589
   svd2:
590
    sub   ebx,128
591
    shl   ebx,1
592
 
593
    cmp   ebx,ebp
594
    jbe   svd4
595
    mov   edx,ebx
596
   svd4:
597
 
598
    inc   esi
599
    inc   eax
600
    cmp   eax,[esp]
601
    jb    svd3
602
 
603
    mov  [edi],dl
604
    inc  edi
605
    loop svd
606
 
607
    pop  eax
608
    popa
609
 
610
    ret
611
 
612
 
613
addr  dd   0x0
614
ya    dd   0x0
615
 
616
 
617
read_string:
618
 
619
     mov  [onoff],0
620
 
621
    mov  [addr],wavfile
622
    mov  [ya],30
623
 
624
    mov  edi,[addr]
625
    mov  al,'_'
626
    mov  ecx,32
627
    rep  stosb
628
 
629
    call print_text
630
 
631
    mov  edi,[addr]
632
 
633
  f11:
634
    mov  eax,10
635
    int  0x40
636
    cmp  eax,2
637
    jne  read_done
638
    mov  eax,2
639
    int  0x40
640
    shr  eax,8
641
    cmp  eax,13
642
    je   read_done
643
    cmp  eax,8
644
    jnz  nobsl
645
    cmp  edi,[addr]
646
    jz   f11
647
    sub  edi,1
648
    mov  [edi],byte '_'
649
    call print_text
650
    jmp  f11
651
  nobsl:
652
    cmp  eax,dword 31
653
    jbe  f11
654
    cmp  eax,dword 95
655
    jb   keyok
656
    sub  eax,32
657
  keyok:
658
    mov  [edi],al
659
 
660
    call print_text
661
 
662
    add  edi,1
663
    mov  esi,[addr]
664
    add  esi,32
665
    cmp  esi,edi
666
    jnz  f11
667
 
668
  read_done:
669
 
670
    mov  ecx,[addr]
671
    add  ecx,38
672
    sub  ecx,edi
673
    mov  eax,0
674
    cld
675
    rep  stosb
676
 
677
    call print_text
678
 
679
    ret
680
 
681
 
682
print_text:
683
 
684
display_progress:
685
 
686
    pusha
687
 
688
    mov  eax,13                ; gray progress bar
689
    mov  ebx,25*65536+215
690
    mov  ecx,61*65536+8
691
    mov  edx,[border]
692
    int  0x40
693
 
694
    cmp  [onoff],1
695
    je   yes_playing
696
    mov  [block],0
697
    mov  [file_size],100*512
698
  yes_playing:
699
    mov  eax,[block]           ; yellow progress bar
700
    imul eax,214
701
    xor  edx,edx
702
    mov  ebx,[file_size]
703
    shr  ebx,9
704
    or   ebx,1
705
    div  ebx
706
    mov  ebx,eax
707
    and  ebx,0xff
708
    mov  eax,13
709
    add  ebx,25*65536
710
    mov  ecx,61*65536+1
711
    mov  edx,[drawp]
712
   newbar:
713
    int  0x40
714
    add  edx,0x101010
715
    add  ecx,1*65536
716
    cmp  ecx,65*65536
717
    jb   newbar
718
   newbar2:
719
    int  0x40
720
    sub  edx,0x101010
721
    add  ecx,1*65536
722
    cmp  ecx,69*65536
723
    jb   newbar2
724
 
725
 
726
    mov   eax,[block]
727
    imul  eax,214-30
728
    xor   edx,edx
729
    mov   ebx,[file_size]
730
    shr   ebx,9
731
    or    ebx,1
732
    div   ebx
733
    mov   ebx,eax
734
    shl   ebx,16
735
    add   ebx,25*65536+30
736
    mov   ecx,61*65536+9
737
    mov   edx,0xeeeeff
738
    mov   eax,13
739
    mov   edi,5
740
  newb:
741
;    int   0x40
742
    add   ebx,1*65536-2
743
    add   ecx,1*65536-2
744
    sub   edx,0x332211;3366aa
745
    dec   edi
746
    jnz   newb
747
 
748
 
749
  noyellow:
750
 
751
    mov  esi,[current_play]
752
    mov  edi,now_playing
753
    mov  ecx,40
754
    cld
755
    rep  movsb
756
 
757
    mov  eax,13
758
    mov  ebx,42*65536+33*6
759
    mov  ecx,114*65536+11
760
    mov  edx,0x000000
761
    int  0x40
762
 
763
    mov  eax,4
764
    mov  ebx,42*65536+117
765
    mov  ecx,[textc]
766
    mov  edx,now_playing
767
    mov  esi,38
768
    int  0x40
769
 
770
    popa
771
 
772
    ret
773
 
774
 
775
shape_window:
776
 
777
    ret
778
 
779
    pusha
780
 
781
    mov  eax,50
782
    mov  ebx,0
783
    mov  ecx,shape_reference
784
    int  0x40
785
 
786
    mov  eax,50
787
    mov  ebx,1
788
    mov  ecx,4
789
    int  0x40
790
 
791
    popa
792
 
793
    ret
794
 
795
 
796
shape_reference:
797
 
798
times 1  db  1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0
799
times 9  db  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
800
 
801
infrared_enabled db 0x0
802
 
803
 
804
enable_ir:
805
 
806
    pusha
807
 
808
    mov  eax,46
809
    mov  ebx,0
810
    mov  ecx,0x3f0
811
    mov  edx,0x3ff
812
    int  0x40
813
 
814
    mov  eax,45
815
    mov  ebx,0
816
    mov  ecx,4
817
    int  0x40
818
 
819
    mov  eax,40
820
    mov  ebx,10000b shl 16 + 111b
821
    int  0x40
822
 
823
    mov  [infrared_enabled],1
824
 
825
    popa
826
 
827
    ret
828
 
829
 
830
 
831
;   *********************************************
832
;   *******  WINDOW DEFINITIONS AND DRAW ********
833
;   *********************************************
834
 
835
 
836
draw_window:
837
 
838
    pusha
839
 
840
    inc  [next_tic]
841
 
842
    mov  eax,12                    ; function 12:tell os about windowdraw
843
    mov  ebx,1                     ; 1, start of draw
844
    int  0x40
845
                                   ; DRAW WINDOW
846
    mov  eax,0                     ; function 0 : define and draw window
847
    mov  ebx,100*65536+320         ; [x start] *65536 + [x size]
848
    mov  ecx,100*65536+140         ; [y start] *65536 + [y size]
849
    mov  edx,[bgr]
850
    add  edx,0x03000000            ; color of work area RRGGBB,8->color gl
851
    mov  esi,0x808844ee
852
    mov  edi,0x008844ee            ; color of frames    RRGGBB
853
    int  0x40
854
 
855
                                   ; WINDOW LABEL
856
    mov  eax,4                     ; function 4 : write text to window
857
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
858
    mov  ecx,0x10ffffff            ; color of text RRGGBB
859
    mov  edx,labelt                ; pointer to text beginning
860
    mov  esi,labellen-labelt       ; text length
861
    int  0x40
862
 
863
    mov  eax,8                     ; START/STOP  - id 2
864
    mov  ebx,24*65536+77
865
    mov  ecx,80*65536+16
866
    mov  edx,2
867
    mov  esi,[border]
868
    int  0x40
869
 
870
    inc  edx                       ; << / >>     - id 3 , 4
871
    add  ebx,86*65536-57
872
    mov  eax,8
873
    int  0x40
874
    inc  edx
875
    add  ebx,24*65536
876
    mov  eax,8
877
    int  0x40
878
 
879
    mov  eax,8                      ; REPEAT
880
    add  ebx,29*65536+54
881
    inc  edx
882
    int  0x40
883
 
884
    mov  eax,8                      ; enable infrared
885
    add  ebx,98*65536-33
886
    add  ecx,10*65536+10
887
    inc  edx
888
    int  0x40
889
 
890
    pusha
891
    mov  eax,8
892
    mov  ebx,25*65536+9
893
    mov  ecx,115*65536+9
894
    inc  edx
895
    int  0x40
896
    popa
897
 
898
    mov  eax,4
899
    shr  ecx,16
900
    mov  bx,cx
901
    add  ebx,2*65536+4
902
    mov  ecx,0xffffff
903
    mov  edx,infrared_text
904
    mov  esi,10
905
    int  0x40
906
    add  ebx,11
907
    add  edx,10
908
    mov  eax,4
909
    int  0x40
910
 
911
    mov  ebx,25*65536+35           ; draw info text with function 4
912
    mov  ecx,[textc]
913
    mov  edx,text
914
    mov  esi,40
915
  newline:
916
    mov  eax,4
917
    int  0x40
918
    add  ebx,10
919
    add  edx,40
920
    cmp  [edx],byte 'x'
921
    jne  newline
922
 
923
    call display_progress
924
 
925
    call draw_wave
926
 
927
    mov  eax,12
928
    mov  ebx,2
929
    int  0x40
930
 
931
    popa
932
    ret
933
 
934
 
935
 
936
 
937
draw_wave:
938
 
939
;    ret
940
 
941
    pusha
942
 
943
    mov   eax,13
944
    mov   ebx,260*65536+43
945
    mov   ecx,42*65536+32
946
    mov   edx,[border]
947
    int   0x40
948
 
949
    mov   esi,[playposition]
950
    mov   ebx,260
951
   npix:
952
    mov   eax,1
953
    inc   ebx
954
    movzx ecx,byte [esi]
955
    shr   ecx,3
956
    add   ecx,42
957
    mov   edx,[drawc];0x2255aa
958
    int   0x40
959
 
960
    add   esi,2
961
 
962
    cmp   ebx,300
963
    jbe   npix
964
 
965
    popa
966
 
967
    ret
968
 
969
 
970
; DATA AREA
971
 
972
infrared_text: db  'IRMAN     INFRAR      '
973
 
974
 
975
textc   dd  0xffffff
976
bgr     dd  0x00000000
977
drawc   dd  0x2255aa
978
drawp   dd  0x8011aa
979
border  dd  0x5577aa
980
 
981
text:
982
    db 'Define SB, HD & partition with setup    '
983
    db 'If clipping change "delay" in source    '
984
    db '                                        '
985
    db '                                        '
986
    db '                                        '
987
    db ' START/STOP    <<  >>   REPEAT:OFF      '
988
    db 'x <- END MARKER, DONT DELETE            '
989
now_playing:
990
    db '                                        '
991
    db 'xx                                      '
992
 
993
file_info:
994
 
995
    dd  0   ; read
996
    dd  0
997
    dd  0
998
    dd  0
999
    dd  0
1000
 
1001
wavfile:
1002
    db '/HD/1/MENUET/MUSIC/FILE7.WAV',0
1003
    db '                                        '
1004
 
1005
 
1006
labelt:
1007
      db   ' WAVE PLAYER  :  8b Mono - 16b Stereo'
1008
labellen:
1009
 
1010
I_END: