Subversion Repositories Kolibri OS

Rev

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

Rev 4740 Rev 4742
Line 38... Line 38...
38
        mcall   , x shl 16 + w,   (y+h) shl 16 + 1,   color   ; bottom
38
        mcall   , x shl 16 + w,   (y+h) shl 16 + 1,   color   ; bottom
39
}
39
}
Line 40... Line 40...
40
 
40
 
41
 
41
 
Line 42... Line 42...
42
START:
42
START:
43
        mcall   40, EVM_REDRAW + EVM_BUTTON + EVM_STACK2
43
        mcall   40, EVM_REDRAW + EVM_BUTTON + EVM_STACK2 + EVM_KEY
44
 
44
 
45
window_redraw:
45
window_redraw:
46
        mcall   12, 1
-
 
Line 47... Line 46...
47
        mcall   0, 100 shl 16 + 600, 100 shl 16 + 240, 0x34E1E1E1, , name       ; draw window
46
        mcall   12, 1
48
        DrawRectangle 0, 25, 400, 180, 0x777777
47
        mcall   0, 100 shl 16 + 600, 100 shl 16 + 240, 0x34E1E1E1, , name       ; draw window
49
        mcall   12, 2
48
        DrawRectangle 0, 25, 400, 180, 0x777777
Line 206... Line 205...
206
 
205
 
207
        add     ebx, 18
206
        add     ebx, 18
208
        mov     edx, str_dumped
207
        mov     edx, str_dumped
Line 209... Line -...
209
        mcall
-
 
210
 
-
 
211
 
208
        mcall
Line -... Line 209...
-
 
209
 
-
 
210
end_of_draw:
212
 
211
 
Line 213... Line 212...
213
end_of_draw:
212
        mcall   12, 2
214
 
213
 
Line 534... Line 533...
534
 
533
 
Line 535... Line 534...
535
mainloop:
534
mainloop:
Line 536... Line 535...
536
 
535
 
537
        mcall   23, 50          ; wait for event with timeout    (0,5 s)
536
        mcall   23, 50          ; wait for event with timeout    (0,5 s)
538
 
537
 
539
        cmp     eax, 1
538
        cmp     eax, EV_REDRAW
-
 
539
        je      window_redraw
-
 
540
        cmp     eax, EV_BUTTON
540
        je      window_redraw
541
        je      button
541
        cmp     eax, 3
542
        cmp     eax, EV_KEY
Line 542... Line 543...
542
        je      button
543
        je      key
Line 557... Line 558...
557
  .interface:
558
  .interface:
558
        shr     eax, 16
559
        shr     eax, 16
559
        mov     [device], al
560
        mov     [device], al
560
        jmp     redraw
561
        jmp     redraw
Line -... Line 562...
-
 
562
 
-
 
563
key:
-
 
564
        mcall   2
-
 
565
        cmp     ah, 9
-
 
566
        je      .tab
-
 
567
        cmp     ah, 183
-
 
568
        je      .pgdown
-
 
569
        cmp     ah, 184
-
 
570
        je      .pgup
-
 
571
        jmp     mainloop
-
 
572
 
-
 
573
  .tab:
-
 
574
        inc     [mode]
-
 
575
        cmp     [mode], 106
-
 
576
        jbe     redraw
-
 
577
        mov     [mode], 101
-
 
578
        jmp     redraw
-
 
579
 
-
 
580
  .pgdown:
-
 
581
        inc     [device]
-
 
582
        mov     al, [device]
-
 
583
        cmp     al, [last_device]
-
 
584
        jbe     redraw
-
 
585
        mov     [device], 0
-
 
586
        jmp     redraw
-
 
587
 
-
 
588
  .pgup:
-
 
589
        dec     [device]
-
 
590
        cmp     [device], 0
-
 
591
        jge     redraw
-
 
592
        mov     al, [last_device]
-
 
593
        mov     [device], al
-
 
594
        jmp     redraw
561
 
595
 
562
exit:
596
exit:
Line 632... Line 666...
632
        mov     [.btnpos], 5 shl 16 + 20
666
        mov     [.btnpos], 5 shl 16 + 20
633
        mov     [.txtpos], 455 shl 16 + 12
667
        mov     [.txtpos], 455 shl 16 + 12
Line 634... Line 668...
634
 
668
 
635
        mcall   74, -1          ; get number of active network devices
669
        mcall   74, -1          ; get number of active network devices
-
 
670
        mov     ecx, eax
-
 
671
        dec     al
Line 636... Line 672...
636
        mov     ecx, eax
672
        mov     [last_device], al
637
 
673
 
638
        xor     ebx, ebx        ; get device type
674
        xor     ebx, ebx        ; get device type
639
  .loop:
675
  .loop:
Line 679... Line 715...
679
  .txtpos       dd ?
715
  .txtpos       dd ?
Line 680... Line 716...
680
 
716
 
Line 681... Line 717...
681
 
717
 
682
; DATA AREA
718
; DATA AREA
683
 
719
 
-
 
720
name            db 'Network status', 0
684
name            db 'Netstat', 0
721
mode            db 101
685
mode            db 101
722
device          db 0
686
device          db 0
723
last_device     db 0
Line 687... Line 724...
687
device_type     dd 0
724
device_type     dd 0
Line 709... Line 746...
709
 
746
 
710
namebuf         rb 64
747
namebuf         rb 64
Line 711... Line 748...
711
arp_buf         ARP_entry
748
arp_buf         ARP_entry
712
 
-
 
713
I_END:
-