delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2005/04/24/11:19:12

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
From: <ams AT ludd DOT ltu DOT se>
Message-Id: <200504240601.j3O61FLD001553@speedy.ludd.ltu.se>
Subject: Re: DJGPP v2.04 Bugs - suggested patch
In-Reply-To: <01c53e48$Blat.v2.4$1e183ec0@zahav.net.il> "from Eli Zaretskii at
Apr 11, 2005 06:38:48 am"
To: djgpp-workers AT delorie DOT com
Date: Sun, 24 Apr 2005 08:01:15 +0200 (CEST)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
X-ltu-MailScanner-Information: Please contact the ISP for more information
X-ltu-MailScanner: Found to be clean
X-MailScanner-From: ams AT ludd DOT ltu DOT se
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to Eli Zaretskii:
> Therefore, I think we have some kind of bug here, which should be
> investigated.  The trick with a signal handler is just a means to ease
> that investigation.

I've done a simple test program to show that the bug is in the FreeDOS
kernel. This program written in djasm (I call it w.asm):
        .org 0x100

        mov     ax, 0x6c00
        mov     bx, 0x0001      ; Write only.
        xor     cx, cx
        mov     dx, 0x0011
        mov     si, file_name
        int     0x21

        mov     dx, open_failed_msg
        jc      error_exit

        mov     [ file_handle ], ax

write_more:
        mov     ah, 0x40
        mov     bx, [ file_handle ]
        mov     cx, file_data_size
        mov     dx, file_data
        int     0x21
        jc      write_error
        test    ax, ax
        jnz     write_more

write_error:
        mov     ah, 0x3e
        mov     bx, [ file_handle ]
        int     0x21

        mov     dx, end_msg

error_exit:
        mov     ah, 9
        int     0x21
        ret

file_data:
        .db     '0123456789'
        .db     0 .dup 128
file_data_size = . - file_data

file_handle:
        .dw     0
file_name:
        .db     'x', 0

open_failed_msg:
        .db     'Open failed.', 10, 13, '$'
end_msg:
        .db     'File written.', 10, 13, '$'


doesn't stop writing either (on FAT32).


Things to note:

1. FreeDOS doesn't need any FAT32 extended size flag (right now at least).

2. The kernel doesn't see when the file has reached maximum size.

3. On a FAT16 with ~800MB free, it stopped correctly.

4. In MS-DOS 7.<something>, I can't C-c it.

(5. This sucker is even slower than my other test program. Hence I
conclude DJGPP caching is working. 5 hours wasn't enough to reach 4GB,
at that point it the file was ~2.9GB. I ran it again and after C-c
after 10 hours I had a 4GB file. You've been warned.)


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019