Subversion Repositories Kolibri OS

Rev

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

Rev 135 Rev 154
Line 298... Line 298...
298
 int 0x40
298
 int 0x40
Line 299... Line 299...
299
 
299
 
300
 mov eax,0
300
 mov eax,0
301
 mov ebx,100*65536+492
301
 mov ebx,100*65536+492
302
 mov ecx,100*65536+280
302
 mov ecx,100*65536+280
303
 mov edx,0x3000000
-
 
304
 mov esi,0x805080d0
303
 mov edx,0x13000000
305
 mov edi,0x005080d0
304
 mov edi,title
Line 306... Line -...
306
 int 0x40
-
 
307
 
-
 
308
 mov eax,4
-
 
309
 mov ebx,8*65536+8
-
 
310
 mov ecx,0x10ddeeff
-
 
311
 mov edx,title
-
 
312
 mov esi,title_end-title
-
 
313
 int 0x40
-
 
314
 
-
 
315
; mov eax,8
-
 
316
; mov ebx,(492-19)*65536+12
-
 
317
; mov ecx,5*65536+12
-
 
318
; mov edx,1
-
 
319
; mov esi,0x6688dd
-
 
320
; int 0x40
305
 int 0x40
321
 
306
 
322
 mov eax,12
307
 mov eax,12
Line 323... Line 308...
323
 mov ebx,2
308
 mov ebx,2
Line 479... Line 464...
479
 jmp ecmd
464
 jmp ecmd
Line 480... Line 465...
480
 
465
 
481
ls:
466
ls:
482
 call oldcmd
467
 call oldcmd
483
 call cls2
-
 
-
 
468
 call cls2
484
 
469
	and	dword [dirinfo+4], 0
485
loopls:
-
 
Line 486... Line 470...
486
 inc dword [blockcnt]
470
loopls:
487
 
471
 
488
 mov eax,34
-
 
489
 mov ebx,0
-
 
490
 mov ecx,0
-
 
491
 mov edx,0
-
 
492
 add edx,dword [blockcnt]
-
 
493
 mov esi,1
472
	mov	eax, 70
494
 mov edi,tic_table+7000
-
 
495
 int 0x40
473
	mov	ebx, dirinfo
496
 
474
	int	0x40
497
 mov ecx,16
475
	inc	dword [dirinfo+4]
498
loop40:
-
 
499
 push ecx
-
 
500
 
476
	cmp	ebx, 1
501
 cld
477
	jnz	ls_end
502
 mov ecx,8
-
 
503
 mov edi,filename
-
 
504
 mov esi,tic_table
-
 
505
 add esi,dword [lscnt]
-
 
506
 rep movsb
-
 
507
 
478
	mov	esi, direntry_buffer+32+40
508
 add dword [lscnt],8
-
 
509
 
-
 
510
 mov edi,filename+8
479
	mov	edi, filename
511
 mov esi,ddot
-
 
512
 movsb
480
@@:
513
 
-
 
514
 cld
-
 
515
 mov ecx,3
481
	lodsb
516
 mov edi,filename+9
-
 
517
 mov esi,tic_table
482
	stosb
518
 add esi,dword [lscnt]
-
 
519
 rep movsb
-
 
520
 
-
 
521
 cmp byte [filename+10],0
483
	test	al, al
522
 jne no_fn_space1
484
	jnz	@b
523
 
485
@@:
524
 mov edi,filename+10
486
	cmp	edi, filename+12
525
 mov esi,dzero
-
 
526
 movsb
-
 
527
 
-
 
528
no_fn_space1:
-
 
529
 cmp byte [filename],0xe5  ; deleted file
-
 
530
 je no_newline
-
 
531
 cmp byte [filename],0xf   ; long fat32 filename
-
 
532
 je no_newline
-
 
533
 cmp byte [filename],0x10  ; folder
-
 
534
 je no_newline
-
 
535
 
-
 
536
 cmp word [filename],'AK'
-
 
537
 jne filename_ok
-
 
538
 cmp byte [filename+3],'e'
-
 
539
 jne filename_ok
-
 
540
 cmp byte [filename+5],'y'
-
 
541
 jne filename_ok
-
 
542
 cmp byte [filename+7],'a'
-
 
543
 jne filename_ok
-
 
544
 cmp byte [filename+10],'s'
-
 
545
 jne filename_ok
-
 
546
 
-
 
547
 jmp no_newline
-
 
548
 
-
 
549
filename_ok:
-
 
550
 mov eax,6
-
 
551
 mov ebx,filename
-
 
552
 mov ecx,0
-
 
553
 mov edx,-1
487
	jae	ls_print
554
 mov esi,tic_table+25000
-
 
555
 int 0x40
-
 
556
 
-
 
557
 cmp eax,4294967295
-
 
558
 jne ls_print
-
 
Line 559... Line 488...
559
 
488
	stosb
560
 jmp no_newline
489
	jmp	@b
Line 561... Line 490...
561
 
490
 
Line 576... Line 505...
576
 mov dword [ypos],6
505
 mov dword [ypos],6
577
 call newline
506
 call newline
Line 578... Line 507...
578
 
507
 
579
no_newline:
508
no_newline:
580
 add dword [lscnt],24
-
 
581
 
-
 
582
 pop ecx
-
 
583
 dec ecx
-
 
584
 cmp ecx,0
-
 
585
 jne loop40
-
 
586
 
-
 
587
 cmp dword [blockcnt],16
-
 
588
 je ls_end
-
 
589
 
509
 add dword [lscnt],24
Line 590... Line 510...
590
 jmp no_pause2
510
 jmp no_pause2
591
 
511
 
Line 602... Line 522...
602
 mov dword [lscnt],8024
522
 mov dword [lscnt],8024
Line 603... Line 523...
603
 
523
 
Line 604... Line 524...
604
 jmp loopls
524
 jmp loopls
605
 
-
 
606
ls_end:
525
 
607
 mov dword [blockcnt],0
526
ls_end:
608
 mov dword [lscnt],8024
527
 mov dword [lscnt],8024
Line 609... Line 528...
609
 mov byte [lscntf],0
528
 mov byte [lscntf],0
610
 mov byte [lscntx],0
529
 mov byte [lscntx],0
Line 611... Line 530...
611
 
530
 
Line 612... Line 531...
612
 cmp byte [callp],1
531
 cmp byte [callp],1
613
 je go
-
 
614
 
-
 
615
 jmp ecmd2
-
 
Line 616... Line 532...
616
 
532
 je go
617
ls_print:
533
 
618
 mov edi,filename+8
534
 jmp ecmd2
619
 mov esi,fill1
535
 
Line 2126... Line 2042...
2126
 mov edi,tic_table+400
2042
 mov edi,tic_table+400
2127
 add edi,edx
2043
 add edi,edx
2128
 mov esi,qspace
2044
 mov esi,qspace
2129
 rep movsb
2045
 rep movsb
Line 2130... Line -...
2130
 
-
 
2131
 mov eax,19
2046
 
2132
 mov ebx,tic_table+400
2047
 mov ebx,tic_table+400
2133
 mov ecx,tic_table+800
2048
 mov ecx,tic_table+800
Line 2134... Line 2049...
2134
 int 0x40
2049
 call start_rd_app
2135
 
2050
 
Line 2136... Line 2051...
2136
 cmp eax,0xfffffff0
2051
 cmp eax,0xfffffff0
Line 2158... Line 2073...
2158
 
2073
 
Line 2159... Line 2074...
2159
 jmp gonext
2074
 jmp gonext
2160
 
2075
 
2161
cls1:
2076
cls1:
2162
 mov eax,13
2077
 mov eax,13
2163
 mov ebx,6*65536+486
2078
 mov ebx,6*65536+483
2164
 mov ecx,24*65536+250
2079
 mov ecx,24*65536+250
2165
 mov edx,0
2080
 mov edx,0
Line 2519... Line 2434...
2519
 mov edi,tic_table+600
2434
 mov edi,tic_table+600
2520
 add edi,dword [count]
2435
 add edi,dword [count]
2521
 mov esi,qspace
2436
 mov esi,qspace
2522
 rep movsb
2437
 rep movsb
Line 2523... Line -...
2523
 
-
 
2524
 mov eax,19
2438
 
2525
 mov ebx,tic_table+600
2439
 mov ebx,tic_table+600
2526
 mov ecx,0
2440
 mov ecx,0
Line 2527... Line 2441...
2527
 int 0x40
2441
 call start_rd_app
2528
 
2442
 
Line 2529... Line 2443...
2529
 cmp eax,0xfffffff0
2443
 cmp eax,0xfffffff0
Line 2827... Line 2741...
2827
 pop ecx
2741
 pop ecx
2828
 loop loopex
2742
 loop loopex
Line 2829... Line 2743...
2829
 
2743
 
Line -... Line 2744...
-
 
2744
 ret
-
 
2745
 
-
 
2746
start_rd_app:
-
 
2747
        push    edi
-
 
2748
        mov     edi, fileinfo_buffer
-
 
2749
        mov     eax, '/rd/'
-
 
2750
        stosd
-
 
2751
        mov     ax, '1/'
-
 
2752
        stosw
-
 
2753
        push    esi
-
 
2754
        mov     esi, ebx
-
 
2755
        movsd
-
 
2756
        movsd
-
 
2757
        pop     esi
-
 
2758
@@:
-
 
2759
        dec     edi
-
 
2760
        cmp     byte [edi], ' '
-
 
2761
        jz      @b
-
 
2762
        mov     byte [edi+1], 0
-
 
2763
        pop     edi
-
 
2764
        mov     eax, 70
-
 
2765
        mov     ebx, fileinfo_start
-
 
2766
        mov     [ebx+8], ecx
-
 
2767
        int     0x40
-
 
2768
        ret
-
 
2769
fileinfo_start:
-
 
2770
        dd      7
-
 
2771
        dd      0
-
 
2772
        dd      ?
-
 
2773
        dd      0
-
 
2774
        dd      0
-
 
2775
        db      0
2830
 ret
2776
        dd      fileinfo_buffer
2831
 
2777
 
2832
title:
-
 
Line 2833... Line 2778...
2833
 db 'CMD - Command line interpreter'
2778
title:
Line 2834... Line 2779...
2834
title_end:
2779
 db 'CMD - Command line interpreter',0
2835
 
2780
 
Line 2975... Line 2920...
2975
fill1 db ' '
2920
fill1 db ' '
2976
fill3 db '   ',0
2921
fill3 db '   ',0
Line 2977... Line 2922...
2977
 
2922
 
2978
pname      db '            ',0
2923
pname      db '            ',0
2979
autoexfile db 'AUTOEXEC.CMD',0
-
 
Line 2980... Line 2924...
2980
filename   db '            ',0
2924
autoexfile db 'AUTOEXEC.CMD',0
2981
 
2925
 
Line 2982... Line 2926...
2982
dzero db 0,0,0,0
2926
dzero db 0,0,0,0
Line 2991... Line 2935...
2991
 
2935
 
Line 2992... Line 2936...
2992
ipccount dd 0
2936
ipccount dd 0
Line -... Line 2937...
-
 
2937
 
-
 
2938
cmd_ex db 0
-
 
2939
 
-
 
2940
dirinfo:
-
 
2941
	dd	1
-
 
2942
	dd	0
-
 
2943
	dd	0
-
 
2944
	dd	1
2993
 
2945
	dd	direntry_buffer
2994
cmd_ex db 0
2946
	db	'/RD/1',0
2995
 
2947
 
2996
ipcb:
2948
ipcb:
2997
 db 0
2949
 db 0
Line 3004... Line 2956...
3004
 db 0,0,0
2956
 db 0,0,0
3005
 dd 8
2957
 dd 8
3006
times 110 db 0
2958
times 110 db 0
Line 3007... Line 2959...
3007
 
2959
 
-
 
2960
I_END:
-
 
2961
fileinfo_buffer rb 64
3008
I_END:
2962
direntry_buffer rb 32+304
3009
 
2963
filename rb 260
3010
tic_table:
2964
tic_table: