Subversion Repositories Kolibri OS

Rev

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

Rev 1206 Rev 1528
Line 9... Line 9...
9
    org     0x0
9
    org     0x0
Line 10... Line 10...
10
 
10
 
11
    db	   'MENUET01'	     ; 8 byte id
11
    db	   'MENUET01'	     ; 8 byte id
12
    dd	   0x01 	     ; header version
12
    dd	   0x01 	     ; header version
13
    dd	   START	     ; start of code
13
    dd	   START	     ; start of code
14
    dd	   IM_END	     ; size of image
14
    dd	   I_END	     ; size of image
15
    dd	   (I_END+0x100)     ; memory for app
15
    dd	   (I_END+0x100)     ; memory for app
16
    dd	   (I_END+0x100)     ; esp
16
    dd	   (I_END+0x100)     ; esp
Line 17... Line 17...
17
    dd	   I_PARAM , 0x0     ; I_Param , I_Icon
17
    dd	   I_PARAM , 0x0     ; I_Param , I_Icon
Line 23... Line 23...
23
include '..\debug-fdo.inc'
23
include '..\debug-fdo.inc'
Line 24... Line 24...
24
 
24
 
25
START:				       ; start of execution
25
START:				       ; start of execution
Line 26... Line 26...
26
    ; TODO: check Parameters
26
    ; TODO: check Parameters
27
 
-
 
Line 28... Line 27...
28
    DEBUGF 1, 'Hello!\n'
27
 
29
 
-
 
30
 
28
    DEBUGF  1, 'Netstat application loaded!\n'
Line 31... Line 29...
31
  redraw:
29
 
Line 32... Line 30...
32
 
30
  redraw:
Line 40... Line 38...
40
 
38
 
41
    cmp     dl, [mode]
39
    cmp     dl, [mode]
42
    cmove   esi, edi
40
    cmove   esi, edi
Line 43... Line 41...
43
    mcall   8, 25 shl 16 + 65, 25 shl 16 + 20
41
    mcall   8, 25 shl 16 + 65, 25 shl 16 + 20
44
 
42
 
45
   @@:
43
  .morebuttons:
46
    inc     edx
44
    inc     edx
Line 47... Line 45...
47
    add     ebx, 75 shl 16
45
    add     ebx, 75 shl 16
48
    mov     esi, 0x00aaaaff
46
    mov     esi, 0x00aaaaff
49
 
47
 
Line 50... Line 48...
50
    cmp     dl, [mode]
48
    cmp     dl, [mode]
51
    cmove   esi, edi
49
    cmove   esi, edi
Line 52... Line 50...
52
    mcall
50
    mcall
Line 53... Line 51...
53
 
51
 
54
    cmp     edx, 105
52
    cmp     edx, 105
Line 55... Line 53...
55
    jle     @r
53
    jle     .morebuttons
56
 
54
 
57
    mcall   4, 28 shl 16 + 31, 0x80000000, modes
55
    mcall   4, 28 shl 16 + 31, 0x80000000, modes
58
 
56
 
Line 87... Line 85...
87
 
85
 
88
    mov     edx, 135 shl 16 + 75 + 4*18
86
    mov     edx, 135 shl 16 + 75 + 4*18
89
    call    draw_mac
87
    call    draw_mac
Line 90... Line 88...
90
    jmp     end_of_draw
88
    jmp     end_of_draw
Line 91... Line 89...
91
 
89
 
92
 @@:
90
 .no_eth:
Line 93... Line 91...
93
 
91
 
94
    cmp     [mode], 102
92
    cmp     [mode], 102
95
    jne     @f
93
    jne     .no_ip
96
 
94
 
Line 144... Line 142...
144
    add     edx, 18
142
    add     edx, 18
145
    call    draw_ip
143
    call    draw_ip
Line 146... Line 144...
146
 
144
 
Line 147... Line 145...
147
    jmp     end_of_draw
145
    jmp     end_of_draw
Line 148... Line 146...
148
 
146
 
149
 @@:
147
 .no_ip:
Line 150... Line 148...
150
 
148
 
151
    cmp     [mode], 103
149
    cmp     [mode], 103
152
    jne     @f
150
    jne     .no_arp
153
 
151
 
Line 159... Line 157...
159
    mov     edx, str_arp
157
    mov     edx, str_arp
160
    mcall
158
    mcall
Line 161... Line 159...
161
 
159
 
Line 162... Line 160...
162
    jmp     end_of_draw
160
    jmp     end_of_draw
Line 163... Line 161...
163
 
161
 
164
 @@:
162
 .no_arp:
165
 
163
 
166
    mcall   4, 20 shl 16 + 75, 0x80000000, str_packets_tx
164
    mcall   4, 20 shl 16 + 75, 0x80000000, str_packets_tx
Line 174... Line 172...
174
 
172
 
Line 175... Line 173...
175
    jmp     draw_stats
173
    jmp     draw_stats
Line 176... Line 174...
176
 
174
 
Line 177... Line 175...
177
  mainloop:
175
  mainloop:
178
 
176
 
179
    mcall   23,50		   ; wait for event with timeout    (0,5 s)
177
    mcall   23,500		    ; wait for event with timeout    (0,5 s)
180
 
178
 
Line 459... Line 457...
459
 
457
 
460
	mov	cl, [esp+4+5]
458
	mov	cl, [esp+4+5]
461
	add	edx, 15 shl 16
459
	add	edx, 15 shl 16
Line 462... Line -...
462
	mcall
-
 
463
 
-
 
464
	mov	eax, [esp]
460
	mcall
Line 465... Line 461...
465
	add	esp, 6+4
461
 
Line 466... Line 462...
466
	sub	edx, 5*15 shl 16
462
	sub	edx, 5*15 shl 16
Line 467... Line 463...
467
 
463
 
Line 491... Line 487...
491
	mov	cl, [esp+4+3]
487
	mov	cl, [esp+4+3]
492
	add	edx, 30 shl 16
488
	add	edx, 30 shl 16
493
	mcall
489
	mcall
Line 494... Line 490...
494
 
490
 
495
	sub	edx, 3*30 shl 16
-
 
496
	mov	eax, [esp]
-
 
497
	add	esp, 8
491
	sub	edx, 3*30 shl 16
Line 498... Line 492...
498
	jmp	eax
492
	ret	4
Line 499... Line -...
499
 
-
 
500
 
-
 
501
; DATA AREA
493
 
502
 
494
 
503
IM_END:
495
; DATA AREA
504
 
496