Subversion Repositories Kolibri OS

Rev

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

Rev 1302 Rev 1323
Line 849... Line 849...
849
;   Outputs
849
;   Outputs
850
;       None
850
;       None
851
;
851
;
852
;***************************************************************************
852
;***************************************************************************
853
sendDir:
853
sendDir:
-
 
854
        mov     eax, text+0x4000
-
 
855
        mov     [fsize], eax
854
        mov     ebx, dirinfoblock
856
        mov     ebx, dirinfoblock
855
        and     dword [ebx+4], 0        ; start from zero block
857
        and     dword [ebx+4], 0        ; start from zero block
856
sd001:
858
sd001:
857
; Read the next DirBlocksPerCall (=16) blocks
859
; Read the next DirBlocksPerCall (=16) blocks
858
        mov     eax, 70
860
        mov     eax, 70
Line 972... Line 974...
972
        stosb
974
        stosb
973
        mov     al, 0x0A
975
        mov     al, 0x0A
974
        stosb
976
        stosb
975
; Send the completed line to the user over data socket
977
; Send the completed line to the user over data socket
976
        push    esi
978
        push    esi
-
 
979
        push    edi
977
        mov     esi, dirStr
980
        mov     esi, dirStr
978
        mov     edx, edi
981
        mov     ecx, edi
-
 
982
        sub     ecx, esi
-
 
983
        mov     edi, [fsize]
-
 
984
        cld
-
 
985
        rep     movsb
-
 
986
        mov     [fsize], edi
-
 
987
        cmp     edi, text+0x4400
-
 
988
        jb      @f
-
 
989
        mov     esi, text+0x4000
-
 
990
        mov     edx, [fsize]
979
        sub     edx, esi
991
        sub     edx, esi
-
 
992
        mov     [fsize], esi
980
        call    outputDataStr
993
        call    outputDataStr
-
 
994
 
-
 
995
@@:
-
 
996
        pop     edi
981
        pop     esi
997
        pop     esi
Line 982... Line 998...
982
 
998
 
983
sd003:                  ; Move to next entry in the block
999
sd003:                  ; Move to next entry in the block
984
        pop     ebx
1000
        pop     ebx
Line 988... Line 1004...
988
        mov     ebx, dirinfoblock
1004
        mov     ebx, dirinfoblock
989
        add     dword [ebx+4], DirBlocksPerCall
1005
        add     dword [ebx+4], DirBlocksPerCall
990
        jmp     sd001
1006
        jmp     sd001
Line 991... Line 1007...
991
 
1007
 
-
 
1008
sd_exit:
-
 
1009
        mov     esi, text+0x4000
-
 
1010
        mov     edx, [fsize]
-
 
1011
        sub     edx, esi
992
sd_exit:
1012
        call    outputDataStr
Line 1143... Line 1163...
1143
    mov     eax, 53
1163
    mov     eax, 53
1144
    mov     ebx, 11                 ; Get a bytes from socket
1164
    mov     ebx, 11                 ; Get a bytes from socket
1145
    mov     ecx, [DataSocket]
1165
    mov     ecx, [DataSocket]
1146
    mov     edx, text + 0x1300
1166
    mov     edx, text + 0x1300
1147
    add     edx, dword [fsize]
1167
    add     edx, dword [fsize]
-
 
1168
    xor     esi, esi
1148
    mcall                           ; returned data len in eax
1169
    mcall                           ; returned data len in eax
1149
    add     dword [fsize], eax
1170
    add     dword [fsize], eax
Line 1150... Line 1171...
1150
 
1171