Subversion Repositories Kolibri OS

Rev

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

Rev 175 Rev 195
Line 660... Line 660...
660
    mov  eax,12
660
    mov  eax,12
661
    mov  ebx,1
661
    mov  ebx,1
662
    int  0x40
662
    int  0x40
Line 663... Line 663...
663
                                   
663
                                   
664
    xor  eax,eax                     
664
    xor  eax,eax                     
665
    mov  ebx,200*65536+255        
665
    mov  ebx,200 shl 16+255        
666
    mov  ecx,200*65536+180
666
    mov  ecx,200 shl 16+180
667
    mov  edx,[sc.work]
667
    mov  edx,[sc.work]
668
    or   edx,0x33000000
668
    or   edx,0x33000000
669
    mov  edi,header
669
    mov  edi,header
Line 670... Line 670...
670
    int  0x40
670
    int  0x40
671
 
671
 
672
    mov  eax,8
672
    mov  eax,8
673
    mov  ebx,19*65536+28
673
    mov  ebx,19 shl 16+28
674
    mov  ecx,49*65536+18
674
    mov  ecx,49 shl 16+18
675
    mov  edx,6
675
    mov  edx,6
676
    mov  esi,[sc.work_button]
676
    mov  esi,[sc.work_button]
677
    mov  edi,7
677
    mov  edi,7
678
  newbutton:
678
  newbutton:
679
    dec  edi
679
    dec  edi
680
    jnz  no_new_row
680
    jnz  no_new_row
681
    mov  edi,7
681
    mov  edi,7
682
    mov  ebx,19*65536+28
682
    mov  ebx,19 shl 16+28
683
    add  ecx,20*65536
683
    add  ecx,20 shl 16
684
  no_new_row:
684
  no_new_row:
685
    int  0x40
685
    int  0x40
686
    add  ebx,30*65536
686
    add  ebx,30 shl 16
687
    inc  edx
687
    inc  edx
Line 688... Line 688...
688
    cmp  edx,39
688
    cmp  edx,39
689
    jbe  newbutton
689
    jbe  newbutton
Line 690... Line 690...
690
  
690
  
691
    mcall  ,199*65536+28,49*65536+18,2                  ; 'C'
691
    mcall  ,199 shl 16+28,49 shl 16+18,2                  ; 'C'
692
    mcall  ,220*65536+8,7*65536+8,3                     ; 'dec-bin-hex'
692
    mcall  ,220 shl 16+8,7 shl 16+8,3                     ; 'dec-bin-hex'
693
 
693
 
694
    mov  eax,4
694
    mov  eax,4
695
    mov  ebx,27*65536+54
695
    mov  ebx,27 shl 16+54
696
    mov  ecx,[sc.work_button_text]
696
    mov  ecx,[sc.work_button_text]
Line 711... Line 711...
711
 
711
 
Line 712... Line 712...
712
    ret
712
    ret
713
 
713
 
714
print_display:
714
print_display:
Line 715... Line 715...
715
    pusha
715
    pusha
716
    mcall 13,18*65536+210,19*65536+13,0xffffff
716
    mcall 13,18 shl 16+210,19 shl 16+13,0xffffff
717
 
717
 
718
    mov  eax,4
718
    mov  eax,4
719
    mov  ebx,135*65536+7
719
    mov  ebx,135 shl 16+7
720
    mov  ecx,[sc.work_text]
720
    mov  ecx,[sc.work_text]
721
    or   ecx,0x40000000
721
    or   ecx,0x40000000
722
    mov  edx,calc
722
    mov  edx,calc
Line 723... Line 723...
723
    mov  esi,1
723
    mov  esi,1
724
    mov  edi,[sc.work]
724
    mov  edi,[sc.work]
725
    int  0x40
725
    int  0x40
726
 
726
 
727
    mov  ebx,198*65536+8
727
    mov  ebx,198 shl 16+8
728
    mov  edx,[display_type]
728
    mov  edx,[display_type]
729
    shl  edx,2
729
    shl  edx,2
Line 730... Line 730...
730
    add  edx,display_type_text
730
    add  edx,display_type_text
731
    mov  esi,3
731
    mov  esi,3
732
    mov  edi,[sc.work]
732
    mov  edi,[sc.work]
733
    int  0x40
733
    int  0x40
734
   
734
   
735
    cmp  [dsign],byte '+'
735
    cmp  [dsign],byte '+'
736
    je   positive
736
    je   positive
Line 744... Line 744...
744
    cmp  [display_type],0
744
    cmp  [display_type],0
745
    jne  no_display_decimal
745
    jne  no_display_decimal
746
    cmp  [decimal],0
746
    cmp  [decimal],0
747
    je   whole
747
    je   whole
Line 748... Line 748...
748
 
748
 
749
    mov  ebx,180*65536+22
749
    mov  ebx,180 shl 16+22
750
    mov  ecx,0x0
750
    mov  ecx,0x0
751
    mov  edx,dot
751
    mov  edx,dot
752
    mov  esi,1
752
    mov  esi,1
Line 753... Line 753...
753
    int  0x40
753
    int  0x40
754
    
754
    
755
    mov  eax,47
755
    mov  eax,47
756
    mov  ebx,10*65536
756
    mov  ebx,10 shl 16
757
    mov  ecx,[integer]
757
    mov  ecx,[integer]
758
    mov  edx,120*65536+22
758
    mov  edx,120 shl 16+22
Line 759... Line 759...
759
    mov  esi,0x0
759
    mov  esi,0x0
760
    int  0x40     
760
    int  0x40     
761
    
761
    
762
    mov  ebx,6*65536
762
    mov  ebx,6 shl 16
763
    mov  ecx,[decimal]
763
    mov  ecx,[decimal]
Line 764... Line 764...
764
    mov  edx,187*65536+22     
764
    mov  edx,187 shl 16+22     
765
    mov  esi,0x0
765
    mov  esi,0x0
Line 766... Line 766...
766
    int  0x40 
766
    int  0x40 
767
 
767
 
768
    popa
768
    popa
769
    ret
769
    ret
770
    
770
    
771
whole:
771
whole:
Line 772... Line 772...
772
    mov  ebx,220*65536+22
772
    mov  ebx,220 shl 16+22
773
    mov  ecx,0x0
773
    mov  ecx,0x0
Line 774... Line 774...
774
    mov  edx,dot
774
    mov  edx,dot
775
    mov  esi,1
775
    mov  esi,1
776
    int  0x40
776
    int  0x40
777
 
777
 
778
    cmp  [integer],0
778
    cmp  [integer],0
779
    je  null
779
    je  null
Line 780... Line 780...
780
 
780
 
781
    mov  eax,47
781
    mov  eax,47
Line 793... Line 793...
793
    jne  no_display_hexadecimal
793
    jne  no_display_hexadecimal
794
    cmp  [integer],0
794
    cmp  [integer],0
795
    je  null
795
    je  null
Line 796... Line 796...
796
    
796
    
797
    mov  eax,47
797
    mov  eax,47
798
    mov  ebx,256+8*65536
798
    mov  ebx,256+8 shl 16
799
    mov  ecx,[integer]
799
    mov  ecx,[integer]
800
    mov  edx,173*65536+22
800
    mov  edx,173 shl 16+22
801
    mov  esi,0x0
801
    mov  esi,0x0
Line 802... Line 802...
802
    int  0x40
802
    int  0x40
803
 
803
 
Line 807... Line 807...
807
  no_display_hexadecimal:
807
  no_display_hexadecimal:
808
    cmp  [integer],0
808
    cmp  [integer],0
809
    je  null
809
    je  null
Line 810... Line 810...
810
 
810
 
811
    mov  eax,47
811
    mov  eax,47
812
    mov  ebx,2*256+32*65536
812
    mov  ebx,2*256+32 shl 16
813
    mov  ecx,[integer]
813
    mov  ecx,[integer]
814
    mov  edx,32*65536+22
814
    mov  edx,32 shl 16+22
815
    mov  esi,0x0
815
    mov  esi,0x0
Line 816... Line 816...
816
    int  0x40
816
    int  0x40
817
 
817
 
Line 818... Line 818...
818
    popa
818
    popa
819
    ret
819
    ret
820
  
820
  
821
  null:
821
  null:
822
    mov  eax,47
822
    mov  eax,47
823
    mov  ebx,1*65536
823
    mov  ebx,1 shl 16
824
    mov  ecx,0
824
    mov  ecx,0
Line 825... Line 825...
825
    mov  edx,214*65536+22
825
    mov  edx,214 shl 16+22
826
    mov  esi,0x0
826
    mov  esi,0x0