Subversion Repositories Kolibri OS

Rev

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

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

Error 404 - File not found

",13,10,13,10
1252
     db  "

Error 404 - File not found

",13,10,13,10
1253
     db  "Äëÿ ïîëó÷åíèÿ ñòàòèñòèêè âûïîëíèòå çàïðîñ /TinyStat",13,10,13,10
1253
     db  "Äëÿ ïîëó÷åíèÿ ñòàòèñòèêè âûïîëíèòå çàïðîñ /TinyStat",13,10,13,10
1254
et:  db  "xx:xx:xx",13,10
1254
et:  db  "xx:xx:xx",13,10
1255
ed:  db  "xx.xx.xx",13,10
1255
ed:  db  "xx.xx.xx",13,10
1256
     db  "
"
1256
     db  "
"
1257
fnfe:
1257
fnfe:
1258
 
1258
 
1259
 
1259
 
1260
sm:
1260
sm:
1261
     db  ''
1261
     db  ''
1262
     db  '
'
1262
     db  '
'
1263
     db  "HTTP-Ñåðâåð v ",version," äëÿ KolibriOS",13,10,13,10
1263
     db  "HTTP-Ñåðâåð v ",version," äëÿ KolibriOS",13,10,13,10
1264
     db  "Ñòàòèñòèêà: (ïîñëå äàííîãî çàïðîñà)",13,10,13,10
1264
     db  "Ñòàòèñòèêà: (ïîñëå äàííîãî çàïðîñà)",13,10,13,10
1265
sms: db  "- Äîêóìåíòîâ ïðèíÿòî: xxxxxxxxx",13,10
1265
sms: db  "- Äîêóìåíòîâ ïðèíÿòî: xxxxxxxxx",13,10
1266
smb: db  "- Áàéò ïåðåäàííî    : xxxxxxxxx",13,10
1266
smb: db  "- Áàéò ïåðåäàííî    : xxxxxxxxx",13,10
1267
     db  "- Ìåñòîíàõîæäåíèå   : Ñòàòèñòèêà",13,10,13,10
1267
     db  "- Ìåñòîíàõîæäåíèå   : Ñòàòèñòèêà",13,10,13,10
1268
     db  "Ãîñòåâàÿ:",13,10,13,10
1268
     db  "Ãîñòåâàÿ:",13,10,13,10
1269
smm: db  "- Ñîîáùåíèé         : xxxxxxxxx",13,10
1269
smm: db  "- Ñîîáùåíèé         : xxxxxxxxx",13,10
1270
smz: db  "- Ðàçìåð â áàéòàõ   : xxxxxxxxx",13,10
1270
smz: db  "- Ðàçìåð â áàéòàõ   : xxxxxxxxx",13,10
1271
     db  "- Ìåñòîíàõîæäåíèå   : Ãîñòåâàÿ",13,10,13,10
1271
     db  "- Ìåñòîíàõîæäåíèå   : Ãîñòåâàÿ",13,10,13,10
1272
smt: db  "xx:xx:xx",13,10
1272
smt: db  "xx:xx:xx",13,10
1273
smd: db  "xx.xx.xx",13,10
1273
smd: db  "xx.xx.xx",13,10
1274
     db  '
'
1274
     db  '
'
1275
sme:
1275
sme:
1276
 
1276
 
1277
documents_served  dd  0x0
1277
documents_served  dd  0x0
1278
bytes_transferred dd  0x0
1278
bytes_transferred dd  0x0
1279
 
1279
 
1280
file_type  dd  0
1280
file_type  dd  0
1281
type_len   dd  0
1281
type_len   dd  0
1282
 
1282
 
1283
htm:   db  'Content-Type: text/html',13,10,13,10
1283
htm:   db  'Content-Type: text/html',13,10,13,10
1284
html:
1284
html:
1285
txt:   db  'Content-Type: text/plain',13,10,13,10
1285
txt:   db  'Content-Type: text/plain',13,10,13,10
1286
txtl:
1286
txtl:
1287
png:   db  'Content-Type: image/png',13,10,13,10
1287
png:   db  'Content-Type: image/png',13,10,13,10
1288
pngl:
1288
pngl:
1289
gif:   db  'Content-Type: image/gif',13,10,13,10
1289
gif:   db  'Content-Type: image/gif',13,10,13,10
1290
gifl:
1290
gifl:
1291
jpg:   db  'Content-Type: image/jpeg',13,10,13,10
1291
jpg:   db  'Content-Type: image/jpeg',13,10,13,10
1292
jpgl:
1292
jpgl:
1293
unk:   db  'Content-Type: unknown/unknown',13,10,13,10
1293
unk:   db  'Content-Type: unknown/unknown',13,10,13,10
1294
unkl:
1294
unkl:
1295
 
1295
 
1296
 
1296
 
1297
title db   appname,version,0
1297
title db   appname,version,0
1298
 
1298
 
1299
socket          dd  0x0
1299
socket          dd  0x0
1300
server_active   db  0x0
1300
server_active   db  0x0
1301
 
1301
 
1302
board:
1302
board:
1303
 
1303
 
1304
db "INTKolibriOS - /Ãîñòåâàÿ/",13,10
1304
db "INTKolibriOS - /Ãîñòåâàÿ/",13,10
1305
db "
",13,10
1305
db "
",13,10
1306
db "
",13,10
1306
db "
",13,10
1307
db ""
1307
db ""
1308
db 13,10
1308
db 13,10
1309
db "
",13,10 1309
db "
",13,10
1310
db "Ãîñòåâàÿ ñåðâåðà INTKolibriOS

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

",13,10
1311
db ""
1311
db """,13,10",13,10",13,10",13,10",13,10,13,10",13,10,13,10
1312
db 13,10,13,10
1312
db 13,10,13,10
1313
 
1313
 
1314
board1:
1314
board1:
1315
 
1315
 
1316
db "
1316
db "
1317
db "

",13,10

1317
db "

",13,10

1318
db "",13,10
1318
db "",13,10
1319
board1e:
1319
board1e:
1320
db "Hex",13,10
1320
db "Hex",13,10
1321
board2:
1321
board2:
1322
db "",13,10
1322
db "",13,10
1323
db "


",13,10
1323
db "


",13,10
1324
db "



",13,10
1324
db "



",13,10
1325
bsmt:
1325
bsmt:
1326
db "15.23.45
",13,10
1326
db "15.23.45
",13,10
1327
bsmd:
1327
bsmd:
1328
db "22.03.06",13,10
1328
db "22.03.06",13,10
1329
db "

1329
db "

1330
db "

",13,10

1330
db "

",13,10

1331
board2e:
1331
board2e:
1332
db "Äîáðî ïîæàëîâàòü â ãîñòåâóþ ñåðâåðà INTKolibriOS! (-:
"
1332
db "Äîáðî ïîæàëîâàòü â ãîñòåâóþ ñåðâåðà INTKolibriOS! (-:
"
1333
db 13,10
1333
db 13,10
1334
board3:
1334
board3:
1335
db "

1335
db "

1336
board3e:
1336
board3e:
1337
 
1337
 
1338
boardadd:
1338
boardadd:
1339
 
1339
 
1340
db "
",13,10
1340
db "
",13,10
1341
db "
",13,10
1341
db "
",13,10
1342
db ""
1342
db """,13,10",13,10",13,10",13,10
1343
db 13,10
1343
db 13,10
1344
db "
1344
db "
1345
db "

",13,10

1345
db "

",13,10

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

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

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

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

",13,10
1349
db "",13,10
1349
db "",13,10
1350
db "
1350
db "
1351
db "
",13,10
1351
db "
",13,10
1352
db "",13,10
1352
db "",13,10
1353
db "",13,10
1353
db "",13,10
1354
 
1354
 
1355
board_end:
1355
board_end:
1356
 
1356
 
1357
board_size      dd  0x0
1357
board_size      dd  0x0
1358
board_messages  dd  0x0
1358
board_messages  dd  0x0
1359
 
1359
 
1360
input_text:
1360
input_text:
1361
 
1361
 
1362
I_END:
















1362
I_END: