Subversion Repositories Kolibri OS

Rev

Rev 109 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 109 Rev 153
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;                                                      ;
2
;                                                      ;
3
;    Tiny HTTP Server v 0.4 for MenuetOS               ;
3
;    Tiny HTTP Server v 0.5 for KolibriOS              ;
4
;                                                      ;
4
;                                                      ;
5
;    License GPL / See file COPYING for details.       ;
5
;    License GPL / See file COPYING for details.       ;
6
;    Copyright 2003 Ville Turjanmaa                    ;
6
;    Copyright 2003 Ville Turjanmaa                    ;
7
;                                                      ;
7
;                                                      ;
8
;    Compile with FASM for Menuet                      ;
8
;    Compile with FASM for Menuet/KolibriOS            ;
9
;                                                      ;
9
;                                                      ;
10
;    Request /TinyStat for server statistics           ;
10
;    Request /TinyStat for server statistics           ;
11
;    Request /TinyBoard for server message board       ;
11
;    Request /TinyBoard for server message board       ;
12
;                                                      ;
12
;                                                      ;
-
 
13
;    Special version for KoOS by Hex && Heavyiron      ;
-
 
14
;                                                      ;
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
16
 
14
 
17
appname  equ  'Kolibri HTTP Server '
15
version  equ  '0.4'
18
version  equ  '0.6'
16
 
19
 
17
use32
20
use32
18
 
21
 
19
                org     0x0
22
		org	0x0
20
 
23
 
21
                db      'MENUET01'              ; 8 byte id
24
		db	'MENUET01'		; 8 byte id
22
                dd      0x01                    ; required os
25
		dd	0x01			; required os
23
                dd      START                   ; program start
26
		dd	START			; program start
24
                dd      I_END                   ; program image size
27
		dd	I_END			; program image size
25
                dd      0x400000                ; required amount of memory
28
		dd	0x400000		; required amount of memory
26
                dd      0x20000
29
		dd	0x20000
27
                dd      0,0                     ; reserved=no extended header
30
		dd	0,0			; reserved=no extended header
28
 
-
 
29
include 'lang.inc'
31
 
30
include "macros.inc"
32
include "MACROS.INC"
31
 
33
 
32
; 0x0+       - program image
34
; 0x0+       - program image
33
; 0x1ffff    - stack
35
; 0x1ffff    - stack
34
; 0x20000+   - message board
36
; 0x20000+   - message board
35
; 0x100000+  - requested file
37
; 0x100000+  - requested file
36
 
38
 
37
filel:
39
filel:
-
 
40
   dd 0
-
 
41
   dd 0
-
 
42
   dd 0
-
 
43
   dd 50000
38
   dd   0x0,0x0,50000/512,0x20000,0x70000
44
   dd 0x20000
39
   db   '/rd/1/board.htm',0
45
   db	'/rd/1/board.htm',0
40
 
46
 
41
files:
47
files:
-
 
48
    dd 2
-
 
49
    dd 0
-
 
50
    dd 0
-
 
51
    dd 0
42
   dd   0x1,0x0,0x0,0x20000,0x70000
52
    dd 0x20000
43
   db   '/rd/1/board.htm',0
53
    db '/rd/1/board.htm',0
44
 
54
 
45
 
-
 
46
 
55
 
47
START:                          ; start of execution
56
START:				; start of execution
48
 
57
 
49
    mov  eax,58
58
    mov  eax,70
50
    mov  ebx,filel
59
    mov  ebx,filel
51
    int  0x40
60
    int  0x40
52
    mov  [board_size],ebx
61
    mov  [board_size],ebx
53
    cmp  eax,0
62
    cmp  eax,0
54
    je   board_found
63
    je   board_found
55
 
64
 
56
    mov  [board_size],board_end-board
65
    mov  [board_size],board_end-board
57
    mov  esi,board
66
    mov  esi,board
58
    mov  edi,0x20000
67
    mov  edi,0x20000
59
    mov  ecx,[board_size]
68
    mov  ecx,[board_size]
60
    cld
69
    cld
61
    rep  movsb
70
    rep  movsb
62
 
71
 
63
   board_found:
72
   board_found:
64
 
73
 
65
    mov  eax,58
74
    mov  eax,70
66
    mov  ebx,files
75
    mov  ebx,files
67
    mov  ecx,[board_size]
76
    mov  ecx,[board_size]
68
    mov  [files+8],ecx
77
    mov  [files+12],ecx
69
    int  0x40
78
    int  0x40
70
 
79
 
71
    mov  [status],-1
80
    mov  [status],-1
72
    mov  [last_status],-2
81
    mov  [last_status],-2
73
    call clear_input
82
    call clear_input
-
 
83
red:
74
    call draw_window            ; at first, draw the window
84
    call draw_window		; at first, draw the window
75
 
-
 
76
;    call ops
-
 
77
 
85
 
78
still:
86
still:
79
 
87
 
80
    call check_status
88
    call check_status
81
    cmp  [status],4
89
    cmp  [status],4
82
    je   start_transmission
90
    je   start_transmission
83
 
91
 
84
    cmp  [status],0
92
    cmp  [status],0
85
    jne  nnn
93
    jne  nnn
86
    cmp  [server_active],1
94
    cmp  [server_active],1
87
    jne  nnn
95
    jne  nnn
88
    call ops
96
    call ops
89
   nnn:
97
   nnn:
90
 
98
 
91
    mov  eax,5
99
    mov  eax,5
92
    mov  ebx,1
100
    mov  ebx,1
93
    int  0x40
101
    int  0x40
94
 
102
 
95
    mov  eax,11
103
    mov  eax,11
96
    int  0x40
104
    int  0x40
97
    call check_events
105
    call check_events
98
 
106
 
99
    jmp  still
107
    jmp  still
100
 
-
 
101
 
-
 
102
 reb:  ; boot
-
 
103
 
-
 
104
    mov  eax,18
-
 
105
    mov  ebx,1
-
 
106
    int  0x40
-
 
107
 
-
 
108
    jmp  $
-
 
109
 
-
 
110
 
108
 
111
last_status   dd   0x0
109
last_status   dd   0x0
112
 
110
 
113
check_events:
111
check_events:
114
 
112
 
115
    cmp  eax,1                  ; redraw request ?
113
    cmp  eax,1			; redraw request ?
116
    jz   red
114
    jz   red
117
    cmp  eax,2                  ; key in buffer ?
115
    cmp  eax,2			; key in buffer ?
118
    jz   key
116
    jz   key
119
    cmp  eax,3                  ; button in buffer ?
117
    cmp  eax,3			; button in buffer ?
120
    jz   button
118
    jz   button
121
 
119
 
122
    ret
120
    ret
123
 
-
 
124
red:                           ; redraw
-
 
125
    call draw_window
-
 
126
    ret
-
 
127
 
121
 
128
key:                           ; Keys are not valid at this part of the
122
key:			       ; Keys are not valid at this part of the
129
    mov  eax,2                 ; loop. Just read it and ignore
123
    mov  al,2		       ; loop. Just read it and ignore
130
    int  0x40
124
    int  0x40
131
    ret
125
    ret
132
 
126
 
133
button:                         ; button
127
button: 			; button
134
 
128
 
135
    mov  eax,17                 ; get id
129
    mov  al,17 		; get id
136
    int  0x40
130
    int  0x40
137
 
131
 
138
    cmp  ah,1                   ; close
132
    cmp  ah,1		; close
139
    jnz  tst2
133
    jnz  tst2
140
    mov  eax,53
134
    mov  eax,53
141
    mov  ebx,8
135
    mov  ebx,8
142
    mov  ecx,[socket]
136
    mov  ecx,[socket]
143
    int  0x40
137
    int  0x40
144
    mov  eax,-1
138
    mov  eax,-1
145
    int  0x40
139
    int  0x40
146
  tst2:
140
  tst2:
147
 
141
 
148
    cmp  ah,2                   ; button id=2 ?
142
    cmp  ah,2            ; button id=2 ?
149
    jnz  tst3
143
    jnz  tst3
150
    ; open socket
144
    ; open socket
151
  ops:
145
  ops:
152
    mov  eax,53
146
    mov  eax,53
153
    mov  ebx,5
147
    mov  ebx,5
154
    mov  ecx,80     ; local port # - http
148
    mov  ecx,80       ; local port # - http
155
    mov  edx,0      ; no remote port specified
149
    mov  edx,0	    ; no remote port specified
156
    mov  esi,0      ; no remote ip specified
150
    mov  esi,0	    ; no remote ip specified
157
    mov  edi,0      ; PASSIVE open
151
    mov  edi,0	    ; PASSIVE open
158
    int  0x40
152
    int  0x40
159
    mov  [socket], eax
153
    mov  [socket], eax
160
    mov  [posy],1
154
    mov  [posy],1
161
    mov  [posx],0
155
    mov  [posx],0
162
    call check_for_incoming_data
156
    call check_for_incoming_data
163
    call clear_input
157
    call clear_input
164
    call draw_data
158
    call draw_data
165
    mov  [server_active],1
159
    mov  [server_active],1
166
    call check_status
160
    call check_status
167
;    cmp  [status],0
-
 
168
;    je   reb
-
 
169
    ret
161
    ret
170
  tst3:
162
  tst3:
171
 
-
 
172
    cmp  ah,4                   ; button id=4 ?
163
    cmp  ah,4			; button id=4 ?
173
    jnz  no4
164
    jnz  no4
174
    mov  [server_active],0
165
    mov  [server_active],0
175
  close_socket:
166
  close_socket:
176
    mov  eax,53
167
    mov  eax,53
177
    mov  ebx,8
168
    mov  ebx,8
178
    mov  ecx,[socket]
169
    mov  ecx,[socket]
179
    int  0x40
170
    int  0x40
180
    mov  eax,5
171
    mov  eax,5
181
    mov  ebx,2
172
    mov  ebx,2
182
    int  0x40
173
    int  0x40
183
    mov  eax,53
174
    mov  eax,53
184
    mov  ebx,8
175
    mov  ebx,8
185
    mov  ecx,[socket]
176
    mov  ecx,[socket]
186
    int  0x40
177
    int  0x40
187
 
178
 
188
    cmp  [server_active],1
179
    cmp  [server_active],1
189
    jne  no_re_open
180
    jne  no_re_open
190
    mov  eax,53
181
    mov  eax,53
191
    mov  ebx,5
182
    mov  ebx,5
192
    mov  ecx,80     ; local port # - http
183
    mov  ecx,80     ; local port # - http
193
    mov  edx,0      ; no remote port specified
184
    mov  edx,0	    ; no remote port specified
194
    mov  esi,0      ; no remote ip specified
185
    mov  esi,0	    ; no remote ip specified
195
    mov  edi,0      ; PASSIVE open
186
    mov  edi,0	    ; PASSIVE open
196
    int  0x40
187
    int  0x40
197
    mov  [socket], eax
188
    mov  [socket], eax
198
  no_re_open:
189
  no_re_open:
199
 
190
 
200
    mov  edi,input_text+256*15+1
191
    mov  edi,input_text+256*15+1
201
    mov  [edi+2],dword ':  :'
192
    mov  [edi+2],dword ':  :'
202
    call set_time
193
    call set_time
203
    mov  edi,input_text+256*16+1
194
    mov  edi,input_text+256*16+1
204
    mov  [edi+2],dword '.  .'
195
    mov  [edi+2],dword '.  .'
205
    call set_date
196
    call set_date
206
 
197
 
207
    mov  eax,[documents_served]
198
    mov  eax,[documents_served]
208
    mov  ecx,9
199
    mov  ecx,9
209
    mov  edi,input_text+256*15+12
200
    mov  edi,input_text+256*15+12
210
    call set_value
201
    call set_value
211
 
202
 
212
    mov  eax,[bytes_transferred]
203
    mov  eax,[bytes_transferred]
213
    mov  ecx,9
204
    mov  ecx,9
214
    mov  edi,input_text+256*16+12
205
    mov  edi,input_text+256*16+12
215
    call set_value
206
    call set_value
216
 
207
 
217
    call draw_data
208
    call draw_data
218
 
209
 
219
    mov  esp,0x1ffff
210
    mov  esp,0x1ffff
220
    jmp  still
211
    jmp  still
221
  no4:
212
  no4:
222
 
213
 
223
    cmp  ah,6                   ; read directory
214
    cmp  ah,6			; read directory
224
    je   read_string
215
    je	 read_string
225
 
216
 
226
    ret
217
    ret
227
 
218
 
228
 
219
 
229
clear_input:
220
clear_input:
230
 
221
 
231
    mov  edi,input_text
222
    mov  edi,input_text
232
    mov  eax,0
223
    mov  eax,0
233
    mov  ecx,256*30
224
    mov  ecx,256*30
234
    cld
225
    cld
235
    rep  stosb
226
    rep  stosb
236
 
227
 
237
    ret
228
    ret
238
 
229
 
239
 
230
 
240
retries  dd 50
231
retries  dd 50
241
 
232
 
242
start_transmission:
233
start_transmission:
243
 
234
 
244
    mov  [posy],1
235
    mov  [posy],1
245
    mov  [posx],0
236
    mov  [posx],0
246
    call clear_input
237
    call clear_input
247
    mov  [retries],50
238
    mov  [retries],50
248
 
239
 
249
  wait_for_data:
240
  wait_for_data:
250
    call check_for_incoming_data
241
    call check_for_incoming_data
251
    cmp  [input_text+256+1],dword 'GET '
242
    cmp  [input_text+256+1],dword 'GET '
252
    je   data_received
243
    je	 data_received
253
    cmp  [input_text+256+1],dword 'POST'
244
    cmp  [input_text+256+1],dword 'POST'
254
    je   data_received
245
    je	 data_received
255
    mov  eax,5
246
    mov  eax,5
256
    mov  ebx,1
247
    mov  ebx,1
257
    int  0x40
248
    int  0x40
258
    dec  [retries]
249
    dec  [retries]
259
    jnz  wait_for_data
250
    jnz  wait_for_data
260
    jmp  no_http_request
251
    jmp  no_http_request
261
  data_received:
252
  data_received:
262
 
253
 
263
    mov  eax,0x100000
254
    mov  eax,0x100000
264
    mov  ebx,0x2f0000 / 512
255
    mov  ebx,0x2f0000 / 512
265
    call read_file
256
    call read_file
266
 
257
 
267
    call wait_for_empty_slot
258
    call wait_for_empty_slot
268
    call send_header
259
    call send_header
269
 
260
 
270
    mov  [filepos],0x100000
261
    mov  [filepos],0x100000
271
    mov  [fileadd],700
262
    mov  [fileadd],700
272
 
263
 
273
    call check_status
264
    call check_status
274
    call draw_data
265
    call draw_data
275
 
266
 
276
  newblock:
267
  newblock:
277
 
268
 
278
    call wait_for_empty_slot
269
    call wait_for_empty_slot
279
 
270
 
280
    mov  edx,[fileadd]
271
    mov  edx,[fileadd]
281
    cmp  edx,[file_left]
272
    cmp  edx,[file_left]
282
    jbe  file_size_ok
273
    jbe  file_size_ok
283
    mov  edx,[file_left]
274
    mov  edx,[file_left]
284
  file_size_ok:
275
  file_size_ok:
285
    sub  [file_left],edx
276
    sub  [file_left],edx
286
 
277
 
287
    ; write to socket
278
    ; write to socket
288
    mov  eax,53
279
    mov  eax,53
289
    mov  ebx,7
280
    mov  ebx,7
290
    mov  ecx,[socket]
281
    mov  ecx,[socket]
291
    mov  esi,[filepos]
282
    mov  esi,[filepos]
292
    int  0x40
283
    int  0x40
293
 
284
 
294
    mov  eax,esi
285
    mov  eax,esi
295
    add  eax,edx
286
    add  eax,edx
296
    sub  eax,0x100000
287
    sub  eax,0x100000
297
    call display_progress
288
    call display_progress
298
 
289
 
299
    mov  edx,[fileadd]
290
    mov  edx,[fileadd]
300
    add  [filepos],edx
291
    add  [filepos],edx
301
 
292
 
302
    cmp  [file_left],0
293
    cmp  [file_left],0
303
    jg   newblock
294
    jg	 newblock
304
 
295
 
305
  no_http_request:
296
  no_http_request:
306
 
297
 
307
    jmp  close_socket
298
    jmp  close_socket
308
 
299
 
309
 
300
 
310
filepos   dd  0x100000
301
filepos   dd  0x100000
311
fileadd   dd  0x1
302
fileadd   dd  0x1
312
filesize  dd  0x0
303
filesize  dd  0x0
313
file_left dd  0x0
304
file_left dd  0x0
314
 
305
 
315
 
306
 
316
wait_for_empty_slot:
307
wait_for_empty_slot:
317
 
308
 
318
    pusha
309
    pusha
319
 
310
 
320
  wait_more:
311
  wait_more:
321
 
-
 
322
;    rdtsc
-
 
323
;    mov  ecx,eax
-
 
324
;    add  ecx,1000000
-
 
325
;   wr:
-
 
326
;    rdtsc
-
 
327
;    cmp  eax,ecx
-
 
328
;    jb   wr
-
 
329
 
312
 
330
    mov  eax,5
313
    mov  eax,5
331
    mov  ebx,1
314
    mov  ebx,1
332
    int  0x40
315
    int  0x40
333
 
316
 
334
    mov  eax,11
317
    mov  eax,11
335
    int  0x40
318
    int  0x40
336
    call check_events
319
    call check_events
337
 
320
 
338
    mov  eax,53
321
    mov  eax,53
339
    mov  ebx,255
322
    mov  ebx,255
340
    mov  ecx,103
323
    mov  ecx,103
341
    int  0x40
324
    int  0x40
342
 
325
 
343
    cmp  eax,0
326
    cmp  eax,0
344
    je   no_wait_more
327
    je   no_wait_more
345
 
328
 
346
    jmp  wait_more
329
    jmp  wait_more
347
 
330
 
348
  no_wait_more:
331
  no_wait_more:
349
 
332
 
350
    popa
333
    popa
351
    ret
334
    ret
352
 
335
 
353
 
336
 
354
 
337
 
355
 
338
 
356
display_progress:
339
display_progress:
357
 
340
 
358
  pusha
341
  pusha
359
 
342
 
360
  mov  edi,eax
343
  mov  edi,eax
361
 
344
 
362
  mov  eax,13
345
  mov  eax,13
363
  mov  ebx,115*65536+8*6
346
  mov  ebx,115*65536+8*6
364
  mov  ecx,178*65536+10
347
  mov  ecx,178*65536+10
365
  mov  edx,0xffffff
348
  mov  edx,0xffffff
366
  int  0x40
349
  int  0x40
367
 
350
 
368
  mov  eax,47
351
  mov  eax,47
369
  mov  ebx,8*65536
352
  mov  ebx,8*65536
370
  mov  ecx,edi
353
  mov  ecx,edi
371
  mov  edx,115*65536+178
354
  mov  edx,115*65536+178
372
  mov  esi,0x000000
355
  mov  esi,0x000000
373
  int  0x40
356
  int  0x40
374
 
357
 
375
  popa
358
  popa
376
  ret
359
  ret
377
 
360
 
378
 
361
 
379
send_header:
362
send_header:
380
 
363
 
381
    pusha
364
    pusha
382
 
365
 
383
    mov   eax,53                  ; send response and file length
366
    mov   eax,53		  ; send response and file length
384
    mov   ebx,7
367
    mov   ebx,7
385
    mov   ecx,[socket]
368
    mov   ecx,[socket]
386
    mov   edx,h_len-html_header
369
    mov   edx,h_len-html_header
387
    mov   esi,html_header
370
    mov   esi,html_header
388
    int   0x40
371
    int   0x40
389
 
372
 
390
    mov   eax,53                  ; send file type
373
    mov   eax,53		  ; send file type
391
    mov   ebx,7
374
    mov   ebx,7
392
    mov   ecx,[socket]
375
    mov   ecx,[socket]
393
    mov   edx,[type_len]
376
    mov   edx,[type_len]
394
    mov   esi,[file_type]
377
    mov   esi,[file_type]
395
    int   0x40
378
    int   0x40
396
 
379
 
397
    popa
380
    popa
398
    ret
381
    ret
-
 
382
 
-
 
383
fileinfo	dd 0
399
 
384
		dd 0
-
 
385
		dd 0
400
 
386
		dd 512
401
fileinfo     dd  0,0,1,0x100000,0xf0000
387
		dd 0x100000
402
getf         db  '/RD/1/'
388
getf		db '/rd/1/'
403
             times 50 db 0
389
	     times 50 db 0
404
wanted_file: times 100 db 0
390
wanted_file: times 100 db 0
405
 
391
 
406
getflen      dd  6
392
getflen      dd  6
407
 
393
 
408
make_room:
394
make_room:
409
 
395
 
410
   pusha
396
   pusha
411
 
397
 
412
   mov  edx,ecx
398
   mov	edx,ecx
413
 
399
 
414
   mov  esi,0x20000
400
   mov	esi,0x20000
415
   add  esi,[board_size]
401
   add	esi,[board_size]
416
   mov  edi,esi
402
   mov	edi,esi
417
   add  edi,edx
403
   add	edi,edx
418
   mov  ecx,[board_size]
404
   mov	ecx,[board_size]
419
   sub  ecx,board1-board
405
   sub	ecx,board1-board
420
   inc  ecx
406
   inc	ecx
421
   std
407
   std
422
   rep  movsb
408
   rep	movsb
423
   cld
409
   cld
424
 
410
 
425
   popa
411
   popa
426
   ret
412
   ret
427
 
413
 
428
 
414
 
429
from_i  dd  0x0
415
from_i	dd  0x0
430
from_len dd 0x0
416
from_len dd 0x0
431
 
417
 
432
message dd 0x0
418
message dd 0x0
433
message_len dd 0x0
419
message_len dd 0x0
434
 
420
 
435
read_file:                          ; start of execution
421
read_file:			    ; start of execution
436
 
422
 
-
 
423
    mov  [fileinfo+16],eax
437
    mov  [fileinfo+12],eax
424
    shl ebx, 9
438
    mov  [fileinfo+8],ebx
-
 
439
 
425
    mov  [fileinfo+12],ebx
440
    mov  [file_type],unk
426
    mov  [file_type],unk
441
    mov  [type_len],unkl-unk
427
    mov  [type_len],unkl-unk
442
    mov  [filename+40*2+6],dword 'UNK '
428
    mov  [filename+40*2+6],dword 'UNK '
443
 
429
 
444
    cmp  [input_text+256+1],dword 'POST'
430
    cmp  [input_text+256+1],dword 'POST'
445
    je   yes_new_message
431
    je	 yes_new_message
446
 
432
 
447
    cmp  [input_text+256+11],dword 'oard'     ; server board message
433
    cmp  [input_text+256+11],dword 'oard'     ; server board message
448
    jne  no_server_message_2
434
    jne  no_server_message_2
449
 
435
 
450
  yes_new_message:
436
  yes_new_message:
451
 
437
 
452
    mov  eax,58
438
    mov  eax,70
453
    mov  ebx,filel
439
    mov  ebx,filel
454
    int  0x40
440
    int  0x40
455
    mov  [board_size],ebx
441
    mov  [board_size],ebx
456
 
442
 
457
    cmp  [input_text+256+1],dword 'POST'
443
    cmp  [input_text+256+1],dword 'POST'
458
    jne  no_new_message
444
    jne  no_new_message
459
 
445
 
460
    mov  edi,bsmt
446
    mov  edi,bsmt
461
    call set_time
447
    call set_time
462
    mov  edi,bsmd
448
    mov  edi,bsmd
463
    call set_date
449
    call set_date
464
 
450
 
465
    call check_for_incoming_data
451
    call check_for_incoming_data
466
 
452
 
467
    mov  esi,input_text+256   ; from
453
    mov  esi,input_text+256   ; from
468
   newfroms:
454
   newfroms:
469
    inc  esi
455
    inc  esi
470
    cmp  esi,input_text+256*20
456
    cmp  esi,input_text+256*20
471
    je   no_server_message_2
457
    je	 no_server_message_2
472
    cmp  [esi],dword 'from'
458
    cmp  [esi],dword 'from'
473
    jne  newfroms
459
    jne  newfroms
474
 
460
 
475
    add  esi,5
461
    add  esi,5
476
    mov  [from_i],esi
462
    mov  [from_i],esi
477
 
463
 
478
    mov  edx,0
464
    mov  edx,0
479
   name_new_len:
465
   name_new_len:
480
    cmp  [esi+edx],byte 13
466
    cmp  [esi+edx],byte 13
481
    je   name_found_len
467
    je	 name_found_len
482
    cmp  [esi+edx],byte '&'
468
    cmp  [esi+edx],byte '&'
483
    je   name_found_len
469
    je	 name_found_len
484
    cmp  edx,1000
470
    cmp  edx,1000
485
    je   name_found_len
471
    je	 name_found_len
486
    inc  edx
472
    inc  edx
487
    jmp  name_new_len
473
    jmp  name_new_len
-
 
474
 
488
   name_found_len:
475
   name_found_len:
489
 
476
 
490
    mov  [from_len],edx
477
    mov  [from_len],edx
491
 
478
 
492
    mov  esi,input_text+256
479
    mov  esi,input_text+256
493
   newmessages:
480
   newmessages:
494
    inc  esi
481
    inc  esi
495
    cmp  esi,input_text+256*20
482
    cmp  esi,input_text+256*20
496
    je   no_server_message_2
483
    je	 no_server_message_2
497
    cmp  [esi],dword 'sage'
484
    cmp  [esi],dword 'sage'
498
    jne  newmessages
485
    jne  newmessages
499
 
486
 
500
    add  esi,5
487
    add  esi,5
501
    mov  [message],esi
488
    mov  [message],esi
502
 
489
 
503
    mov  edx,0
490
    mov  edx,0
504
   new_len:
491
   new_len:
505
    inc  edx
492
    inc  edx
506
    cmp  [esi+edx],byte ' '
493
    cmp  [esi+edx],byte ' '
507
    je   found_len
494
    je	 found_len
508
    cmp  [esi+edx],byte 13
495
    cmp  [esi+edx],byte 13
509
    jbe  found_len
496
    jbe  found_len
510
    cmp  edx,input_text+5000
497
    cmp  edx,input_text+5000
511
    je   found_len
498
    je	 found_len
512
    jmp  new_len
499
    jmp  new_len
513
   found_len:
500
   found_len:
514
    mov  [message_len],edx
501
    mov  [message_len],edx
515
 
502
 
516
 
503
 
517
    mov  edx,0
504
    mov  edx,0
518
 
505
 
519
   change_letters:
506
   change_letters:
520
 
507
 
521
    cmp  [esi+edx],byte '+'
508
    cmp  [esi+edx],byte '+'
522
    jne  no_space
509
    jne  no_space
523
    mov  [esi+edx],byte ' '
510
    mov  [esi+edx],byte ' '
524
   no_space:
511
   no_space:
525
 
512
 
526
    cmp  [esi+edx+1],word '0D'
513
    cmp  [esi+edx+1],word '0D'
527
    jne  no_br
514
    jne  no_br
528
    mov  [esi+edx],dword '
'
515
    mov  [esi+edx],dword '
'
529
    mov  [esi+edx+4],word '  '
516
    mov  [esi+edx+4],word '  '
530
  no_br:
517
  no_br:
531
 
518
 
532
    cmp  [esi+edx],byte '%'
519
    cmp  [esi+edx],byte '%'
533
    jne  no_ascii
520
    jne  no_ascii
534
    movzx eax,byte [esi+edx+2]
521
    movzx eax,byte [esi+edx+2]
535
    sub  eax,48
522
    sub  eax,48
536
    cmp  eax,9
523
    cmp  eax,9
537
    jbe  eax_ok
524
    jbe  eax_ok
538
    sub  eax,7
525
    sub  eax,7
539
   eax_ok:
526
   eax_ok:
540
    movzx ebx,byte [esi+edx+1]
527
    movzx ebx,byte [esi+edx+1]
541
    sub  ebx,48
528
    sub  ebx,48
542
    cmp  ebx,9
529
    cmp  ebx,9
543
    jbe  ebx_ok
530
    jbe  ebx_ok
544
    sub  ebx,7
531
    sub  ebx,7
545
   ebx_ok:
532
   ebx_ok:
546
    imul ebx,16
533
    imul ebx,16
547
    add  ebx,eax
534
    add  ebx,eax
548
    mov  [esi+edx],bl
535
    mov  [esi+edx],bl
549
    mov  [esi+edx+1],word '  '
536
    mov  [esi+edx+1],word ''
550
    add  edx,2
537
    add  edx,2
551
   no_ascii:
538
   no_ascii:
552
 
539
 
553
    inc  edx
540
    inc  edx
554
    cmp  edx,[message_len]
541
    cmp  edx,[message_len]
555
    jbe  change_letters
542
    jbe  change_letters
556
 
543
 
557
 
544
 
558
    mov  edx,board1e-board1 + board2e-board2 + board3e-board3
545
    mov  edx,board1e-board1 + board2e-board2 + board3e-board3
559
    add  edx,[from_len]
546
    add  edx,[from_len]
560
    add  edx,[message_len]
547
    add  edx,[message_len]
561
 
548
 
562
    add  [board_size],edx
549
    add  [board_size],edx
563
 
550
 
564
    mov  ecx,edx
551
    mov  ecx,edx
565
    call make_room
552
    call make_room
566
 
553
 
567
 
554
 
568
    mov  esi,board1          ; first part
555
    mov  esi,board1	     ; first part
569
    mov  edi,0x20000
556
    mov  edi,0x20000
570
    add  edi,board1-board
557
    add  edi,board1-board
571
    mov  ecx,edx
558
    mov  ecx,edx
572
    cld
559
    cld
573
    rep  movsb
560
    rep  movsb
574
 
561
 
575
    mov  esi,[from_i]          ; name
562
    mov  esi,[from_i]	       ; name
576
    mov  edi,0x20000
563
    mov  edi,0x20000
-
 
564
    add  edi,board1-board
577
    add  edi,board1-board + board1e-board1
565
    add  edi,board1e-board1
578
    mov  ecx,[from_len]
566
    mov  ecx,[from_len]
579
    cld
567
    cld
580
    rep  movsb
568
    rep  movsb
581
 
569
 
582
    mov  esi,board2          ; middle part
570
    mov  esi,board2	     ; middle part
583
    mov  edi,0x20000
571
    mov  edi,0x20000
584
    add  edi,board1-board + board1e-board1
572
    add  edi,board1-board + board1e-board1
585
    add  edi,[from_len]
573
    add  edi,[from_len]
586
    mov  ecx,board2e-board2
574
    mov  ecx,board2e-board2
587
    cld
575
    cld
588
    rep  movsb
576
    rep  movsb
589
 
577
 
590
    mov  esi,[message]       ; message
578
    mov  esi,[message]	     ; message
591
    mov  edi,0x20000
579
    mov  edi,0x20000
592
    add  edi,board1-board + board1e-board1 +board2e-board2
580
    add  edi,board1-board + board1e-board1 + board2e-board2
593
    add  edi,[from_len]
581
    add  edi,[from_len]
594
    mov  ecx,[message_len]
582
    mov  ecx,[message_len]
595
    cld
583
    cld
596
    rep  movsb
584
    rep  movsb
597
 
585
 
598
    mov  esi,board3    ; end part
586
    mov  esi,board3    ; end part
599
    mov  edi,0x20000
587
    mov  edi,0x20000
600
    add  edi,board1-board + board1e-board1 +board2e-board2
588
    add  edi,board1-board + board1e-board1 + board2e-board2
601
    add  edi,[from_len]
589
    add  edi,[from_len]
602
    add  edi,[message_len]
590
    add  edi,[message_len]
603
    mov  ecx,board3e-board3
591
    mov  ecx,board3e-board3
604
    cld
592
    cld
605
    rep  movsb
593
    rep  movsb
606
 
594
 
607
    inc  [board_messages]
595
    inc  [board_messages]
608
 
596
 
609
    mov  eax,[board_size]
597
    mov  eax,[board_size]
610
    mov  [files+8],eax
598
    mov  [files+12],eax
611
 
599
 
612
    mov  eax,58
600
    mov  eax,70
613
    mov  ebx,files
601
    mov  ebx,files
614
    int  0x40
602
    int  0x40
615
 
603
 
616
  no_new_message:
604
  no_new_message:
617
    mov  esi,0x20000
605
    mov  esi,0x20000
618
    mov  edi,0x100000
606
    mov  edi,0x100000
619
    mov  ecx,[board_size]
607
    mov  ecx,[board_size]
620
    cld
608
    cld
621
    rep  movsb
609
    rep  movsb
622
    mov  ebx,[board_size]
610
    mov  ebx,[board_size]
623
 
611
 
624
    mov  [file_type],htm
612
    mov  [file_type],htm
625
    mov  [type_len],html-htm
613
    mov  [type_len],html-htm
626
    mov  [filename+40*2+6],dword 'HTM '
614
    mov  [filename+40*2+6],dword 'HTM '
627
 
615
 
628
    jmp  file_loaded
616
    jmp  file_loaded
629
  no_server_message_2:
617
  no_server_message_2:
630
 
618
 
631
    cmp  [input_text+256+9],dword 'ySta'     ; server message
619
    cmp  [input_text+256+9],dword 'ySta'     ; server message
632
    jne  no_server_message_1
620
    jne  no_server_message_1
633
    mov  edi,smt
621
    mov  edi,smt
634
    call set_time
622
    call set_time
635
    mov  edi,smd
623
    mov  edi,smd
636
    call set_date
624
    call set_date
637
    mov  eax,[documents_served]
625
    mov  eax,[documents_served]
638
    mov  ecx,9
626
    mov  ecx,9
639
    mov  edi,sms+21
627
    mov  edi,sms+21
640
    call set_value
628
    call set_value
641
    mov  eax,[bytes_transferred]
629
    mov  eax,[bytes_transferred]
642
    mov  ecx,9
630
    mov  ecx,9
643
    mov  edi,smb+21
631
    mov  edi,smb+21
644
    call set_value
632
    call set_value
645
    mov  eax,[board_messages]
633
    mov  eax,[board_messages]
646
    mov  ecx,9
634
    mov  ecx,9
647
    mov  edi,smm+21
635
    mov  edi,smm+21
648
    call set_value
636
    call set_value
649
    mov  eax,[board_size]
637
    mov  eax,[board_size]
650
    mov  ecx,9
638
    mov  ecx,9
651
    mov  edi,smz+21
639
    mov  edi,smz+21
652
    call set_value
640
    call set_value
653
    mov  esi,sm
641
    mov  esi,sm
654
    mov  edi,0x100000
642
    mov  edi,0x100000
655
    mov  ecx,sme-sm
643
    mov  ecx,sme-sm
656
    cld
644
    cld
657
    rep  movsb
645
    rep  movsb
658
    mov  ebx,sme-sm
646
    mov  ebx,sme-sm
659
 
647
 
660
    mov  [file_type],htm
648
    mov  [file_type],htm
661
    mov  [type_len],html-htm
649
    mov  [type_len],html-htm
662
    mov  [filename+40*2+6],dword 'HTM '
650
    mov  [filename+40*2+6],dword 'HTM '
663
 
651
 
664
    jmp  file_loaded
652
    jmp  file_loaded
665
  no_server_message_1:
653
  no_server_message_1:
666
 
654
 
667
    mov  esi,input_text+256+6
655
    mov  esi,input_text+256+6
668
    cmp  [input_text+256+1],dword 'GET '
656
    cmp  [input_text+256+1],dword 'GET '
669
    jne  no_new_let
657
    jne  no_new_let
670
    mov  edi,wanted_file
658
    mov  edi,wanted_file
671
    cld
659
    cld
672
  new_let:
660
  new_let:
673
    cmp  [esi],byte ' '
661
    cmp  [esi],byte ' '
674
    je   no_new_let
662
    je	 no_new_let
675
    cmp  edi,wanted_file+30
663
    cmp  edi,wanted_file+30
676
    jge  no_new_let
664
    jge  no_new_let
677
    movsb
665
    movsb
678
    jmp  new_let
666
    jmp  new_let
679
  no_new_let:
667
  no_new_let:
680
    mov  [edi+0],dword 0
668
    mov  [edi+0],dword 0
681
    mov  [edi+4],dword 0
669
    mov  [edi+4],dword 0
682
    mov  [edi+8],dword 0
670
    mov  [edi+8],dword 0
683
 
671
 
684
    cmp  esi,input_text+256+6
672
    cmp  esi,input_text+256+6
685
    jne  no_index
673
    jne  no_index
686
    mov  edi,wanted_file
674
    mov  edi,wanted_file
687
    mov  [edi+0],dword  'inde'
675
    mov  [edi+0],dword	'inde'
688
    mov  [edi+4],dword  'x.ht'
676
    mov  [edi+4],dword	'x.ht'
689
    mov  [edi+8],byte   'm'
677
    mov  [edi+8],byte	'm'
690
    mov  [edi+9],byte   0
678
    mov  [edi+9],byte	0
691
    add  edi,9
679
    add  edi,9
692
 
680
 
693
    mov  [file_type],htm
681
    mov  [file_type],htm
694
    mov  [type_len],html-htm
682
    mov  [type_len],html-htm
695
    mov  [filename+40*2+6],dword 'HTM '
683
    mov  [filename+40*2+6],dword 'HTM '
696
 
684
 
697
    jmp  html_file
685
    jmp  html_file
698
  no_index:
686
  no_index:
699
 
687
 
700
    cmp  [edi-3],dword 'htm'+0
688
    cmp  [edi-3],dword 'htm'+0
701
    je   htm_header
689
    je	 htm_header
702
    cmp  [edi-3],dword 'HTM'+0
690
    cmp  [edi-3],dword 'HTM'+0
703
    je   htm_header
691
    je	 htm_header
704
    jmp  no_htm_header
692
    jmp  no_htm_header
705
  htm_header:
693
  htm_header:
706
    mov  [file_type],htm
694
    mov  [file_type],htm
707
    mov  [type_len],html-htm
695
    mov  [type_len],html-htm
708
    mov  [filename+40*2+6],dword 'HTM '
696
    mov  [filename+40*2+6],dword 'HTM '
709
    jmp  found_file_type
697
    jmp  found_file_type
710
  no_htm_header:
698
  no_htm_header:
711
 
699
 
712
    cmp  [edi-3],dword 'png'+0
700
    cmp  [edi-3],dword 'png'+0
713
    je   png_header
701
    je	 png_header
714
    cmp  [edi-3],dword 'PNG'+0
702
    cmp  [edi-3],dword 'PNG'+0
715
    je   png_header
703
    je	 png_header
716
    jmp  no_png_header
704
    jmp  no_png_header
717
  png_header:
705
  png_header:
718
    mov  [file_type],png
706
    mov  [file_type],png
719
    mov  [type_len],pngl-png
707
    mov  [type_len],pngl-png
720
    mov  [filename+40*2+6],dword 'PNG '
708
    mov  [filename+40*2+6],dword 'PNG '
721
    jmp  found_file_type
709
    jmp  found_file_type
722
  no_png_header:
710
  no_png_header:
723
 
711
 
724
    cmp  [edi-3],dword 'gif'+0
712
    cmp  [edi-3],dword 'gif'+0
725
    je   gif_header
713
    je	 gif_header
726
    cmp  [edi-3],dword 'GIF'+0
714
    cmp  [edi-3],dword 'GIF'+0
727
    je   gif_header
715
    je	 gif_header
728
    jmp  no_gif_header
716
    jmp  no_gif_header
729
  gif_header:
717
  gif_header:
730
    mov  [file_type],gif
718
    mov  [file_type],gif
731
    mov  [type_len],gifl-gif
719
    mov  [type_len],gifl-gif
732
    mov  [filename+40*2+6],dword 'GIF '
720
    mov  [filename+40*2+6],dword 'GIF '
733
    jmp  found_file_type
721
    jmp  found_file_type
734
  no_gif_header:
722
  no_gif_header:
735
 
723
 
736
    cmp  [edi-3],dword 'jpg'+0
724
    cmp  [edi-3],dword 'jpg'+0
737
    je   jpg_header
725
    je	 jpg_header
738
    cmp  [edi-3],dword 'JPG'+0
726
    cmp  [edi-3],dword 'JPG'+0
739
    je   jpg_header
727
    je	 jpg_header
740
    jmp  no_jpg_header
728
    jmp  no_jpg_header
741
  jpg_header:
729
  jpg_header:
742
    mov  [file_type],jpg
730
    mov  [file_type],jpg
743
    mov  [type_len],jpgl-jpg
731
    mov  [type_len],jpgl-jpg
744
    mov  [filename+40*2+6],dword 'JPG '
732
    mov  [filename+40*2+6],dword 'JPG '
745
    jmp  found_file_type
733
    jmp  found_file_type
746
  no_jpg_header:
734
  no_jpg_header:
747
 
735
 
748
    cmp  [edi-3],dword 'asm'+0
736
    cmp  [edi-3],dword 'asm'+0
749
    je   txt_header
737
    je	 txt_header
750
    cmp  [edi-3],dword 'ASM'+0
738
    cmp  [edi-3],dword 'ASM'+0
751
    je   txt_header
739
    je	 txt_header
752
    cmp  [edi-3],dword 'txt'+0
740
    cmp  [edi-3],dword 'txt'+0
753
    je   txt_header
741
    je	 txt_header
754
    cmp  [edi-3],dword 'TXT'+0
742
    cmp  [edi-3],dword 'TXT'+0
755
    je   txt_header
743
    je	 txt_header
756
    jmp  no_txt_header
744
    jmp  no_txt_header
757
  txt_header:
745
  txt_header:
758
    mov  [file_type],txt
746
    mov  [file_type],txt
759
    mov  [type_len],txtl-txt
747
    mov  [type_len],txtl-txt
760
    mov  [filename+40*2+6],dword 'TXT '
748
    mov  [filename+40*2+6],dword 'TXT '
761
    jmp  found_file_type
749
    jmp  found_file_type
762
  no_txt_header:
750
  no_txt_header:
763
 
751
 
764
  html_file:
752
  html_file:
765
 
753
 
766
  found_file_type:
754
  found_file_type:
767
 
755
 
768
    mov  edi,getf
756
    mov  edi,getf
769
    add  edi,[getflen]
757
    add  edi,[getflen]
770
    mov  esi,wanted_file
758
    mov  esi,wanted_file
771
    mov  ecx,40
759
    mov  ecx,40
772
    cld
760
    cld
773
    rep  movsb
761
    rep  movsb
774
 
762
 
775
    mov  esi,getf
763
    mov  esi,getf
776
    mov  edi,filename
764
    mov  edi,filename
777
    mov  ecx,35
765
    mov  ecx,35
778
    cld
766
    cld
779
    rep  movsb
767
    rep  movsb
780
 
768
 
781
    mov  [fileinfo+8],dword 1   ; file exists ?
769
    mov  [fileinfo+12],dword 1	 ; file exists ?
782
    mov  eax,58
770
    mov  eax,70
783
    mov  ebx,fileinfo
771
    mov  ebx,fileinfo
784
    int  0x40
772
    int  0x40
785
 
773
 
786
    cmp  eax,0         ; file not found - message
774
    cmp  eax,0	       ; file not found - message
787
    je   file_found
775
    je	 file_found
788
    mov  edi,et
776
    mov  edi,et
789
    call set_time
777
    call set_time
790
    mov  edi,ed
778
    mov  edi,ed
791
    call set_date
779
    call set_date
792
    mov  esi,fnf
780
    mov  esi,fnf
793
    mov  edi,0x100000
781
    mov  edi,0x100000
794
    mov  ecx,fnfe-fnf
782
    mov  ecx,fnfe-fnf
795
    cld
783
    cld
796
    rep  movsb
784
    rep  movsb
797
    mov  ebx,fnfe-fnf
785
    mov  ebx,fnfe-fnf
798
 
786
 
799
    mov  [file_type],htm
787
    mov  [file_type],htm
800
    mov  [type_len],html-htm
788
    mov  [type_len],html-htm
801
    mov  [filename+40*2+6],dword 'HTM '
789
    mov  [filename+40*2+6],dword 'HTM '
802
 
790
 
803
    jmp  file_not_found
791
    jmp  file_not_found
804
 
792
 
805
   file_found:
793
   file_found:
806
 
794
 
807
    mov  [fileinfo+8],dword 0x2f0000 / 512 ; read all of file
795
    mov  [fileinfo+12],dword 0x2f0000 ; read all of file
808
    mov  eax,58
796
    mov  eax,70
809
    mov  ebx,fileinfo
797
    mov  ebx,fileinfo
810
    int  0x40
798
    int  0x40
811
 
799
 
812
   file_not_found:
800
   file_not_found:
813
   file_loaded:
801
   file_loaded:
814
 
802
 
815
    and  ebx,0x3fffff
803
    and  ebx,0x3fffff
816
    mov  [filesize],ebx
804
    mov  [filesize],ebx
817
    mov  [file_left],ebx
805
    mov  [file_left],ebx
818
 
806
 
819
    mov  eax,ebx
807
    mov  eax,ebx
820
    mov  edi,c_l+5
808
    mov  edi,c_l+5
821
    mov  ebx,10
809
    mov  ebx,10
822
  newl:
810
  newl:
823
    xor  edx,edx
811
    xor  edx,edx
824
    div  ebx
812
    div  ebx
825
    mov  ecx,edx
813
    mov  ecx,edx
826
    add  cl,48
814
    add  cl,48
827
    mov  [edi],cl
815
    mov  [edi],cl
828
    dec  edi
816
    dec  edi
829
    cmp  edi,c_l
817
    cmp  edi,c_l
830
    jge  newl
818
    jge  newl
831
 
819
 
832
    mov  esi,c_l
820
    mov  esi,c_l
833
    mov  edi,filename+46
821
    mov  edi,filename+46
834
    mov  ecx,7
822
    mov  ecx,7
835
    cld
823
    cld
836
    rep  movsb
824
    rep  movsb
837
 
825
 
838
    inc  [documents_served]
826
    inc  [documents_served]
839
    mov  eax,[filesize]
827
    mov  eax,[filesize]
840
    add  [bytes_transferred],eax
828
    add  [bytes_transferred],eax
841
 
829
 
842
    call draw_data
830
    call draw_data
843
 
831
 
844
    ret
832
    ret
845
 
833
 
846
 
834
 
847
set_value:
835
set_value:
848
 
836
 
849
    pusha
837
    pusha
850
 
838
 
851
    add  edi,ecx
839
    add  edi,ecx
852
    mov  ebx,10
840
    mov  ebx,10
853
  new_value:
841
  new_value:
854
    xor  edx,edx
842
    xor  edx,edx
855
    div  ebx
843
    div  ebx
856
    add  dl,48
844
    add  dl,48
857
    mov  [edi],dl
845
    mov  [edi],dl
858
    dec  edi
846
    dec  edi
859
    loop new_value
847
    loop new_value
860
 
848
 
861
    popa
849
    popa
862
    ret
850
    ret
863
 
851
 
864
 
852
 
865
set_time:
853
set_time:
866
 
854
 
867
    pusha
855
    pusha
868
 
856
 
869
    mov  eax,3
857
    mov  eax,3
870
    int  0x40
858
    int  0x40
871
 
859
 
872
    mov  ecx,3
860
    mov  ecx,3
873
  new_time_digit:
861
  new_time_digit:
874
    mov  ebx,eax
862
    mov  ebx,eax
875
    and  ebx,0xff
863
    and  ebx,0xff
876
    shl  ebx,4
864
    shl  ebx,4
877
    shr  bl,4
865
    shr  bl,4
878
    add  bx,48*256+48
866
    add  bx,48*256+48
879
    mov  [edi],bh
867
    mov  [edi],bh
880
    mov  [edi+1],bl
868
    mov  [edi+1],bl
881
    add  edi,3
869
    add  edi,3
882
    shr  eax,8
870
    shr  eax,8
883
    loop new_time_digit
871
    loop new_time_digit
884
 
872
 
885
    popa
873
    popa
886
    ret
874
    ret
887
 
875
 
888
 
876
 
889
 
877
 
890
set_date:
878
set_date:
891
 
879
 
892
    pusha
880
    pusha
893
 
881
 
894
    mov  eax,29
882
    mov  eax,29
895
    int  0x40
883
    int  0x40
896
 
884
 
897
    mov  ecx,3
885
    mov  ecx,3
898
    add  edi,6
886
    add  edi,6
899
  new_date_digit:
887
  new_date_digit:
900
    mov  ebx,eax
888
    mov  ebx,eax
901
    and  ebx,0xff
889
    and  ebx,0xff
902
    shl  ebx,4
890
    shl  ebx,4
903
    shr  bl,4
891
    shr  bl,4
904
    add  bx,48*256+48
892
    add  bx,48*256+48
905
    mov  [edi],bh
893
    mov  [edi],bh
906
    mov  [edi+1],bl
894
    mov  [edi+1],bl
907
    sub  edi,3
895
    sub  edi,3
908
    shr  eax,8
896
    shr  eax,8
909
    loop new_date_digit
897
    loop new_date_digit
910
 
898
 
911
    popa
899
    popa
912
    ret
900
    ret
913
 
901
 
914
 
902
 
915
 
903
 
916
check_for_incoming_data:
904
check_for_incoming_data:
917
 
905
 
918
    pusha
906
    pusha
919
 
907
 
920
   check:
908
   check:
921
 
909
 
922
    mov  eax, 53
910
    mov  eax, 53
923
    mov  ebx, 2
911
    mov  ebx, 2
924
    mov  ecx, [socket]
912
    mov  ecx, [socket]
925
    int  0x40
913
    int  0x40
926
 
914
 
927
    cmp  eax,0
915
    cmp  eax,0
928
    je   _ret_now
916
    je   _ret_now
929
 
917
 
930
  new_data:
918
  new_data:
931
 
919
 
932
    mov  eax,53
920
    mov  eax,53
933
    mov  ebx,2
921
    mov  ebx,2
934
    mov  ecx,[socket]
922
    mov  ecx,[socket]
935
    int  0x40
923
    int  0x40
936
 
924
 
937
    cmp  eax,0
925
    cmp  eax,0
938
    je   _ret
926
    je   _ret
939
 
927
 
940
    mov  eax,53
928
    mov  eax,53
941
    mov  ebx,3
929
    mov  ebx,3
942
    mov  ecx,[socket]
930
    mov  ecx,[socket]
943
    int  0x40
931
    int  0x40
944
 
932
 
945
    cmp  bl,10
933
    cmp  bl,10
946
    jne  no_lf
934
    jne  no_lf
947
    inc  [posy]
935
    inc  [posy]
948
    mov  [posx],0
936
    mov  [posx],0
949
    jmp  new_data
937
    jmp  new_data
950
  no_lf:
938
  no_lf:
951
 
939
 
952
    cmp  bl,20
940
    cmp  bl,20
953
    jb   new_data
941
    jb   new_data
954
 
942
 
955
    inc  [posx]
943
    inc  [posx]
956
    cmp  [posy],20
944
    cmp  [posy],20
957
    jbe  yok
945
    jbe  yok
958
    mov  [posy],1
946
    mov  [posy],1
959
   yok:
947
   yok:
960
 
948
 
961
    mov  eax,[posy]
949
    mov  eax,[posy]
962
    imul eax,256
950
    imul eax,256
963
    add  eax,[posx]
951
    add  eax,[posx]
964
 
952
 
965
    mov  [input_text+eax],bl
953
    mov  [input_text+eax],bl
966
 
954
 
967
    jmp  new_data
955
    jmp  new_data
968
 
956
 
969
  _ret:
957
  _ret:
970
 
958
 
971
     call draw_data
959
     call draw_data
972
 
960
 
973
     mov  eax,5
961
     mov  eax,5
974
     mov  ebx,1
962
     mov  ebx,1
975
     cmp  [input_text+256+1],dword 'POST'
963
     cmp  [input_text+256+1],dword 'POST'
976
     jne  no_ld
964
     jne  no_ld
977
     mov  ebx,50
965
     mov  ebx,50
978
   no_ld:
966
   no_ld:
979
     int  0x40
967
     int  0x40
980
 
968
 
981
     jmp  check
969
     jmp  check
982
 
970
 
983
  _ret_now:
971
  _ret_now:
984
 
972
 
985
    popa
973
    popa
986
    ret
974
    ret
987
 
975
 
988
 
976
 
989
posy dd 1
977
posy dd 1
990
posx dd 0
978
posx dd 0
991
 
979
 
992
 
980
 
993
check_status:
981
check_status:
994
 
982
 
995
    pusha
983
    pusha
996
 
984
 
997
    mov  eax,53
985
    mov  eax,53
998
    mov  ebx,6
986
    mov  ebx,6
999
    mov  ecx,[socket]
987
    mov  ecx,[socket]
1000
    int  0x40
988
    int  0x40
1001
 
989
 
1002
    cmp  eax,[status]
990
    cmp  eax,[status]
1003
    je   c_ret
991
    je	 c_ret
1004
    mov  [status],eax
992
    mov  [status],eax
1005
    add  al,48
993
    add  al,48
1006
    mov  [text+12],al
994
    mov  [text+12],al
1007
    call draw_data
995
    call draw_data
1008
   c_ret:
996
   c_ret:
1009
 
997
 
1010
    popa
998
    popa
1011
    ret
999
    ret
1012
 
1000
 
1013
 
1001
 
1014
addr       dd  0x0
1002
addr	   dd  0x0
1015
ya         dd  0x0
1003
ya	   dd  0x0
1016
 
1004
 
1017
filename2:  times 100 db 32
1005
filename2:  times 100 db 32
1018
 
1006
 
1019
read_string:
1007
read_string:
1020
 
1008
 
1021
    mov  [addr],dword getf
1009
    mov  [addr],dword getf
1022
    mov  [ya],dword 139
1010
    mov  [ya],dword 139
1023
 
1011
 
1024
    mov  edi,[addr]
1012
    mov  edi,[addr]
1025
    mov  eax,0
1013
    mov  eax,0
1026
    mov  ecx,30
1014
    mov  ecx,30
1027
    cld
1015
    cld
1028
    rep  stosb
1016
    rep  stosb
1029
 
1017
 
1030
    call print_text
1018
    call print_text
1031
 
1019
 
1032
    mov  edi,[addr]
1020
    mov  edi,[addr]
1033
 
1021
 
1034
  f11:
1022
  f11:
1035
    mov  eax,10
1023
    mov  eax,10
1036
    int  0x40
1024
    int  0x40
1037
    cmp  eax,2
1025
    cmp  eax,2
1038
    jne  read_done
1026
    jne  read_done
1039
    mov  eax,2
1027
    mov  eax,2
1040
    int  0x40
1028
    int  0x40
1041
    shr  eax,8
1029
    shr  eax,8
1042
    cmp  eax,13
1030
    cmp  eax,13
1043
    je   read_done
1031
    je	 read_done
1044
    cmp  eax,8
1032
    cmp  eax,8
1045
    jnz  nobsl
1033
    jnz  nobsl
1046
    cmp  edi,[addr]
1034
    cmp  edi,[addr]
1047
    jz   f11
1035
    jz	 f11
1048
    sub  edi,1
1036
    sub  edi,1
1049
    mov  [edi],byte 32
1037
    mov  [edi],byte 32
1050
    call print_text
1038
    call print_text
1051
    jmp  f11
1039
    jmp  f11
1052
  nobsl:
1040
  nobsl:
1053
    mov  [edi],al
1041
    mov  [edi],al
1054
 
1042
 
1055
    call print_text
1043
    call print_text
1056
 
1044
 
1057
    add  edi,1
1045
    add  edi,1
1058
    mov  esi,[addr]
1046
    mov  esi,[addr]
1059
    add  esi,30
1047
    add  esi,30
1060
    cmp  esi,edi
1048
    cmp  esi,edi
1061
    jnz  f11
1049
    jnz  f11
1062
 
1050
 
1063
  read_done:
1051
  read_done:
1064
 
1052
 
1065
    push edi
1053
    push edi
1066
 
1054
 
1067
    mov  ecx,40
1055
    mov  ecx,40
1068
    mov  eax,32
1056
    mov  eax,32
1069
    cld
1057
    cld
1070
    rep  stosb
1058
    rep  stosb
1071
 
1059
 
1072
    call print_text
1060
    call print_text
1073
 
1061
 
1074
    pop  edi
1062
    pop  edi
1075
    sub  edi,[addr]
1063
    sub  edi,[addr]
1076
    mov  [getflen],edi
1064
    mov  [getflen],edi
1077
 
1065
 
1078
    mov  esi,getf
1066
    mov  esi,getf
1079
    mov  edi,dirp+12
1067
    mov  edi,dirp+12
1080
    mov  ecx,28
1068
    mov  ecx,28
1081
    cld
1069
    cld
1082
    rep  movsb
1070
    rep  movsb
1083
 
1071
 
1084
    jmp  still
1072
    jmp  still
1085
 
1073
 
1086
 
1074
 
1087
print_text:
1075
print_text:
1088
 
1076
 
1089
    pusha
1077
    pusha
1090
 
-
 
1091
    mov  eax,13
-
 
1092
    mov  ebx,97*65536+23*6
-
 
1093
    mov  ecx,[ya]
-
 
1094
    shl  ecx,16
-
 
1095
    mov  cx,9
-
 
1096
    mov  edx,0xffffff
-
 
1097
    int  0x40
-
 
1098
 
1078
 
1099
    mov  eax,4
1079
    mov  eax,4
1100
    mov  edx,[addr]
1080
    mov  edx,[addr]
1101
    mov  ebx,97*65536
1081
    mov  ebx,97*65536
1102
    add  ebx,[ya]
1082
    add  ebx,[ya]
1103
    mov  ecx,0x000000
1083
    mov  ecx,0x40000000
1104
    mov  esi,23
1084
    mov  esi,23
-
 
1085
    mov  edi,0xffffff
1105
    int  0x40
1086
    int  0x40
1106
 
1087
 
1107
    popa
1088
    popa
1108
    ret
1089
    ret
1109
 
1090
 
1110
 
-
 
1111
 
-
 
1112
 
-
 
1113
 
-
 
1114
 
1091
 
1115
;   *********************************************
1092
;   *********************************************
1116
;   *******  WINDOW DEFINITIONS AND DRAW ********
1093
;   *******  WINDOW DEFINITIONS AND DRAW ********
1117
;   *********************************************
1094
;   *********************************************
1118
 
1095
 
1119
 
1096
 
1120
draw_window:
1097
draw_window:
1121
 
1098
 
1122
    mov  eax,12                    ; function 12:tell os about windowdraw
1099
    mov  eax,12 		   ; function 12:tell os about windowdraw
1123
    mov  ebx,1                     ; 1, start of draw
1100
    mov  ebx,1			   ; 1, start of draw
1124
    int  0x40
1101
    int  0x40
1125
 
1102
 
1126
                                   ; DRAW WINDOW
1103
				   ; DRAW WINDOW
1127
    mov  eax,0                     ; function 0 : define and draw window
1104
    mov  eax,0			   ; function 0 : define and draw window
1128
    mov  ebx,100*65536+480         ; [x start] *65536 + [x size]
1105
    mov  ebx,100*65536+480	   ; [x start] *65536 + [x size]
1129
    mov  ecx,100*65536+215         ; [y start] *65536 + [y size]
1106
    mov  ecx,100*65536+215	   ; [y start] *65536 + [y size]
1130
    mov  edx,0x03ffffff            ; color of work area RRGGBB
1107
    mov  edx,0x13ffffff 	   ; color of work area RRGGBB
1131
    mov  esi,0x8050a0b0            ; color of grab bar  RRGGBB,8->color gl
-
 
1132
    mov  edi,0x0050a0b0            ; color of frames    RRGGBB
-
 
1133
    int  0x40
-
 
1134
 
-
 
1135
                                   ; WINDOW LABEL
1108
    mov  edi,header		   ; WINDOW LABEL
1136
    mov  eax,4                     ; function 4 : write text to window
-
 
1137
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
-
 
1138
    mov  ecx,0x10ffffff            ; color of text RRGGBB
-
 
1139
    mov  edx,labelt                ; pointer to text beginning
-
 
1140
    mov  esi,labellen-labelt       ; text length
-
 
1141
    int  0x40
1109
    int  0x40
1142
 
1110
 
1143
    mov  eax,8                     ; function 8 : define and draw button
1111
    mov  eax,8			   ; function 8 : define and draw button
1144
    mov  ebx,(40)*65536+20         ; [x start] *65536 + [x size]
1112
    mov  ebx,(40)*65536+20	   ; [x start] *65536 + [x size]
1145
    mov  ecx,59*65536+9           ; [y start] *65536 + [y size]
1113
    mov  ecx,59*65536+9 	   ; [y start] *65536 + [y size]
1146
    mov  edx,2                     ; button id
1114
    mov  edx,2			   ; button id
1147
    mov  esi,0x66aa66              ; button color RRGGBB
1115
    mov  esi,0x66aa66		   ; button color RRGGBB
1148
    int  0x40
1116
    int  0x40
1149
 
1117
 
1150
    mov  eax,8                     ; function 8 : define and draw button
1118
			   ; function 8 : define and draw button
1151
    mov  ebx,(40)*65536+20         ; [x start] *65536 + [x size]
1119
    mov  ebx,(40)*65536+20	   ; [x start] *65536 + [x size]
1152
    mov  ecx,72*65536+9           ; [y start] *65536 + [y size]
1120
    mov  ecx,72*65536+9          ; [y start] *65536 + [y size]
1153
    mov  edx,4                     ; button id
1121
    mov  edx,4			   ; button id
1154
    mov  esi,0xaa6666              ; button color RRGGBB
1122
    mov  esi,0xaa6666		   ; button color RRGGBB
1155
    int  0x40
1123
    int  0x40
1156
 
1124
 
1157
    mov  eax,8                     ; Enter directory
1125
			   ; Enter directory
1158
    mov  ebx,(25)*65536+66
1126
    mov  ebx,(25)*65536+66
1159
    mov  ecx,135*65536+15
1127
    mov  ecx,135*65536+15
1160
    mov  edx,6
1128
    mov  edx,6
1161
    mov  esi,0x3388dd
1129
    mov  esi,0x3388dd
1162
    int  0x40
1130
    int  0x40
1163
 
1131
 
1164
    mov  eax,38
1132
    mov  eax,38
1165
    mov  ebx,240*65536+240
1133
    mov  ebx,240*65536+240
1166
    mov  ecx,22*65536+210
1134
    mov  ecx,22*65536+210
1167
    mov  edx,0x6699cc ; 002288
1135
    mov  edx,0x6699cc ; 002288
1168
    int  0x40
1136
    int  0x40
1169
 
1137
 
1170
    mov  eax,38
1138
 
1171
    mov  ebx,241*65536+241
1139
    mov  ebx,241*65536+241
1172
    mov  ecx,22*65536+210
1140
    mov  ecx,22*65536+210
1173
    mov  edx,0x336699 ; 002288
1141
    mov  edx,0x336699 ; 002288
1174
    int  0x40
1142
    int  0x40
1175
 
1143
 
1176
    call draw_data
1144
    call draw_data
1177
 
1145
 
1178
    mov  eax,12                    ; function 12:tell os about windowdraw
1146
    mov  eax,12 		   ; function 12:tell os about windowdraw
1179
    mov  ebx,2                     ; 2, end of draw
1147
    mov  ebx,2			   ; 2, end of draw
1180
    int  0x40
1148
    int  0x40
1181
 
1149
 
1182
    ret
1150
    ret
1183
 
1151
 
1184
 
1152
 
1185
draw_data:
1153
draw_data:
1186
 
1154
 
1187
    pusha
1155
    pusha
1188
 
1156
 
1189
    mov  ebx,25*65536+35           ; draw info text with function 4
1157
    mov  ebx,25*65536+35	   ; draw info text with function 4
1190
    mov  ecx,0x000000
1158
    mov  ecx,0x000000
1191
    mov  edx,text
1159
    mov  edx,text
1192
    mov  esi,35
1160
    mov  esi,35
1193
  newline:
1161
  newline:
1194
    pusha
1162
    pusha
1195
    cmp  ebx,25*65536+61
1163
    cmp  ebx,25*65536+61
1196
    je   now
1164
    je   now
1197
    cmp  ebx,25*65536+74
1165
    cmp  ebx,25*65536+74
1198
    je   now
1166
    je   now
1199
    cmp  ebx,25*65536+74+13*5
1167
    cmp  ebx,25*65536+74+13*5
1200
    je   now
1168
    je   now
1201
    mov  ecx,ebx
1169
    mov  ecx,ebx
1202
    mov  bx,35*6
1170
    mov  bx,35*6
1203
    shl  ecx,16
1171
    shl  ecx,16
1204
    mov  cx,9
1172
    mov  cx,9
1205
    mov  eax,13
1173
    mov  eax,13
1206
    mov  edx,0xffffff
1174
    mov  edx,0xffffff
1207
    int  0x40
1175
    int  0x40
1208
   now:
1176
   now:
1209
    popa
1177
    popa
1210
    mov  eax,4
1178
    mov  eax,4
1211
    int  0x40
1179
    int  0x40
1212
    add  ebx,13
1180
    add  ebx,13
1213
    add  edx,40
1181
    add  edx,40
1214
    cmp  [edx],byte 'x'
1182
    cmp  [edx],byte 'x'
1215
    jnz  newline
1183
    jnz  newline
1216
 
1184
 
1217
    mov  [input_text+0],dword 'RECE'
1185
    mov  [input_text+0],dword 'RECE'
1218
    mov  [input_text+4],dword 'IVED'
1186
    mov  [input_text+4],dword 'IVED'
1219
    mov  [input_text+8],dword ':   '
1187
    mov  [input_text+8],dword ':   '
1220
 
1188
 
1221
    mov  ebx,255*65536+35           ; draw info text with function 4
1189
    mov  ebx,255*65536+35	    ; draw info text with function 4
1222
    mov  ecx,0x000000
1190
    mov  ecx,0x000000
1223
    mov  edx,input_text
1191
    mov  edx,input_text
1224
    mov  esi,35
1192
    mov  esi,35
1225
    mov  edi,17
1193
    mov  edi,17
1226
  newline2:
1194
  newline2:
1227
    pusha
1195
    pusha
1228
    mov  ecx,ebx
1196
    mov  ecx,ebx
1229
    mov  bx,35*6
1197
    mov  bx,35*6
1230
    shl  ecx,16
1198
    shl  ecx,16
1231
    mov  cx,9
1199
    mov  cx,9
1232
    mov  eax,13
1200
    mov  eax,13
1233
    mov  edx,0xffffff
1201
    mov  edx,0xffffff
1234
    int  0x40
1202
    int  0x40
1235
    popa
1203
    popa
1236
    mov  eax,4
1204
    mov  eax,4
1237
    int  0x40
1205
    int  0x40
1238
    add  ebx,10
1206
    add  ebx,10
1239
    add  edx,256
1207
    add  edx,256
1240
    dec  edi
1208
    dec  edi
1241
    jnz  newline2
1209
    jnz  newline2
1242
 
1210
 
1243
    popa
1211
    popa
1244
 
1212
 
1245
    ret
1213
    ret
1246
 
1214
 
1247
 
1215
 
1248
; DATA AREA
1216
; DATA AREA
1249
 
1217
 
1250
status  dd  0x0
1218
status	dd  0x0
1251
 
1219
 
1252
text:
1220
text:
1253
    db 'TCB status: x                           '
1221
    db 'TCB status: x                           '
1254
    db '                                        '
1222
    db '                                        '
1255
    db '       Activate server                  '
1223
    db '       Activate server                  '
1256
    db '       Stop server                      '
1224
    db '       Stop server                      '
1257
    db '                                        '
1225
    db '                                        '
1258
    db 'Requests: /TinyStat  -statistics        '
1226
    db 'Requests: /TinyStat  -statistics        '
1259
    db '          /TinyBoard -message board     '
1227
    db '          /TinyBoard -message board     '
1260
    db '                                        '
1228
    db '                                        '
1261
dirp:
1229
dirp:
1262
    db '   Files:   /RD/1/                      '
1230
    db '   Files:   /rd/1/                      '
1263
    db '                                        '
1231
    db '                                        '
1264
filename:
1232
filename:
1265
    db '                                        '
1233
    db '                                        '
1266
    db 'Size: -------                           '
1234
    db 'Size: -------                           '
1267
    db 'Type: ---                               '
1235
    db 'Type: ---                               '
1268
    db 'x' ; <- END MARKER, DONT DELETE
1236
    db 'x' ; <- END MARKER, DONT DELETE
1269
 
1237
 
1270
 
1238
 
1271
html_header:
1239
html_header:
1272
 
1240
 
1273
     db  'HTTP/1.0 200 OK',13,10
1241
     db  'HTTP/1.0 200 OK',13,10
1274
     db  'Server: MenuetOS HTTP Server',13,10
1242
     db  'Server: KolibriOS HTTP Server',13,10
1275
     db  'Content-Length: '
1243
     db  'Content-Length: '
1276
c_l: db  '000000',13,10
1244
c_l: db  '000000',13,10
1277
 
1245
 
1278
h_len:
1246
h_len:
1279
 
1247
 
1280
fnf:
1248
fnf:
1281
     db  ''
1249
     db  ''
1282
     db  '
'
1250
     db  '
'
1283
     db  "TinyServer v ",version," for MenuetOS",13,10,13,10
1251
     db  "HTTP-Ñåðâåð v ",version," äëÿ KolibriOS",13,10,13,10
1284
     db  "Error 404 - File not found.",13,10,13,10
1252
     db  "

Error 404 - File not found

",13,10,13,10
1285
     db  "For more info about server: request /TinyStat",13,10,13,10
1253
     db  "Äëÿ ïîëó÷åíèÿ ñòàòèñòèêè âûïîëíèòå çàïðîñ /TinyStat",13,10,13,10
1286
et:  db  "xx:xx:xx",13,10
1254
et:  db  "xx:xx:xx",13,10
1287
ed:  db  "xx.xx.xx",13,10
1255
ed:  db  "xx.xx.xx",13,10
1288
     db  "
"
1256
     db  "
"
1289
fnfe:
1257
fnfe:
1290
 
1258
 
1291
 
1259
 
1292
sm:
1260
sm:
1293
     db  ''
1261
     db  ''
1294
     db  '
'
1262
     db  '
'
1295
     db  "TinyServer v ",version," for MenuetOS",13,10,13,10
1263
     db  "HTTP-Ñåðâåð v ",version," äëÿ KolibriOS",13,10,13,10
1296
     db  "Statistics: (before current request)",13,10,13,10
1264
     db  "Ñòàòèñòèêà: (ïîñëå äàííîãî çàïðîñà)",13,10,13,10
1297
sms: db  "- Documents served  : xxxxxxxxx",13,10
1265
sms: db  "- Äîêóìåíòîâ ïðèíÿòî: xxxxxxxxx",13,10
1298
smb: db  "- Bytes transferred : xxxxxxxxx",13,10
1266
smb: db  "- Áàéò ïåðåäàííî    : xxxxxxxxx",13,10
1299
     db  "- Location          : /TinyStat",13,10,13,10
1267
     db  "- Ìåñòîíàõîæäåíèå   : Ñòàòèñòèêà",13,10,13,10
1300
     db  "TinyBoard:",13,10,13,10
1268
     db  "Ãîñòåâàÿ:",13,10,13,10
1301
smm: db  "- Messages          : xxxxxxxxx",13,10
1269
smm: db  "- Ñîîáùåíèé         : xxxxxxxxx",13,10
1302
smz: db  "- Size in bytes     : xxxxxxxxx",13,10
1270
smz: db  "- Ðàçìåð â áàéòàõ   : xxxxxxxxx",13,10
1303
     db  "- Location          : /TinyBoard",13,10,13,10
1271
     db  "- Ìåñòîíàõîæäåíèå   : Ãîñòåâàÿ",13,10,13,10
1304
smt: db  "xx:xx:xx",13,10
1272
smt: db  "xx:xx:xx",13,10
1305
smd: db  "xx.xx.xx",13,10
1273
smd: db  "xx.xx.xx",13,10
1306
     db  '
'
1274
     db  '
'
1307
sme:
1275
sme:
1308
 
1276
 
1309
documents_served  dd  0x0
1277
documents_served  dd  0x0
1310
bytes_transferred dd  0x0
1278
bytes_transferred dd  0x0
1311
 
1279
 
1312
file_type  dd  0
1280
file_type  dd  0
1313
type_len   dd  0
1281
type_len   dd  0
1314
 
1282
 
1315
htm:   db  'Content-Type: text/html',13,10,13,10
1283
htm:   db  'Content-Type: text/html',13,10,13,10
1316
html:
1284
html:
1317
txt:   db  'Content-Type: text/plain',13,10,13,10
1285
txt:   db  'Content-Type: text/plain',13,10,13,10
1318
txtl:
1286
txtl:
1319
png:   db  'Content-Type: image/png',13,10,13,10
1287
png:   db  'Content-Type: image/png',13,10,13,10
1320
pngl:
1288
pngl:
1321
gif:   db  'Content-Type: image/gif',13,10,13,10
1289
gif:   db  'Content-Type: image/gif',13,10,13,10
1322
gifl:
1290
gifl:
1323
jpg:   db  'Content-Type: image/jpeg',13,10,13,10
1291
jpg:   db  'Content-Type: image/jpeg',13,10,13,10
1324
jpgl:
1292
jpgl:
1325
unk:   db  'Content-Type: unknown/unknown',13,10,13,10
1293
unk:   db  'Content-Type: unknown/unknown',13,10,13,10
1326
unkl:
1294
unkl:
1327
 
1295
 
1328
 
1296
 
1329
 labelt:  db   'Tiny http server ',version
-
 
1330
 labellen:
1297
header db   appname,version,0
1331
 
1298
 
1332
socket          dd  0x0
1299
socket		dd  0x0
1333
server_active   db  0x0
1300
server_active	db  0x0
1334
 
1301
 
1335
board:
1302
board:
-
 
1303
 
1336
 
1304
db "INTKolibriOS - /Ãîñòåâàÿ/",13,10
1337
db "
",13,10
1305
db "
",13,10
1338
db "
",13,10
1306
db "
",13,10
1339
db ""
1307
db ""
1340
db 13,10
1308
db 13,10
1341
db "
",13,10 1309
db "
",13,10
1342
db "Tinyserver Messageboard

",13,10
1310
db "Ãîñòåâàÿ ñåðâåðà INTKolibriOS

",13,10
1343
db ""
1311
db """,13,10",13,10",13,10",13,10",13,10,13,10",13,10,13,10
1344
db 13,10,13,10
1312
db 13,10,13,10
1345
 
1313
 
1346
board1:
1314
board1:
1347
 
1315
 
1348
db "
1316
db "
1349
db "

",13,10

1317
db "

",13,10

1350
db "",13,10
1318
db "",13,10
1351
board1e:
1319
board1e:
1352
db "WebMaster",13,10
1320
db "Hex",13,10
1353
board2:
1321
board2:
1354
db "",13,10
1322
db "",13,10
1355
db "


",13,10
1323
db "


",13,10
1356
db "



",13,10
1324
db "



",13,10
1357
bsmt:
1325
bsmt:
1358
db "12.23.45
",13,10
1326
db "15.23.45
",13,10
1359
bsmd:
1327
bsmd:
1360
db "02.05.03",13,10
1328
db "22.03.06",13,10
1361
db "

1329
db "

1362
db "

",13,10

1330
db "

",13,10

1363
board2e:
1331
board2e:
1364
db "Assembly written messageboard from assembly written MenuetOS.
"
1332
db "Äîáðî ïîæàëîâàòü â ãîñòåâóþ ñåðâåðà INTKolibriOS! (-:
"
1365
db 13,10
1333
db 13,10
1366
board3:
1334
board3:
1367
db "

1335
db "

1368
board3e:
1336
board3e:
1369
 
1337
 
1370
boardadd:
1338
boardadd:
1371
 
1339
 
1372
db "
",13,10
1340
db "
",13,10
1373
db "
",13,10
1341
db "
",13,10
1374
db ""
1342
db """,13,10",13,10",13,10",13,10
1375
db 13,10
1343
db 13,10
1376
db "
1344
db "
1377
db "

",13,10

1345
db "

",13,10

1378
db "
",13,10
1346
db "",13,10
1379
db "Name: 

",13,10
1347
db "Èìÿ: 

",13,10
1380
db "Message: 

",13,10
1348
db "Ñîîáùåíèå: 

",13,10
1381
db "",13,10
1349
db "",13,10
1382
db "
1350
db "
1383
db "
",13,10
1351
db "
",13,10
1384
db "",13,10
1352
db "",13,10
1385
db "",13,10
1353
db "",13,10
1386
 
1354
 
1387
board_end:
1355
board_end:
1388
 
1356
 
1389
board_size      dd  0x0
1357
board_size	dd  0x0
1390
board_messages  dd  0x0
1358
board_messages	dd  0x0
1391
 
1359
 
1392
input_text:
1360
input_text:
1393
 
1361
 
1394
I_END:
















1362
I_END: