Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DOS error code question

8 views
Skip to first unread message

Ed

unread,
Apr 19, 2013, 7:28:02 AM4/19/13
to
According to the MS-DOS docs, the following error codes
are generated when INT21 functions CREATE WRITE fail:

Int 21 3C CREAT - errors 3, 4, 5
Int 21 40 WRITE - errors 5, 6

So what happens when:
- there is no more directory space (CREAT)
- there are no more disk blocks (WRITE)

None of the codes above seem to cover this (?) Does
DOS simply terminate the program?

Thanks.





Steve

unread,
Apr 19, 2013, 8:04:38 AM4/19/13
to
Hi Ed,

"Ed" <inv...@nospam.com> writes:
>According to the MS-DOS docs, the following error codes
>are generated when INT21 functions CREATE WRITE fail:
>
>Int 21 3C CREAT - errors 3, 4, 5
>Int 21 40 WRITE - errors 5, 6
>
>So what happens when:
>- there is no more directory space (CREAT)

You get error 5, ACCESS_DENIED (MS-DOS 5.0 Programmer's
Reference).

>- there are no more disk blocks (WRITE)
>

You check register AX to find out how many bytes were actually
written (ibid).

>None of the codes above seem to cover this (?) Does
>DOS simply terminate the program?

No. See above.

HTH,

Steve N.

Ed

unread,
Apr 19, 2013, 8:54:00 AM4/19/13
to
Steve wrote:
> Hi Ed,
>
> "Ed" <inv...@nospam.com> writes:
> >According to the MS-DOS docs, the following error codes
> >are generated when INT21 functions CREATE WRITE fail:
> >
> >Int 21 3C CREAT - errors 3, 4, 5
> >Int 21 40 WRITE - errors 5, 6
> >
> >So what happens when:
> >- there is no more directory space (CREAT)
>
> You get error 5, ACCESS_DENIED (MS-DOS 5.0 Programmer's
> Reference).
>
> >- there are no more disk blocks (WRITE)
> >
>
> You check register AX to find out how many bytes were actually
> written (ibid).
> ...

Thanks Steve. I'm implementing DOS-style file handling on a
CP/M compiler and wanted to use the same error codes as DOS...



0 new messages