Subversion Repositories Kolibri OS

Rev

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

Rev 109 Rev 485
Line 21... Line 21...
21
DEBUGGING_ENABLED           equ     1
21
DEBUGGING_ENABLED           equ     1
22
DEBUGGING_DISABLED          equ     0
22
DEBUGGING_DISABLED          equ     0
23
DEBUGGING_STATE             equ     DEBUGGING_DISABLED
23
DEBUGGING_STATE             equ     DEBUGGING_DISABLED
Line 24... Line 24...
24
 
24
 
25
use32
-
 
26
 
25
use32
27
                org     0x0
-
 
28
 
26
 org	0x0
29
                db      'MENUET00'              ; 8 byte id
27
 db	'MENUET01'    ; header
30
                dd      38                      ; required os
28
 dd	0x01	      ; header version
31
                dd      START                   ; program start
29
 dd	START	      ; entry point
32
                dd      I_END                   ; program image size
30
 dd	I_END	      ; image size
-
 
31
 dd	0x100000      ; required memory
33
                dd      0x100000                ; required amount of memory
32
 dd	0x100000      ; esp
Line 34... Line 33...
34
                dd      0x00000000              ; reserved=no extended header
33
 dd	0x0 , 0x0     ; I_Param , I_Path
35
 
34
 
36
include 'lang.inc'
35
include 'lang.inc'
Line 37... Line 36...
37
include 'macros.inc'
36
include '..\..\..\macros.inc'
Line 38... Line 37...
38
;include "DEBUG.INC"
37
;include "DEBUG.INC"
Line 48... Line 47...
48
 
47
 
Line 49... Line 48...
49
;dps <"Program started",13,10>
48
;dps <"Program started",13,10>
50
 
49
 
51
    mov     eax,40                          ; Report events
50
    mov     eax,40                          ; Report events
Line -... Line 51...
-
 
51
    mov     ebx,10000111b                   ; Stack 8 + defaults
52
    mov     ebx,10000111b                   ; Stack 8 + defaults
52
    mcall
Line 53... Line 53...
53
    int     0x40
53
 
54
 
54
red:                    ; redraw
55
    call    draw_window
55
    call    draw_window
56
 
56
 
Line 57... Line 57...
57
still:
57
still:
58
    mov     eax,23                 ; wait here for event
58
    mov     eax,23                 ; wait here for event
59
    mov     ebx,1
59
    mov     ebx,1
60
    int     0x40
60
    mcall
Line 73... Line 73...
73
    mov     [prev_status],eax
73
    mov     [prev_status],eax
Line 74... Line 74...
74
 
74
 
75
    mov     eax,53
75
    mov     eax,53
76
    mov     ebx,6
76
    mov     ebx,6
77
    mov     ecx,[socket]
77
    mov     ecx,[socket]
Line 78... Line 78...
78
    int     0x40
78
    mcall
Line 79... Line 79...
79
 
79
 
80
    mov     [status],eax
80
    mov     [status],eax
Line 100... Line 100...
100
    call    read_incoming_data
100
    call    read_incoming_data
Line 101... Line 101...
101
 
101
 
102
    mov     eax,53
102
    mov     eax,53
103
    mov     ebx,8
103
    mov     ebx,8
104
    mov     ecx,[socket]
104
    mov     ecx,[socket]
Line 105... Line 105...
105
    int     0x40
105
    mcall
Line 106... Line 106...
106
 
106
 
Line 107... Line 107...
107
    call    draw_page
107
    call    draw_page
108
 
108
 
Line 109... Line -...
109
    mov     [onoff],0
-
 
110
 
-
 
111
no_close:
-
 
112
    jmp     still
-
 
113
 
109
    mov     [onoff],0
114
red:                    ; redraw
110
 
115
    call    draw_window
111
no_close:
116
    jmp     still
112
    jmp     still
117
 
113
 
118
key:                    ; key
114
key:                    ; key
119
    mov     eax,2       ; just read it and ignore
115
    mov     eax,2       ; just read it and ignore
120
    int     0x40
116
    mcall
Line 136... Line 132...
136
    jmp     still
132
    jmp     still
Line 137... Line 133...
137
 
133
 
138
button:                 ; button
134
button:                 ; button
139
;dps <"Button pressed",13,10>
135
;dps <"Button pressed",13,10>
140
    mov     eax,17      ; get id
136
    mov     eax,17      ; get id
141
    int     0x40
137
    mcall
142
    cmp     ah,1                   ; button id=1 ?
138
    cmp     ah,1                   ; button id=1 ?
Line 143... Line 139...
143
    jne     noclose
139
    jne     noclose
Line 144... Line 140...
144
 
140
 
145
;dps "Closing socket before exit... "
141
;dps "Closing socket before exit... "
146
 
142
 
147
    mov     eax, 53
143
    mov     eax, 53
Line 148... Line 144...
148
    mov     ebx, 8
144
    mov     ebx, 8
149
    mov     ecx, [socket]
145
    mov     ecx, [socket]
Line 150... Line 146...
150
    int     0x40
146
    mcall
151
 
147
 
152
;dpd eax
148
;dpd eax
Line 153... Line 149...
153
;dps <13,10>
149
;dps <13,10>
154
 
150
 
155
exit:
151
exit:
156
    or      eax,-1                 ; close this program
152
    or      eax,-1                 ; close this program
Line 187... Line 183...
187
 
183
 
Line 188... Line 184...
188
    mov     edi,[addr]
184
    mov     edi,[addr]
189
 
185
 
190
f11:
186
f11:
191
    mov     eax,10
187
    mov     eax,10
192
    int     0x40
188
    mcall
193
    cmp     eax,2 ; key?
189
    cmp     eax,2 ; key?
Line 194... Line 190...
194
    jz      fbu
190
    jz      fbu
195
    jmp     still
191
    jmp     still
196
 
192
 
197
fbu:
193
fbu:
198
    mov     eax,2
194
    mov     eax,2
199
    int     0x40  ; get key
195
    mcall  ; get key
200
    shr     eax,8
196
    shr     eax,8
201
    cmp     eax,8
197
    cmp     eax,8
Line 256... Line 252...
256
    mov     eax,53     ; 'GET '
252
    mov     eax,53     ; 'GET '
257
    mov     ebx,7
253
    mov     ebx,7
258
    mov     ecx,[socket]
254
    mov     ecx,[socket]
259
    mov     edx,4
255
    mov     edx,4
260
    mov     esi,string0
256
    mov     esi,string0
261
    int     0x40
257
    mcall
Line 262... Line 258...
262
 
258
 
Line 263... Line 259...
263
    mov     edx,0
259
    mov     edx,0
264
 
260
 
Line 270... Line 266...
270
 
266
 
271
    mov     eax,53     ; document_user
267
    mov     eax,53     ; document_user
272
    mov     ebx,7
268
    mov     ebx,7
273
    mov     ecx,[socket]
269
    mov     ecx,[socket]
274
    mov     esi,document
270
    mov     esi,document
Line 275... Line 271...
275
    int     0x40
271
    mcall
276
 
272
 
277
    mov     eax,53     ; ' HTTP/1.0 .. '
273
    mov     eax,53     ; ' HTTP/1.0 .. '
278
    mov     ebx,7
274
    mov     ebx,7
279
    mov     ecx,[socket]
275
    mov     ecx,[socket]
280
    mov     edx,stringh_end-stringh
276
    mov     edx,stringh_end-stringh
Line 281... Line 277...
281
    mov     esi,stringh
277
    mov     esi,stringh
282
    int     0x40
278
    mcall
Line 296... Line 292...
296
print_status:
292
print_status:
297
    pusha
293
    pusha
Line 298... Line 294...
298
 
294
 
299
    mov     eax,26
295
    mov     eax,26
300
    mov     ebx,9
296
    mov     ebx,9
Line 301... Line 297...
301
    int     0x40
297
    mcall
302
 
298
 
Line 303... Line 299...
303
    cmp     eax,[nextupdate]
299
    cmp     eax,[nextupdate]
Line 311... Line 307...
311
    mov     ebx,5*65536+100
307
    mov     ebx,5*65536+100
312
    mov     ecx,[winys]
308
    mov     ecx,[winys]
313
    shl     ecx,16
309
    shl     ecx,16
314
    add     ecx,-18*65536+10
310
    add     ecx,-18*65536+10
315
    mov     edx,0xffffff
311
    mov     edx,0xffffff
316
    int     0x40
312
    mcall
Line 317... Line 313...
317
 
313
 
318
    mov     eax,47
314
    mov     eax,47
319
    mov     ebx,3*65536
315
    mov     ebx,3*65536
320
    mov     ecx,[status]
316
    mov     ecx,[status]
321
    mov     edx,12*65536-18
317
    mov     edx,12*65536-18
322
    add     edx,[winys]
318
    add     edx,[winys]
323
    mov     esi,0x000000
319
    mov     esi,0x000000
Line 324... Line 320...
324
    int     0x40
320
    mcall
325
 
321
 
326
    mov     eax,47
322
    mov     eax,47
327
    mov     ebx,6*65536
323
    mov     ebx,6*65536
328
    mov     ecx,[pos]
324
    mov     ecx,[pos]
329
    mov     edx,40*65536-18
325
    mov     edx,40*65536-18
330
    add     edx,[winys]
326
    add     edx,[winys]
Line 331... Line 327...
331
    mov     esi,0x000000
327
    mov     esi,0x000000
332
    int     0x40
328
    mcall
333
 
329
 
Line 354... Line 350...
354
 
350
 
355
newbyteread:
351
newbyteread:
356
    mov     eax, 53
352
    mov     eax, 53
357
    mov     ebx, 2
353
    mov     ebx, 2
358
    mov     ecx, [socket]
354
    mov     ecx, [socket]
Line 359... Line 355...
359
    int     0x40
355
    mcall
360
 
356
 
Line 361... Line 357...
361
    cmp     eax,0
357
    cmp     eax,0
362
    je      no_more_data
358
    je      no_more_data
363
 
359
 
364
read_more:
360
read_more:
365
    mov     eax, 53
361
    mov     eax, 53
Line 366... Line 362...
366
    mov     ebx, 3
362
    mov     ebx, 3
367
    mov     ecx, [socket]
363
    mov     ecx, [socket]
368
    int     0x40
364
    mcall
369
 
365
 
Line 377... Line 373...
377
    cmp     eax,0
373
    cmp     eax,0
378
    jne     read_more
374
    jne     read_more
Line 379... Line 375...
379
 
375
 
380
    mov     eax,5
376
    mov     eax,5
381
    mov     ebx,50
377
    mov     ebx,50
Line 382... Line 378...
382
    int     0x40
378
    mcall
Line 383... Line 379...
383
 
379
 
384
    jmp     newbyteread
380
    jmp     newbyteread
Line 673... Line 669...
673
    imul    ecx,10
669
    imul    ecx,10
674
    add     ecx,[dpy]
670
    add     ecx,[dpy]
675
    shl     ecx,16
671
    shl     ecx,16
676
    add     ecx,10
672
    add     ecx,10
677
    mov     edx,0xffffff
673
    mov     edx,0xffffff
678
    int     0x40
674
    mcall
Line 679... Line 675...
679
 
675
 
680
    mov     eax,4
676
    mov     eax,4
681
    mov     ebx,[esp+4]
677
    mov     ebx,[esp+4]
682
    imul    ebx,6
678
    imul    ebx,6
Line 713... Line 709...
713
    mov     ecx,0x0000ff
709
    mov     ecx,0x0000ff
Line 714... Line 710...
714
 
710
 
715
noecx128:
711
noecx128:
Line 716... Line 712...
716
    mov     esi,1
712
    mov     esi,1
Line 717... Line 713...
717
 
713
 
718
    int     0x40
714
    mcall
Line 719... Line 715...
719
 
715
 
Line 761... Line 757...
761
getlp1:
757
getlp1:
762
        inc         ecx
758
        inc         ecx
763
        push    ecx
759
        push    ecx
764
        mov         eax, 53
760
        mov         eax, 53
765
        mov         ebx, 9
761
        mov         ebx, 9
766
        int     0x40
762
        mcall
767
        pop         ecx
763
        pop         ecx
768
        cmp         eax, 0                      ; is this local port in use?
764
        cmp         eax, 0                      ; is this local port in use?
769
        jz              getlp1              ; yes - so try next
765
        jz              getlp1              ; yes - so try next
Line 770... Line 766...
770
 
766
 
771
    mov     eax,53
767
    mov     eax,53
772
    mov     ebx,5
768
    mov     ebx,5
773
    mov     edx,80
769
    mov     edx,80
774
    mov     esi,dword [server_ip]
770
    mov     esi,dword [server_ip]
775
    mov     edi,1
771
    mov     edi,1
776
    int     0x40
772
    mcall
Line 777... Line 773...
777
    mov     [socket], eax
773
    mov     [socket], eax
778
 
774
 
779
    mov     [pos],0
775
    mov     [pos],0
Line 789... Line 785...
789
    jnz     no_24
785
    jnz     no_24
Line 790... Line 786...
790
 
786
 
791
    mov     eax,53
787
    mov     eax,53
792
    mov     ebx,8
788
    mov     ebx,8
793
    mov     ecx,[socket]
789
    mov     ecx,[socket]
Line 794... Line 790...
794
    int     0x40
790
    mcall
Line 795... Line 791...
795
 
791
 
Line 1066... Line 1062...
1066
getlp:
1062
getlp:
1067
        inc         ecx
1063
        inc         ecx
1068
        push    ecx
1064
        push    ecx
1069
        mov         eax, 53
1065
        mov         eax, 53
1070
        mov         ebx, 9
1066
        mov         ebx, 9
1071
        int     0x40
1067
        mcall
1072
        pop         ecx
1068
        pop         ecx
1073
        cmp         eax, 0                      ; is this local port in use?
1069
        cmp         eax, 0                      ; is this local port in use?
1074
        jz              getlp               ; yes - so try next
1070
        jz              getlp               ; yes - so try next
Line 1075... Line 1071...
1075
 
1071
 
1076
    ; First, open socket
1072
    ; First, open socket
1077
    mov     eax, 53
1073
    mov     eax, 53
1078
    mov     ebx, 0
1074
    mov     ebx, 0
1079
    mov     edx, 53    ; remote port - dns
1075
    mov     edx, 53    ; remote port - dns
1080
    mov     esi, dword [dns_ip]
1076
    mov     esi, dword [dns_ip]
Line 1081... Line 1077...
1081
    int     0x40
1077
    mcall
Line 1082... Line 1078...
1082
 
1078
 
1083
    mov     [socketNum], eax
1079
    mov     [socketNum], eax
1084
 
1080
 
1085
    ; write to socket ( request DNS lookup )
1081
    ; write to socket ( request DNS lookup )
1086
    mov     eax, 53
1082
    mov     eax, 53
1087
    mov     ebx, 4
1083
    mov     ebx, 4
1088
    mov     ecx, [socketNum]
1084
    mov     ecx, [socketNum]
Line 1089... Line 1085...
1089
    mov     edx, [dnsMsgLen]
1085
    mov     edx, [dnsMsgLen]
Line 1090... Line 1086...
1090
    mov     esi, dnsMsg
1086
    mov     esi, dnsMsg
1091
    int     0x40
1087
    mcall
Line 1100... Line 1096...
1100
    ; UI close
1096
    ; UI close
1101
    ; or data from remote
1097
    ; or data from remote
Line 1102... Line 1098...
1102
 
1098
 
1103
ctr001:
1099
ctr001:
1104
    mov     eax,10                 ; wait here for event
1100
    mov     eax,10                 ; wait here for event
Line 1105... Line 1101...
1105
    int     0x40
1101
    mcall
1106
 
1102
 
1107
    cmp     eax,1                  ; redraw request ?
1103
    cmp     eax,1                  ; redraw request ?
1108
    je      ctr003
1104
    je      ctr003
Line 1114... Line 1110...
1114
 
1110
 
1115
    ; Any data in the UDP receive buffer?
1111
    ; Any data in the UDP receive buffer?
1116
    mov     eax, 53
1112
    mov     eax, 53
1117
    mov     ebx, 2
1113
    mov     ebx, 2
1118
    mov     ecx, [socketNum]
1114
    mov     ecx, [socketNum]
Line 1119... Line 1115...
1119
    int     0x40
1115
    mcall
1120
 
1116
 
Line 1121... Line 1117...
1121
    cmp     eax, 0
1117
    cmp     eax, 0
1122
    je      ctr001
1118
    je      ctr001
1123
 
1119
 
1124
    ; we have data - this will be the response
1120
    ; we have data - this will be the response
1125
ctr002:
1121
ctr002:
1126
    mov     eax, 53
1122
    mov     eax, 53
Line 1127... Line 1123...
1127
    mov     ebx, 3
1123
    mov     ebx, 3
1128
    mov     ecx, [socketNum]
1124
    mov     ecx, [socketNum]
1129
    int     0x40                ; read byte - block (high byte)
1125
    mcall                ; read byte - block (high byte)
1130
 
1126
 
Line 1131... Line 1127...
1131
    ; Store the data in the response buffer
1127
    ; Store the data in the response buffer
1132
    mov     eax, [dnsMsgLen]
1128
    mov     eax, [dnsMsgLen]
1133
    mov     [eax], bl
1129
    mov     [eax], bl
1134
    inc     dword [dnsMsgLen]
1130
    inc     dword [dnsMsgLen]
Line 1135... Line 1131...
1135
 
1131
 
1136
    mov     eax, 53
1132
    mov     eax, 53
Line 1137... Line 1133...
1137
    mov     ebx, 2
1133
    mov     ebx, 2
1138
    mov     ecx, [socketNum]
1134
    mov     ecx, [socketNum]
1139
    int     0x40                ; any more data?
1135
    mcall                ; any more data?
1140
 
1136
 
1141
    cmp     eax, 0
1137
    cmp     eax, 0
Line 1142... Line 1138...
1142
    jne     ctr002              ; yes, so get it
1138
    jne     ctr002              ; yes, so get it
Line 1143... Line 1139...
1143
 
1139
 
1144
    ; close socket
1140
    ; close socket
Line 1237... Line 1233...
1237
    call    draw_window
1233
    call    draw_window
1238
    jmp     ctr001
1234
    jmp     ctr001
Line 1239... Line 1235...
1239
 
1235
 
1240
ctr004:                         ; key
1236
ctr004:                         ; key
1241
    mov     eax,2               ; just read it and ignore
1237
    mov     eax,2               ; just read it and ignore
1242
    int     0x40
1238
    mcall
Line 1243... Line 1239...
1243
    jmp     ctr001
1239
    jmp     ctr001
1244
 
1240
 
1245
ctr005:                         ; button
1241
ctr005:                         ; button
Line 1246... Line 1242...
1246
    mov     eax,17              ; get id
1242
    mov     eax,17              ; get id
Line 1247... Line 1243...
1247
    int     0x40
1243
    mcall
1248
 
1244
 
1249
    mov     dl, ah
1245
    mov     dl, ah
1250
 
1246
 
1251
    ; close socket
1247
    ; close socket
Line 1252... Line 1248...
1252
    mov     eax, 53
1248
    mov     eax, 53
1253
    mov     ebx, 1
1249
    mov     ebx, 1
Line 1254... Line 1250...
1254
    mov     ecx, [socketNum]
1250
    mov     ecx, [socketNum]
Line 1314... Line 1310...
1314
debug_print_string:
1310
debug_print_string:
1315
    push    esi
1311
    push    esi
1316
    mov     cl, '"'
1312
    mov     cl, '"'
1317
    mov     eax,63
1313
    mov     eax,63
1318
    mov     ebx, 1
1314
    mov     ebx, 1
1319
    int     0x40
1315
    mcall
1320
    pop     esi
1316
    pop     esi
Line 1321... Line 1317...
1321
 
1317
 
1322
dps_000:
1318
dps_000:
1323
    mov     cl, [esi]
1319
    mov     cl, [esi]
Line 1329... Line 1325...
1329
 
1325
 
1330
dps_exit:
1326
dps_exit:
1331
    mov     cl, '"'
1327
    mov     cl, '"'
1332
    mov     eax,63
1328
    mov     eax,63
1333
    mov     ebx, 1
1329
    mov     ebx, 1
1334
    int     0x40
1330
    mcall
1335
    mov     cl, 13
1331
    mov     cl, 13
1336
    mov     eax,63
1332
    mov     eax,63
1337
    mov     ebx, 1
1333
    mov     ebx, 1
1338
    int     0x40
1334
    mcall
1339
    mov     cl, 10
1335
    mov     cl, 10
1340
    mov     eax,63
1336
    mov     eax,63
1341
    mov     ebx, 1
1337
    mov     ebx, 1
1342
    int     0x40
1338
    mcall
Line 1343... Line 1339...
1343
    ret
1339
    ret
1344
 
1340
 
1345
dps_001:
1341
dps_001:
1346
    mov     eax,63
1342
    mov     eax,63
1347
    mov     ebx, 1
1343
    mov     ebx, 1
Line 1348... Line 1344...
1348
    push    esi
1344
    push    esi
1349
    int     0x40
1345
    mcall
1350
 
1346
 
1351
    pop     esi
1347
    pop     esi
Line 1368... Line 1364...
1368
    mov     ebx,30*65536+URLMAXLEN*6  ; 50 should really be [len], and 103 [xa]
1364
    mov     ebx,30*65536+URLMAXLEN*6  ; 50 should really be [len], and 103 [xa]
1369
    mov     ecx,[ya]
1365
    mov     ecx,[ya]
1370
    shl     ecx,16
1366
    shl     ecx,16
1371
    mov     cx,9
1367
    mov     cx,9
1372
    mov     edx,0xFFFFFF
1368
    mov     edx,0xFFFFFF
1373
    int     0x40
1369
    mcall
Line 1374... Line 1370...
1374
 
1370
 
1375
    ; write text
1371
    ; write text
1376
    mov     eax,4
1372
    mov     eax,4
1377
    mov     ebx,30*65536
1373
    mov     ebx,30*65536
1378
    add     ebx,[ya]
1374
    add     ebx,[ya]
1379
    mov     ecx,0x000000
1375
    mov     ecx,0x000000
1380
    mov     edx,[addr]
1376
    mov     edx,[addr]
1381
    mov     esi,URLMAXLEN
1377
    mov     esi,URLMAXLEN
Line 1382... Line 1378...
1382
    int     0x40
1378
    mcall
Line 1383... Line 1379...
1383
 
1379
 
1384
    ret
1380
    ret
1385
 
1381
 
Line 1386... Line 1382...
1386
;   *********************************************
1382
;   *********************************************
1387
;   *******  WINDOW DEFINITIONS AND DRAW ********
1383
;   *******  WINDOW DEFINITIONS AND DRAW ********
1388
;   *********************************************
1384
;   *********************************************
1389
 
1385
 
Line 1390... Line 1386...
1390
draw_window:
1386
draw_window:
1391
    mov     eax,12                    ; function 12:tell os about windowdraw
1387
    mov     eax,12                    ; function 12:tell os about windowdraw
1392
    mov     ebx,1                     ; 1, start of draw
1388
    mov     ebx,1                     ; 1, start of draw
1393
    int     0x40
1389
    mcall
1394
 
1390
 
1395
                                   ; DRAW WINDOW
-
 
1396
    mov     eax,0                     ; function 0 : define and draw window
-
 
1397
    mov     ebx,50*65536+550          ; [x start] *65536 + [x size]
-
 
1398
    mov     ecx,50*65536+400          ; [y start] *65536 + [y size]
-
 
1399
    mov     edx,0x03ffffff            ; color of work area RRGGBB,8->color gl
1391
                                   ; DRAW WINDOW
1400
    mov     esi,0x805080d0            ; color of grab bar  RRGGBB,8->color gl
-
 
1401
    mov     edi,0x005080d0            ; color of frames    RRGGBB
-
 
1402
    int     0x40
-
 
1403
 
-
 
1404
                                   ; WINDOW LABEL
-
 
1405
    mov     eax,4                     ; function 4 : write text to window
1392
    mov     eax,0                     ; function 0 : define and draw window
Line 1406... Line 1393...
1406
    mov     ebx,8*65536+8             ; [x start] *65536 + [y start]
1393
    mov     ebx,50*65536+550          ; [x start] *65536 + [x size]
1407
    mov     ecx,0x00ddeeff            ; color of text RRGGBB
1394
    mov     ecx,50*65536+400          ; [y start] *65536 + [y size]
1408
    mov     edx,labelt                ; pointer to text beginning
1395
    mov     edx,0x13ffffff            ; color of work area RRGGBB,8->color gl
1409
    mov     esi,labellen-labelt       ; text length
1396
    mov     edi,title                 ; WINDOW LABEL
1410
    int     0x40
1397
    mcall
1411
 
1398
 
Line 1412... Line 1399...
1412
 
1399
                                   
1413
    mov     esi, URLMAXLEN            ; URL
1400
    mov     esi, URLMAXLEN            ; URL
1414
    mov     eax,4                     ; function 4 : write text to window
1401
    mov     eax,4                     ; function 4 : write text to window
1415
    mov     ebx,30*65536+38           ; [x start] *65536 + [y start]
1402
    mov     ebx,30*65536+38           ; [x start] *65536 + [y start]
1416
    mov     ecx,0x000000              ; color of text RRGGBB
1403
    mov     ecx,0x000000              ; color of text RRGGBB
Line 1417... Line 1404...
1417
    mov     edx,document_user         ; pointer to text beginning
1404
    mov     edx,document_user         ; pointer to text beginning
1418
    int     0x40
1405
    mcall
1419
 
1406
 
1420
    mov     eax,38
1407
    mov     eax,38
1421
    mov     ebx,5*65536+545
1408
    mov     ebx,5*65536+545
1422
    mov     ecx,60*65536+60
1409
    mov     ecx,60*65536+60
1423
    mov     edx,0x000000
1410
    mov     edx,0x000000
1424
    int     0x40
1411
    mcall
1425
 
1412
 
1426
    mov     eax,38
1413
    ;mov     eax,38
1427
    mov     ebx,5*65536+545
1414
    ;mov     ebx,5*65536+545
1428
    mov     ecx,[winys]
1415
    mov     ecx,[winys]
1429
    shl     ecx,16
1416
    shl     ecx,16
1430
    add     ecx,[winys]
1417
    add     ecx,[winys]
1431
    sub     ecx,26*65536+26
1418
    sub     ecx,26*65536+26
Line 1432... Line 1419...
1432
    mov     edx,0x000000
1419
    ;mov     edx,0x000000
1433
    int     0x40
1420
    mcall
1434
                                   ; RELOAD
1421
                                   ; RELOAD
1435
    mov     eax,8                     ; function 8 : define and draw button
1422
    mov     eax,8                     ; function 8 : define and draw button
1436
    mov     ebx,388*65536+50          ; [x start] *65536 + [x size]
1423
    mov     ebx,388*65536+50          ; [x start] *65536 + [x size]
1437
    mov     ecx,34*65536+14           ; [y start] *65536 + [y size]
1424
    mov     ecx,34*65536+14           ; [y start] *65536 + [y size]
1438
    mov     edx,22                    ; button id
1425
    mov     edx,22                    ; button id
Line 1439... Line 1426...
1439
    mov     esi,0x5588dd              ; button color RRGGBB
1426
    mov     esi,0x5588dd              ; button color RRGGBB
1440
    int     0x40
1427
    mcall
1441
 
1428
 
1442
                                   ; URL
1429
                                   ; URL
1443
    mov     eax,8                     ; function 8 : define and draw button
1430
    ;mov     eax,8                     ; function 8 : define and draw button
1444
    mov     ebx,10*65536+12          ; [x start] *65536 + [x size]
1431
    mov     ebx,10*65536+12          ; [x start] *65536 + [x size]
1445
    mov     ecx,34*65536+12           ; [y start] *65536 + [y size]
1432
    mov     ecx,34*65536+12           ; [y start] *65536 + [y size]
Line 1446... Line 1433...
1446
    mov     edx,10                    ; button id
1433
    mov     edx,10                    ; button id
1447
    mov     esi,0x5588dd              ; button color RRGGBB
1434
    ;mov     esi,0x5588dd              ; button color RRGGBB
1448
    int     0x40
1435
    mcall
1449
 
1436
 
1450
                                   ; STOP
1437
                                   ; STOP
1451
    mov     eax,8                     ; function 8 : define and draw button
1438
    ;mov     eax,8                     ; function 8 : define and draw button
1452
    mov     ebx,443*65536+50          ; [x start] *65536 + [x size]
1439
    mov     ebx,443*65536+50          ; [x start] *65536 + [x size]
Line 1453... Line 1440...
1453
    mov     ecx,34*65536+14           ; [y start] *65536 + [y size]
1440
    mov     ecx,34*65536+14           ; [y start] *65536 + [y size]
Line 1454... Line 1441...
1454
    mov     edx,24                    ; button id
1441
    mov     edx,24                    ; button id
1455
    mov     esi,0x5588dd              ; button color RRGGBB
1442
    ;mov     esi,0x5588dd              ; button color RRGGBB
1456
    int     0x40
1443
    mcall
Line 1457... Line 1444...
1457
 
1444
 
Line 1458... Line 1445...
1458
                                   ; BUTTON TEXT
1445
                                   ; BUTTON TEXT
Line 1497... Line 1484...
1497
 
1484
 
1498
addr            dd  0x0
1485
addr            dd  0x0
1499
ya              dd  0x0
1486
ya              dd  0x0
Line 1500... Line 1487...
1500
len             dd  0x00
1487
len             dd  0x00
1501
 
-
 
Line 1502... Line 1488...
1502
labelt:         db      'HTTPC - PgUp/PgDown'
1488
 
1503
labellen:
1489
title         db      'HTTPC - PgUp/PgDown',0
1504
 
1490
 
1505
server_ip:      db      207,44,212,20
1491
server_ip:      db      207,44,212,20