26,10 → 26,10 |
dd START ; program start |
dd I_END ; program image size |
dd 0x400000 ; required amount of memory |
dd 0x400000 |
dd 0x20000 |
dd 0,0 ; reserved=no extended header |
|
include "..\..\..\MACROS.INC" |
include "MACROS.INC" |
|
; 0x0+ - program image |
; 0x1ffff - stack |
57,7 → 57,7 |
|
mov eax,70 |
mov ebx,filel |
mcall |
int 0x40 |
mov [board_size],ebx |
cmp eax,0 |
je board_found |
75,7 → 75,7 |
mov ebx,files |
mov ecx,[board_size] |
mov [files+12],ecx |
mcall |
int 0x40 |
|
mov [status],-1 |
mov [last_status],-2 |
98,10 → 98,10 |
|
mov eax,5 |
mov ebx,1 |
mcall |
int 0x40 |
|
mov eax,11 |
mcall |
int 0x40 |
call check_events |
|
jmp still |
121,13 → 121,13 |
|
key: ; Keys are not valid at this part of the |
mov al,2 ; loop. Just read it and ignore |
mcall |
int 0x40 |
ret |
|
button: ; button |
|
mov al,17 ; get id |
mcall |
int 0x40 |
|
cmp ah,1 ; close |
jnz tst2 |
134,9 → 134,9 |
mov eax,53 |
mov ebx,8 |
mov ecx,[socket] |
mcall |
int 0x40 |
mov eax,-1 |
mcall |
int 0x40 |
tst2: |
|
cmp ah,2 ; button id=2 ? |
149,7 → 149,7 |
mov edx,0 ; no remote port specified |
mov esi,0 ; no remote ip specified |
mov edi,0 ; PASSIVE open |
mcall |
int 0x40 |
mov [socket], eax |
mov [posy],1 |
mov [posx],0 |
167,14 → 167,14 |
mov eax,53 |
mov ebx,8 |
mov ecx,[socket] |
mcall |
int 0x40 |
mov eax,5 |
mov ebx,2 |
mcall |
int 0x40 |
mov eax,53 |
mov ebx,8 |
mov ecx,[socket] |
mcall |
int 0x40 |
|
cmp [server_active],1 |
jne no_re_open |
184,7 → 184,7 |
mov edx,0 ; no remote port specified |
mov esi,0 ; no remote ip specified |
mov edi,0 ; PASSIVE open |
mcall |
int 0x40 |
mov [socket], eax |
no_re_open: |
|
245,7 → 245,7 |
je data_received |
mov eax,5 |
mov ebx,1 |
mcall |
int 0x40 |
dec [retries] |
jnz wait_for_data |
jmp no_http_request |
280,7 → 280,7 |
mov ebx,7 |
mov ecx,[socket] |
mov esi,[filepos] |
mcall |
int 0x40 |
|
mov eax,esi |
add eax,edx |
312,16 → 312,16 |
|
mov eax,5 |
mov ebx,1 |
mcall |
int 0x40 |
|
mov eax,11 |
mcall |
int 0x40 |
call check_events |
|
mov eax,53 |
mov ebx,255 |
mov ecx,103 |
mcall |
int 0x40 |
|
cmp eax,0 |
je no_wait_more |
346,7 → 346,7 |
mov ebx,115*65536+8*6 |
mov ecx,178*65536+10 |
mov edx,0xffffff |
mcall |
int 0x40 |
|
mov eax,47 |
mov ebx,8*65536 |
353,7 → 353,7 |
mov ecx,edi |
mov edx,115*65536+178 |
mov esi,0x000000 |
mcall |
int 0x40 |
|
popa |
ret |
368,7 → 368,7 |
mov ecx,[socket] |
mov edx,h_len-html_header |
mov esi,html_header |
mcall |
int 0x40 |
|
mov eax,53 ; send file type |
mov ebx,7 |
375,7 → 375,7 |
mov ecx,[socket] |
mov edx,[type_len] |
mov esi,[file_type] |
mcall |
int 0x40 |
|
popa |
ret |
437,7 → 437,7 |
|
mov eax,70 |
mov ebx,filel |
mcall |
int 0x40 |
mov [board_size],ebx |
|
cmp [input_text+256+1],dword 'POST' |
599,7 → 599,7 |
|
mov eax,70 |
mov ebx,files |
mcall |
int 0x40 |
|
no_new_message: |
mov esi,0x20000 |
769,7 → 769,7 |
mov [fileinfo+12],dword 1 ; file exists ? |
mov eax,70 |
mov ebx,fileinfo |
mcall |
int 0x40 |
|
cmp eax,0 ; file not found - message |
je file_found |
795,7 → 795,7 |
mov [fileinfo+12],dword 0x2f0000 ; read all of file |
mov eax,70 |
mov ebx,fileinfo |
mcall |
int 0x40 |
|
file_not_found: |
file_loaded: |
855,7 → 855,7 |
pusha |
|
mov eax,3 |
mcall |
int 0x40 |
|
mov ecx,3 |
new_time_digit: |
880,7 → 880,7 |
pusha |
|
mov eax,29 |
mcall |
int 0x40 |
|
mov ecx,3 |
add edi,6 |
910,7 → 910,7 |
mov eax, 53 |
mov ebx, 2 |
mov ecx, [socket] |
mcall |
int 0x40 |
|
cmp eax,0 |
je _ret_now |
920,7 → 920,7 |
mov eax,53 |
mov ebx,2 |
mov ecx,[socket] |
mcall |
int 0x40 |
|
cmp eax,0 |
je _ret |
928,7 → 928,7 |
mov eax,53 |
mov ebx,3 |
mov ecx,[socket] |
mcall |
int 0x40 |
|
cmp bl,10 |
jne no_lf |
964,7 → 964,7 |
jne no_ld |
mov ebx,50 |
no_ld: |
mcall |
int 0x40 |
|
jmp check |
|
985,7 → 985,7 |
mov eax,53 |
mov ebx,6 |
mov ecx,[socket] |
mcall |
int 0x40 |
|
cmp eax,[status] |
je c_ret |
1021,11 → 1021,11 |
|
f11: |
mov eax,10 |
mcall |
int 0x40 |
cmp eax,2 |
jne read_done |
mov eax,2 |
mcall |
int 0x40 |
shr eax,8 |
cmp eax,13 |
je read_done |
1083,7 → 1083,7 |
mov ecx,0x40000000 |
mov esi,23 |
mov edi,0xffffff |
mcall |
int 0x40 |
|
popa |
ret |
1098,7 → 1098,7 |
|
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
mcall |
int 0x40 |
|
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
1105,8 → 1105,8 |
mov ebx,100*65536+480 ; [x start] *65536 + [x size] |
mov ecx,100*65536+215 ; [y start] *65536 + [y size] |
mov edx,0x13ffffff ; color of work area RRGGBB |
mov edi,title ; WINDOW LABEL |
mcall |
mov edi,header ; WINDOW LABEL |
int 0x40 |
|
mov eax,8 ; function 8 : define and draw button |
mov ebx,(40)*65536+20 ; [x start] *65536 + [x size] |
1113,7 → 1113,7 |
mov ecx,59*65536+9 ; [y start] *65536 + [y size] |
mov edx,2 ; button id |
mov esi,0x66aa66 ; button color RRGGBB |
mcall |
int 0x40 |
|
; function 8 : define and draw button |
mov ebx,(40)*65536+20 ; [x start] *65536 + [x size] |
1120,7 → 1120,7 |
mov ecx,72*65536+9 ; [y start] *65536 + [y size] |
mov edx,4 ; button id |
mov esi,0xaa6666 ; button color RRGGBB |
mcall |
int 0x40 |
|
; Enter directory |
mov ebx,(25)*65536+66 |
1127,25 → 1127,25 |
mov ecx,135*65536+15 |
mov edx,6 |
mov esi,0x3388dd |
mcall |
int 0x40 |
|
mov eax,38 |
mov ebx,240*65536+240 |
mov ecx,22*65536+210 |
mov edx,0x6699cc ; 002288 |
mcall |
int 0x40 |
|
|
mov ebx,241*65536+241 |
mov ecx,22*65536+210 |
mov edx,0x336699 ; 002288 |
mcall |
int 0x40 |
|
call draw_data |
|
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
mcall |
int 0x40 |
|
ret |
|
1158,7 → 1158,6 |
mov ecx,0x000000 |
mov edx,text |
mov esi,35 |
mov eax,13 |
newline: |
pusha |
cmp ebx,25*65536+61 |
1171,12 → 1170,13 |
mov bx,35*6 |
shl ecx,16 |
mov cx,9 |
mov eax,13 |
mov edx,0xffffff |
mcall |
int 0x40 |
now: |
popa |
mov eax,4 |
mcall |
int 0x40 |
add ebx,13 |
add edx,40 |
cmp [edx],byte 'x' |
1199,10 → 1199,10 |
mov cx,9 |
mov eax,13 |
mov edx,0xffffff |
mcall |
int 0x40 |
popa |
mov eax,4 |
mcall |
int 0x40 |
add ebx,10 |
add edx,256 |
dec edi |
1294,7 → 1294,7 |
unkl: |
|
|
title db appname,version,0 |
header db appname,version,0 |
|
socket dd 0x0 |
server_active db 0x0 |