Subversion Repositories Kolibri OS

Rev

Rev 147 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 147 Rev 485
Line 2... Line 2...
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 6... Line 6...
6
 
6
 
7
include "macros.inc"
7
include "..\..\..\macros.inc"
Line 8... Line 8...
8
include "lang.inc"
8
include "lang.inc"
9
 
9
 
Line 33... Line 33...
33
                  dd     0x0, 0x0              ; reserved=no extended header
33
                  dd     0x0, 0x0              ; reserved=no extended header
Line 34... Line 34...
34
 
34
 
35
START:
35
START:
36
    call chk_cdrom                      ; start of execution
36
    call chk_cdrom                      ; start of execution
-
 
37
    call read_cd
-
 
38
 
37
    call read_cd
39
  red:                          ; redraw
38
    call draw_window            ; at first, draw the window
40
    call draw_window            ; at first, draw the window
Line 39... Line 41...
39
still:
41
still:
40
 
42
 
41
    mov  eax,23
43
    mov  eax,23
Line 42... Line 44...
42
    mov  ebx,10                 ; wait here for event
44
    mov  ebx,10                 ; wait here for event
43
    int  0x40
45
    mcall
44
 
46
 
45
    cmp  eax,1                  ; redraw request ?
47
    cmp  eax,1                  ; redraw request ?
Line 54... Line 56...
54
    je   @f
56
    je   @f
55
    call current_trk_time
57
    call current_trk_time
56
   @@:
58
   @@:
57
    jmp  still
59
    jmp  still
Line 58... Line -...
58
 
-
 
59
  red:                          ; redraw
-
 
60
    call draw_window
-
 
61
 
-
 
Line 62... Line 60...
62
    jmp  still
60
 
63
 
61
 
64
  key:                          ; key
62
  key:                          ; key
Line 65... Line 63...
65
    mov  eax,2                  ; just read it and ignore
63
    mov  eax,2                  ; just read it and ignore
66
    int  0x40
64
    mcall
67
 
65
 
68
;======  hotkeys:
66
;======  hotkeys:
Line 187... Line 185...
187
    jmp  still
185
    jmp  still
Line 188... Line 186...
188
 
186
 
189
 
187
 
190
  button:                       ; button
188
  button:                       ; button
Line 191... Line 189...
191
    mov  eax,17
189
    mov  eax,17
192
    int  0x40
190
    mcall
193
 
191
 
194
    cmp  ah,1                   ; button id=1 ?
192
    cmp  ah,1                   ; button id=1 ?
195
    jnz  no_but_close
193
    jnz  no_but_close
196
    mov  eax,24
194
    mov  eax,24
197
    mov  ebx,3
195
    mov  ebx,3
198
    int 0x40
196
    mcall
Line 199... Line 197...
199
    mov  eax,0xffffffff         ; close this program
197
    mov  eax,0xffffffff         ; close this program
200
    int  0x40
198
    mcall
201
  no_but_close:
199
  no_but_close:
Line 524... Line 522...
524
    add cl,al   ;real min
522
    add cl,al   ;real min
525
    mov ch,dl   ;real sec
523
    mov ch,dl   ;real sec
Line 526... Line 524...
526
 
524
 
527
    mov  eax,24
525
    mov  eax,24
528
    mov  ebx,1
526
    mov  ebx,1
529
    int  0x40
527
    mcall
Line 530... Line 528...
530
    ret
528
    ret
531
 
529
 
532
play_n_track:
530
play_n_track:
533
    mov  [if_paused],FALSE
531
    mov  [if_paused],FALSE
534
    mov  [if_stopped],FALSE
532
    mov  [if_stopped],FALSE
535
    mov  [curr_trk_pg_time],0
533
    mov  [curr_trk_pg_time],0
536
    call draw_window
534
    call draw_window
537
;    mov  eax,26
535
;    mov  eax,26
538
;    mov  ebx,9
536
;    mov  ebx,9
539
;    int  0x40
537
;    mcall
540
    call get_uptime
538
    call get_uptime
541
    mov  [stimtrk],eax
539
    mov  [stimtrk],eax
542
    xor  ebx,ebx
540
    xor  ebx,ebx
Line 586... Line 584...
586
   mov [curr_trk_length],ecx
584
   mov [curr_trk_length],ecx
587
;now play that!
585
;now play that!
588
    mov ecx,ebx
586
    mov ecx,ebx
589
    mov  eax,24
587
    mov  eax,24
590
    mov  ebx,1
588
    mov  ebx,1
591
    int  0x40
589
    mcall
592
    ret
590
    ret
Line 593... Line 591...
593
 
591
 
594
 
592
 
Line 638... Line 636...
638
    ret
636
    ret
Line 639... Line 637...
639
 
637
 
640
stop_playing:
638
stop_playing:
641
    mov eax, 24
639
    mov eax, 24
642
    mov ebx,3
640
    mov ebx,3
643
    int 0x40
641
    mcall
644
    mov  cl,[max_trk]
642
    mov  cl,[max_trk]
645
    mov  [shuftab],cl
643
    mov  [shuftab],cl
646
    mov [if_stopped],TRUE
644
    mov [if_stopped],TRUE
647
    cmp [if_paused],TRUE
645
    cmp [if_paused],TRUE
Line 659... Line 657...
659
    ;bar->
657
    ;bar->
660
    mov eax,13
658
    mov eax,13
661
    mov ebx, 10 shl 16 + 41
659
    mov ebx, 10 shl 16 + 41
662
    mov ecx,120 shl 16 + 9
660
    mov ecx,120 shl 16 + 9
663
    mov edx,0x00ffffff
661
    mov edx,0x00ffffff
664
    int 0x40
662
    mcall
665
    mov ebx, 96 shl 16 + 11
663
    mov ebx, 96 shl 16 + 11
666
    int 0x40
664
    mcall
667
    mov ebx, 185 shl 16 + 11
665
    mov ebx, 185 shl 16 + 11
668
    int 0x40
666
    mcall
669
    mov ebx, 200 shl 16 + 11
667
    mov ebx, 200 shl 16 + 11
670
    int 0x40
668
    mcall
671
    mov ebx, 150 shl 16 + 11
669
    mov ebx, 150 shl 16 + 11
672
    int 0x40
670
    mcall
673
    mov ebx, 165 shl 16 + 11
671
    mov ebx, 165 shl 16 + 11
674
    int 0x40
672
    mcall
675
   ;bar<-
673
   ;bar<-
Line 676... Line 674...
676
 
674
 
677
    mov  eax,4
675
    mov  eax,4
678
    mov  ebx,10 shl 16 +120
676
    mov  ebx,10 shl 16 +120
Line 699... Line 697...
699
;    mov  cl,[max_trk]
697
;    mov  cl,[max_trk]
700
;    mov  [shuftab],cl
698
;    mov  [shuftab],cl
701
    jmp  info_mode_end
699
    jmp  info_mode_end
702
   info_mode_end:
700
   info_mode_end:
703
    mov  esi,7
701
    mov  esi,7
704
    int 0x40
702
    mcall
Line 705... Line 703...
705
 
703
 
706
  ;num info ->
704
  ;num info ->
707
    mov  eax,47
705
    mov  eax,47
708
    xor  ebx,ebx
706
    xor  ebx,ebx
Line 711... Line 709...
711
    or   ebx,0x20000            ;X0000 - number of digits to draw
709
    or   ebx,0x20000            ;X0000 - number of digits to draw
712
    xor  ecx,ecx
710
    xor  ecx,ecx
713
    mov  cl, [curr_trk]            ;number to draw
711
    mov  cl, [curr_trk]            ;number to draw
714
    mov  edx,96 shl 16 + 120
712
    mov  edx,96 shl 16 + 120
715
    mov  esi,0x111111
713
    mov  esi,0x111111
716
    int 0x40
714
    mcall
717
    mov  eax,[curr_trk_pg_time]
715
    mov  eax,[curr_trk_pg_time]
718
    xor  edx,edx
716
    xor  edx,edx
719
    mov  ecx,60
717
    mov  ecx,60
720
    div  ecx
718
    div  ecx
721
    push edx
719
    push edx
722
    mov  ecx,eax
720
    mov  ecx,eax
723
    mov  eax,47
721
    mov  eax,47
724
    mov  edx,150 shl 16 + 120
722
    mov  edx,150 shl 16 + 120
725
    int  0x40
723
    mcall
726
    pop ecx
724
    pop ecx
727
    mov  edx,165 shl 16 + 120
725
    mov  edx,165 shl 16 + 120
728
    int 0x40
726
    mcall
729
    mov  eax,[curr_trk_length]
727
    mov  eax,[curr_trk_length]
730
    xor  edx,edx
728
    xor  edx,edx
731
    mov  ecx,60
729
    mov  ecx,60
732
    div  ecx
730
    div  ecx
733
    push edx
731
    push edx
734
    mov  ecx,eax
732
    mov  ecx,eax
735
    mov  eax,47
733
    mov  eax,47
736
    mov  edx,185 shl 16 + 120
734
    mov  edx,185 shl 16 + 120
737
    int  0x40
735
    mcall
738
    pop  ecx
736
    pop  ecx
739
    mov  edx,200 shl 16 + 120
737
    mov  edx,200 shl 16 + 120
740
    int  0x40
738
    mcall
741
   ;num info <-
739
   ;num info <-
742
ret
740
ret
Line 743... Line 741...
743
 
741
 
Line 744... Line 742...
744
 
742
 
745
draw_window:
743
draw_window:
746
 
744
 
747
    mov  eax,12                    ; function 12:tell os about windowdraw
745
    mov  eax,12                    ; function 12:tell os about windowdraw
748
    mov  ebx,1                     ; 1, start of draw
746
    mov  ebx,1                     ; 1, start of draw
749
    int  0x40
747
    mcall
750
                                   ; DRAW WINDOW
748
                                   ; DRAW WINDOW
751
    mov  eax,0                     ; function 0 : define and draw window
749
    mov  eax,0                     ; function 0 : define and draw window
752
    mov  ebx, 50*65536+219         ; [x start] *65536 + [x size]
750
    mov  ebx, 50*65536+219         ; [x start] *65536 + [x size]
753
    mov  ecx,100*65536+168         ; [y start] *65536 + [y size]
751
    mov  ecx,100*65536+168         ; [y start] *65536 + [y size]
754
    mov  edx,0x03ffffff            ; color of work area RRGGBB
752
    mov  edx,0x03ffffff            ; color of work area RRGGBB
755
    mov  esi,0x8099bbff            ; color of grab bar  RRGGBB,8->color glide
753
    mov  esi,0x8099bbff            ; color of grab bar  RRGGBB,8->color glide
756
    mov  edi,0x0099bbee            ; color of frames    RRGGBB
754
    mov  edi,0x0099bbee            ; color of frames    RRGGBB
757
    int  0x40
755
    mcall
758
                                   ; WINDOW LABEL
756
                                   ; WINDOW LABEL
759
    mov  eax,4                     ; function 4 : write text to window
757
    mov  eax,4                     ; function 4 : write text to window
760
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
758
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
761
    mov  ecx,0x1000ffff            ; color of text RRGGBB
759
    mov  ecx,0x1000ffff            ; color of text RRGGBB
Line 762... Line 760...
762
    mov  edx,labelt                ; pointer to text beginning
760
    mov  edx,labelt                ; pointer to text beginning
763
    mov  esi,labellen-labelt       ; text length
761
    mov  esi,labellen-labelt       ; text length
764
    int  0x40
762
    mcall
765
 
763
 
766
    mov  eax,13                    ;bar
764
    mov  eax,13                    ;bar
Line 767... Line 765...
767
    mov  ebx,8 shl 16 + 204
765
    mov  ebx,8 shl 16 + 204
768
    mov  ecx,28 shl 16 + 84
766
    mov  ecx,28 shl 16 + 84
769
    mov  edx,0x000fe6f5
767
    mov  edx,0x000fe6f5
770
    int  0x40
768
    mcall
771
 
769
 
772
    ;info ->
770
    ;info ->
773
    mov  eax,4
771
    mov  eax,4
774
    mov  ebx,63 shl 16 + 120
772
    mov  ebx,63 shl 16 + 120
775
    mov  ecx,0x00111111
773
    mov  ecx,0x00111111
776
    mov  edx,playing_trk_info
774
    mov  edx,playing_trk_info
777
    mov  esi,6
775
    mov  esi,6
778
    int 0x40
776
    mcall
779
    mov  ebx,120 shl 16 + 120
777
    mov  ebx,120 shl 16 + 120
780
    mov  edx,playing_time_info
778
    mov  edx,playing_time_info
781
;    mov  esi,5
779
;    mov  esi,5
782
    dec  esi
780
    dec  esi
783
    int 0x40
781
    mcall
784
    mov  ebx,178 shl 16 + 120
782
    mov  ebx,178 shl 16 + 120
785
    mov  edx,slash
783
    mov  edx,slash
786
    mov  esi,1
784
    mov  esi,1
787
    int 0x40
785
    mcall
788
    mov  ebx,196 shl 16 + 120
786
    mov  ebx,196 shl 16 + 120
789
    mov  edx,column
787
    mov  edx,column
790
;    mov  esi,1
788
;    mov  esi,1
791
    int 0x40
789
    mcall
Line 792... Line 790...
792
    mov  ebx,161 shl 16 + 120
790
    mov  ebx,161 shl 16 + 120
793
    mov  edx,column
791
    mov  edx,column
794
;    mov  esi,1
792
;    mov  esi,1
795
    int 0x40
793
    mcall
796
    ;info <-
794
    ;info <-
797
 
795
 
798
; button  MODE
796
; button  MODE
799
    mov  eax,8
797
    mov  eax,8
800
    mov  ebx,12*65536+20
798
    mov  ebx,12*65536+20
801
    mov  ecx,135*65536+20
799
    mov  ecx,135*65536+20
802
    mov  edx,7
800
    mov  edx,7
803
    mov  esi,COLOR_FUNC_BUTS
801
    mov  esi,COLOR_FUNC_BUTS
804
    int 0x40
802
    mcall
805
   ; text
803
   ; text
Line 806... Line 804...
806
    mov  eax,4
804
    mov  eax,4
807
    mov  ebx,19*65536+142
805
    mov  ebx,19*65536+142
808
    mov  ecx,0x100f73f5;ffff0f
806
    mov  ecx,0x100f73f5;ffff0f
809
    mov  edx,but_mode_lab
807
    mov  edx,but_mode_lab
810
    mov  esi,1
808
    mov  esi,1
811
    int  0x40
809
    mcall
812
 
810
 
813
; button  BACK
811
; button  BACK
814
    mov  eax,8
812
    mov  eax,8
815
    mov  ebx,37*65536+20
813
    mov  ebx,37*65536+20
816
    mov  ecx,135*65536+20
814
    mov  ecx,135*65536+20
817
    mov  edx,6
815
    mov  edx,6
Line 827... Line 825...
827
    mov  eax,8
825
    mov  eax,8
828
    mov  ebx,62*65536+20
826
    mov  ebx,62*65536+20
829
    mov  ecx,135*65536+20
827
    mov  ecx,135*65536+20
830
    mov  edx,5
828
    mov  edx,5
831
    mov  esi,COLOR_FUNC_BUTS
829
    mov  esi,COLOR_FUNC_BUTS
832
    int 0x40
830
    mcall
833
    mov [coord_x],68
831
    mov [coord_x],68
834
    mov [coord_y],141
832
    mov [coord_y],141
835
    call draw_right_triangle
833
    call draw_right_triangle
836
    mov [coord_x],74
834
    mov [coord_x],74
837
    call draw_vertical_line
835
    call draw_vertical_line
Line 840... Line 838...
840
    mov  eax,8
838
    mov  eax,8
841
    mov  ebx,87*65536+20
839
    mov  ebx,87*65536+20
842
    mov  ecx,135*65536+20
840
    mov  ecx,135*65536+20
843
    mov  edx,8
841
    mov  edx,8
844
    mov  esi,COLOR_FUNC_BUTS
842
    mov  esi,COLOR_FUNC_BUTS
845
    int 0x40
843
    mcall
846
    mov [coord_x],102
844
    mov [coord_x],102
847
    mov [coord_y],141
845
    mov [coord_y],141
848
    call draw_left_triangle
846
    call draw_left_triangle
849
    mov [coord_x],97
847
    mov [coord_x],97
850
    call draw_left_triangle
848
    call draw_left_triangle
Line 853... Line 851...
853
    mov  eax,8
851
    mov  eax,8
854
    mov  ebx,112*65536+20
852
    mov  ebx,112*65536+20
855
    mov  ecx,135*65536+20
853
    mov  ecx,135*65536+20
856
    mov  edx,3
854
    mov  edx,3
857
    mov  esi,COLOR_FUNC_BUTS
855
    mov  esi,COLOR_FUNC_BUTS
858
    int 0x40
856
    mcall
859
    mov [coord_x],118
857
    mov [coord_x],118
860
    mov [coord_y],142
858
    mov [coord_y],142
861
    call draw_square
859
    call draw_square
Line 865... Line 863...
865
    mov  eax,8
863
    mov  eax,8
866
    mov  ebx,137*65536+20
864
    mov  ebx,137*65536+20
867
    mov  ecx,135*65536+20
865
    mov  ecx,135*65536+20
868
    mov  edx,2
866
    mov  edx,2
869
    mov  esi,COLOR_FUNC_BUTS
867
    mov  esi,COLOR_FUNC_BUTS
870
    int 0x40
868
    mcall
871
    cmp [if_stopped],TRUE
869
    cmp [if_stopped],TRUE
872
    je  playing_paused
870
    je  playing_paused
873
    cmp [if_paused],TRUE
871
    cmp [if_paused],TRUE
874
    je  playing_paused
872
    je  playing_paused
875
    mov [coord_x],144
873
    mov [coord_x],144
Line 889... Line 887...
889
    mov  eax,8
887
    mov  eax,8
890
    mov  ebx,162*65536+20
888
    mov  ebx,162*65536+20
891
    mov  ecx,135*65536+20
889
    mov  ecx,135*65536+20
892
    mov  edx,9
890
    mov  edx,9
893
    mov  esi,COLOR_FUNC_BUTS
891
    mov  esi,COLOR_FUNC_BUTS
894
    int 0x40
892
    mcall
895
    mov [coord_x],167
893
    mov [coord_x],167
896
    mov [coord_y],141
894
    mov [coord_y],141
897
    call draw_right_triangle
895
    call draw_right_triangle
898
    mov [coord_x],172
896
    mov [coord_x],172
899
    call draw_right_triangle
897
    call draw_right_triangle
Line 902... Line 900...
902
    mov  eax,8
900
    mov  eax,8
903
    mov  ebx,187*65536+20
901
    mov  ebx,187*65536+20
904
    mov  ecx,135*65536+20
902
    mov  ecx,135*65536+20
905
    mov  edx,4
903
    mov  edx,4
906
    mov  esi,COLOR_FUNC_BUTS
904
    mov  esi,COLOR_FUNC_BUTS
907
    int 0x40
905
    mcall
908
    mov  [coord_x],192
906
    mov  [coord_x],192
909
    mov  [coord_y],140
907
    mov  [coord_y],140
910
    call draw_vert_list_line
908
    call draw_vert_list_line
911
    dec  [coord_y]
909
    dec  [coord_y]
912
    call draw_hor_list_line
910
    call draw_hor_list_line
Line 949... Line 947...
949
    xor  edx,edx
947
    xor  edx,edx
950
    mov  dx,[tracs]
948
    mov  dx,[tracs]
951
    add  edx,10
949
    add  edx,10
952
    mov  esi,0xaaaaaa
950
    mov  esi,0xaaaaaa
953
    add  esi,edi
951
    add  esi,edi
954
    int  0x40
952
    mcall
955
   ;---draw tracs numbers
953
   ;---draw tracs numbers
956
    mov  eax,47
954
    mov  eax,47
957
    xor  ebx,ebx
955
    xor  ebx,ebx
958
    mov  bl,0
956
    mov  bl,0
959
    or   ebx,0x20000            ;number of digits to draw
957
    or   ebx,0x20000            ;number of digits to draw
Line 964... Line 962...
964
    add  dl,3
962
    add  dl,3
965
    shl  edx,16
963
    shl  edx,16
966
    add  dl,[posy]
964
    add  dl,[posy]
967
    add  dl,5
965
    add  dl,5
968
    mov  esi,0xffffff
966
    mov  esi,0xffffff
969
    int 0x40
967
    mcall
970
   ;---
968
   ;---
971
    mov  al,[posx]
969
    mov  al,[posx]
972
    add  al,20
970
    add  al,20
973
    mov  [posx],al
971
    mov  [posx],al
974
    xor  eax,eax
972
    xor  eax,eax
Line 996... Line 994...
996
    mov eax,4
994
    mov eax,4
997
    mov ebx, 20 shl 16 +67
995
    mov ebx, 20 shl 16 +67
998
    mov ecx,0x10ffff00
996
    mov ecx,0x10ffff00
999
    mov edx,define_cdrom
997
    mov edx,define_cdrom
1000
    mov esi,define_cdrom_len-define_cdrom
998
    mov esi,define_cdrom_len-define_cdrom
1001
    int 0x40
999
    mcall
1002
  flag3:
1000
  flag3:
1003
    cmp [flag],3
1001
    cmp [flag],3
1004
    jne flag4
1002
    jne flag4
1005
    mov eax,4
1003
    mov eax,4
1006
    mov ebx, 47 shl 16 +67
1004
    mov ebx, 47 shl 16 +67
1007
    mov ecx,0x10ffff00
1005
    mov ecx,0x10ffff00
1008
    mov edx,no_cda
1006
    mov edx,no_cda
1009
    mov esi,no_cda_len-no_cda
1007
    mov esi,no_cda_len-no_cda
1010
    int 0x40
1008
    mcall
1011
  flag4:
1009
  flag4:
1012
    cmp [flag],4
1010
    cmp [flag],4
1013
    jne flag5
1011
    jne flag5
1014
   ;help screen
1012
   ;help screen
1015
   cmp [help_screen],1
1013
   cmp [help_screen],1
Line 1028... Line 1026...
1028
   mov ebx,25*65536+30
1026
   mov ebx,25*65536+30
1029
  new_line:
1027
  new_line:
1030
   mov eax,4
1028
   mov eax,4
1031
   mov ecx,0x111111
1029
   mov ecx,0x111111
1032
   mov esi,31
1030
   mov esi,31
1033
   int 0x40
1031
   mcall
1034
  noline:
1032
  noline:
1035
   add ebx,10
1033
   add ebx,10
1036
   add edx,31
1034
   add edx,31
1037
   inc edi
1035
   inc edi
1038
   cmp [edx],byte 'x'
1036
   cmp [edx],byte 'x'
Line 1040... Line 1038...
1040
  flag5:
1038
  flag5:
1041
  call draw_info
1039
  call draw_info
Line 1042... Line 1040...
1042
 
1040
 
1043
    mov  eax,12                    ; function 12:tell os about windowdraw
1041
    mov  eax,12                    ; function 12:tell os about windowdraw
1044
    mov  ebx,2                     ; 2, end of draw
1042
    mov  ebx,2                     ; 2, end of draw
Line 1045... Line 1043...
1045
    int  0x40
1043
    mcall
Line 1046... Line 1044...
1046
 
1044
 
1047
ret
1045
ret
Line 1064... Line 1062...
1064
   draw_pixel:
1062
   draw_pixel:
1065
    dec  esi
1063
    dec  esi
1066
    inc  ebx
1064
    inc  ebx
1067
    push eax
1065
    push eax
1068
    mov  eax,1
1066
    mov  eax,1
1069
    int  0x40
1067
    mcall
1070
    pop  eax
1068
    pop  eax
1071
    cmp  esi,0
1069
    cmp  esi,0
1072
    jne  draw_pixel
1070
    jne  draw_pixel
1073
    pop  ebx
1071
    pop  ebx
1074
    dec  eax
1072
    dec  eax
Line 1088... Line 1086...
1088
   q_draw_pixel:
1086
   q_draw_pixel:
1089
    dec  esi
1087
    dec  esi
1090
    inc  ebx
1088
    inc  ebx
1091
    push eax
1089
    push eax
1092
    mov  eax,1
1090
    mov  eax,1
1093
    int  0x40
1091
    mcall
1094
    pop  eax
1092
    pop  eax
1095
    cmp  esi,0
1093
    cmp  esi,0
1096
    jne  q_draw_pixel
1094
    jne  q_draw_pixel
1097
    pop  ebx
1095
    pop  ebx
1098
    dec  eax
1096
    dec  eax
Line 1119... Line 1117...
1119
   l_draw_pixel:
1117
   l_draw_pixel:
1120
    dec  esi
1118
    dec  esi
1121
    dec  ebx
1119
    dec  ebx
1122
    push eax
1120
    push eax
1123
    mov  eax,1
1121
    mov  eax,1
1124
    int  0x40
1122
    mcall
1125
    pop  eax
1123
    pop  eax
1126
    cmp  esi,0
1124
    cmp  esi,0
1127
    jne  l_draw_pixel
1125
    jne  l_draw_pixel
1128
    pop  ebx
1126
    pop  ebx
1129
    dec  eax
1127
    dec  eax
Line 1142... Line 1140...
1142
    mov  esi,9
1140
    mov  esi,9
1143
   start_draw_vline:
1141
   start_draw_vline:
1144
    inc  ecx
1142
    inc  ecx
1145
    push eax
1143
    push eax
1146
    mov  eax,1
1144
    mov  eax,1
1147
    int  0x40
1145
    mcall
1148
    pop  eax
1146
    pop  eax
1149
    dec  esi
1147
    dec  esi
1150
    cmp  esi,0
1148
    cmp  esi,0
1151
    jne  start_draw_vline
1149
    jne  start_draw_vline
1152
    dec  eax
1150
    dec  eax
Line 1162... Line 1160...
1162
    mov  ecx,[coord_y]
1160
    mov  ecx,[coord_y]
1163
    dec  ecx
1161
    dec  ecx
1164
    mov  esi,11
1162
    mov  esi,11
1165
   vlstart_draw_vline:
1163
   vlstart_draw_vline:
1166
    inc  ecx
1164
    inc  ecx
1167
    int  0x40
1165
    mcall
1168
    dec  esi
1166
    dec  esi
1169
    cmp  esi,0
1167
    cmp  esi,0
1170
    jne  vlstart_draw_vline
1168
    jne  vlstart_draw_vline
1171
    dec  eax
1169
    dec  eax
1172
    inc ebx
1170
    inc ebx
Line 1179... Line 1177...
1179
    mov  ecx,[coord_y]
1177
    mov  ecx,[coord_y]
1180
    dec  ebx
1178
    dec  ebx
1181
    mov  esi,11
1179
    mov  esi,11
1182
   hlstart_draw_vline:
1180
   hlstart_draw_vline:
1183
    inc  ebx
1181
    inc  ebx
1184
    int  0x40
1182
    mcall
1185
    dec  esi
1183
    dec  esi
1186
    cmp  esi,0
1184
    cmp  esi,0
1187
    jne  hlstart_draw_vline
1185
    jne  hlstart_draw_vline
1188
    dec  eax
1186
    dec  eax
1189
    inc ebx
1187
    inc ebx
Line 1196... Line 1194...
1196
    mov  ecx,[coord_y]
1194
    mov  ecx,[coord_y]
1197
    dec  ebx
1195
    dec  ebx
1198
    mov  esi,5
1196
    mov  esi,5
1199
   slstart_draw_vline:
1197
   slstart_draw_vline:
1200
    inc  ebx
1198
    inc  ebx
1201
    int  0x40
1199
    mcall
1202
    dec  esi
1200
    dec  esi
1203
    cmp  esi,0
1201
    cmp  esi,0
1204
    jne  slstart_draw_vline
1202
    jne  slstart_draw_vline
1205
    dec  eax
1203
    dec  eax
1206
    inc ebx
1204
    inc ebx
Line 1208... Line 1206...
1208
 
1206
 
1209
 
1207
 
1210
 chk_cdrom:
1208
 chk_cdrom:
1211
    mov eax,24
1209
    mov eax,24
1212
    mov ebx,1
1210
    mov ebx,1
1213
    int 0x40
1211
    mcall
1214
    cmp eax,0
1212
    cmp eax,0
1215
    je chk_cdrom_ok
1213
    je chk_cdrom_ok
1216
    mov [flag],2
1214
    mov [flag],2
Line 1230... Line 1228...
1230
    mov [cdp+3],al
1228
    mov [cdp+3],al
1231
    mov eax,24
1229
    mov eax,24
1232
    mov ebx,2
1230
    mov ebx,2
1233
    mov ecx, cdp
1231
    mov ecx, cdp
1234
    mov edx,321
1232
    mov edx,321
1235
    int 0x40
1233
    mcall
1236
    mov [flag],1
1234
    mov [flag],1
1237
    mov al,100
1235
    mov al,100
1238
    cmp [cdp+3],al
1236
    cmp [cdp+3],al
1239
    jb  read_cd_end
1237
    jb  read_cd_end
1240
    mov [flag],3
1238
    mov [flag],3
Line 1245... Line 1243...
1245
 
1243
 
1246
get_uptime:
1244
get_uptime:
1247
    push ebx
1245
    push ebx
1248
    mov  eax,26
1246
    mov  eax,26
1249
    mov  ebx,9
1247
    mov  ebx,9
1250
    int  0x40
1248
    mcall
1251
    pop  ebx
1249
    pop  ebx
Line 1252... Line 1250...
1252
ret
1250
ret