flat assembler
Message board for the users of flat assembler.

flat assembler > IDE Development > File selector in DOS IDE

Author
Thread Post new topic Reply to topic
DOS386



Joined: 08 Dec 2006
Posts: 1904
Thanks for cool addition Smile

It's very buggy however, and some more things:

- Changing DIR doesn't work in EDR-DOS. Reason: ..\ and BLAH\ - the blackslash at the end shouldn't be there (FreeDOS tolerates it, though)

- Related to above, unable to deal with failure of the change DIR call, tries to load the DIR as file or brew the "..\" directory. Should just report "Failure to change directory" and stay where it was.

- It "finds" ("parse from FCB" AH=$29 hack) one volume letter more than actually present, the last one doesn't work of course (and some buggy FreeDOS kernels will evaluate volumes A: to Z: all valid Shocked Sad )

- Can change volume by typing "E:" into the edit field, typing "E:\BLAH" however fails, should change to "E:", and then in "E:" to "\BLAH" (or try to change, leave as-is if call fails)

- File sizes are kept secret

- Attrib mask is $31, some files are missing, $37 would be better (not $3F of course)

- Files are sorted by Name-Ext, better would be Ext-Name

EDIT : kicked obsolete shot, there will be a new one ASAP Smile


Last edited by DOS386 on 26 Mar 2009, 15:35; edited 2 times in total
Post 07 Mar 2009, 09:47
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7289
Location: Kraków, Poland
Thanks for pointing out some important mistakes. I'm going to fix them this weekend, as I'm now at my old DOS machine. Smile

To change the directory, you have to write backslash at the end, like E:\BLAH\ - if you write it without backlash, it is assumed that you mean file name.

As for the shortages other than bugs, please be forgiving, but fasmd isn't really on top of what is wanted in the fasm's development and the only reason why I continue it is because of my sentiments. So it's very unlikely it'll become a top-notch product, but I try to make it at least basically usable.
Post 07 Mar 2009, 12:41
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
Tomasz Grysztar wrote:
To change the directory, you have to write backslash at the end, like E:\BLAH\


But EDR-DOS rejects pathes ending with a blackslash Sad ... also in its own CD command Sad

Quote:
if you write it without backlash, it is assumed that you mean file name.


But the "icons" are always correct (file, dir, volume) ... so why does it later try to load something as a file what used to be correctly recognized as directory ?

Quote:
shortages other than bugs, please be forgiving, but fasmd isn't really on top of what is wanted in the fasm's development and the only reason why I continue it is because of my sentiments. So it's very unlikely it'll become a top-notch product


It almost is Smile

Quote:
but I try to make it at least basically usable.


I can fix it myself ... a bit a pain with ZERO commenting, but doable. Wink
Post 07 Mar 2009, 12:57
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7289
Location: Kraków, Poland
DOS386 wrote:
Tomasz Grysztar wrote:
To change the directory, you have to write backslash at the end, like E:\BLAH\


But EDR-DOS rejects pathes ending with a blackslash Sad ... also in its own CD command Sad

What you write into the edit box is not necessarily the same what is then sent into OS. So that's not a problem - I just have to fix that bug.

DOS386 wrote:
Quote:
if you write it without backlash, it is assumed that you mean file name.


But the "icons" are always correct (file, dir, volume) ... so why does it later try to load something as a file what used to be correctly recognized as directory ?
What you write in edit box has nothing to do with list - you can write even a full path on completely different drive, etc. The list just provides a handy "shortcuts" to put the right things into edit box. And it attaches the ending backslash into the edit box appropriately.
Post 07 Mar 2009, 14:10
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
New in 1.67.35:

- Fixed directory change bug (now works up and down) Smile

- Added debug support in DOS IDE (oops forgot to test Neutral)

- Killed AbortRetryF*** :
Code:
        push    ds cs
       pop     ds
  mov     ax,2524h
    mov     dx,dos_error_handler
        int     21h
 pop     ds
    

Code:
  dos_error_handler:
       mov     al,3
        retfw
    


IIRC the DPMI host should care about this ... only a few buggy don't ... but shouldn't there be an IRET instead of RETF ? Confused

What remains is the invalid volume letter trouble: regrettably my post above is somewhat incorrect Sad about this, the "too much" letter is indeed reported as "valid" by the "FCB parse" hack, it's an inactive RAMDISK, and behaves the very same way as A: with no floppy in. But the bug is that any attempt to use an invalid letter from the list causes a mess:

Code:
        browser_drive_ok:
        push    0    ; <<<--- here
 cmp     dword [buffer],'..'
       jne     name_to_select_ok
   mov     edi,buffer+3000h
    mov     al,'\'
      find_last_directory_name:
    mov     esi,edi
     repne   scasb
       cmp     byte [edi],0
        jne     find_last_directory_name
    lea     ecx,[edi-1]
 sub     ecx,esi
     mov     edi,buffer+400h
     mov     [esp],ecx
   mov     ebx,upper_case_table
      get_name_to_select:
       lodsb
       xlatb
       stosb
       loop    get_name_to_select
      name_to_select_ok:
  mov     edi,buffer+3000h
    call    get_current_directory
       jc      browser_drive_invalid    ; <<<--- here
     cmp     byte [edi-2],'\'
 je      browser_new_path_ok
 mov     word [edi-1],'\'
      browser_new_path_ok:
       call    make_list_of_files
  call    draw_browser_path
   mov     ebx,filename_buffer
 xor     eax,eax
     mov     [ebx+8],eax
 mov     [ebx+12],eax
        mov     [ebx+16],al
 mov     ebx,boxes
   mov     esi,[file_list]
     mov     [ebx+12],esi
        mov     ecx,[file_list_buffer_top]
  sub     ecx,esi
     shr     ecx,2
       mov     [ebx+6],cx
  xor     eax,eax
     mov     [ebx+8],eax
 mov     eax,esi
     pop     edx   ; <<<--- here
      find_name_to_select:
    


I couldn't determine the purpose of the push 0 but I'm pretty sure it is the source of this BUG: if letter is invalid then the ZERO gets never POPE'd away and then the sub "RET"'s to address ZERO instead back where called from Sad
Post 12 Mar 2009, 01:08
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16631
Location: In your JS exploiting you and your system
DOS386 wrote:
Code:
...
        push    0    ; <<<--- here
...
  mov     [esp],ecx
...    
I couldn't determine the purpose of the push 0 ...
I would imagine that the value of ecx has some importance?
Post 12 Mar 2009, 02:32
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
revolution wrote:

Quote:
imagine that the value of ecx has some importance?


Indeed Laughing Still, the BUG was in there as I wrote above.

Tomasz wrote:

Quote:


















(nothing here in)

OTOH, he fixed the "IRET-BUG" and the "never-POPE'd-ZERO-BUG" , updated the (C)'s and silently uploaded new versions of DOS and Win32 packages Smile So the DOS directory browsing should be fully functional now (I'm going to test thoroughly). Thanks Smile
Post 13 Mar 2009, 01:24
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.