I would like to know how difficult it would be to add support for
64-bit file operations to DJGPP. I suppose that DJGPP currently only
handles 32-bit file operations internally; is this assumption correct?
If yes, it would be necessary to extend the internal file handling
routines of DJGPP to 64 bit before any attempt to add support for new
APIs could be made.
Is anyone currently working on this, or has been working on this
before? If yes, I would be interested in his assessment. If not, what
would be a good starting point?
Regards,
Udo
> DJGPP relies on MS-DOS's file api, and MS-DOS doesn't support 64 bit
> operations.
The LFN API in MS-DOS 7.0 and higher already uses 64-bit file
operations in some functions, e.g. 714E/4Fh of Int 21h. Also, DOS is
still evolving, so newer DOS versions provide functions that old
versions lack.
For example, this is the new 64-bit LSEEK function of Enhanced DR-DOS,
which will also eventually be supported by FreeDOS:
--------O-2142-------------------------------
INT 21 - EDR-DOS 7.01.08+ - "Long LSEEK" - SET CURRENT 64-bit FILE
POSITION
AX = 7142h
CL = origin of move
00h start of file
01h current file position
02h end of file
BX = file handle
DS:DX = pointer to (signed) 64-bit offset from origin of new position
Return: CF clear if successful
DS:DX unchanged, new 64-bit position from start of file at ->
DS:DX
CF set on error
AX = error code (01h,06h) (see #01680 at AH=59h/BX=0000h)
For the moment, I would like to put the question of API support in the
OSes aside and concentrate on the implementation of 64-bit file support
in DJGPP itself.
Udo
For personal use, I compiled a very raw but complete list of every interrupt
called by every function for an older version of DJGPP. DJGPP version 3.4.1
calls about 170 DOS, BIOS, etc. interrupts. I'll just list the ones that
call 71xx functions below my signature. If you need to know which ones call
specific functions, just ask in this newsgroup or the other newsgroup you
post DR-DOS announcements too. Have you contacted Henrik Haftmann or Jason
Hood about 64-bit support in DOSLFN?
Rod Pemberton
71xx calls for DJGPP 3.4.1:
remove 713a 7141
_rename 7156
findfirst 714e 71a1
findnext 714f 71a1
_truename 7160
_chmode 7143
_flush_disk_cache 710d
_open 7160 7143 716c
_creat 716c
_creatnew 716c
_get_volume_info 71a0
_lfn_gen_short_fname 7100 71a8
direct_exec_tail_1 7160
_lfn_find_close 71a1
get_sft_entry 71a6
__get_current_directory 7147 7160
mkdir 7139
rmdir 713a
symlink 7160
__getcwd 7147 7160
__chdir 713b
utime 7143
Rod Pemberton a écrit:
> For personal use, I compiled a very raw but complete list of every interrupt
> called by every function for an older version of DJGPP. DJGPP version 3.4.1
What is this version number ? just curious...
Maurice
--
Maurice Lombardi
Laboratoire de Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:Maurice....@ujf-grenoble.fr
The unreleased, in limbo development tree v2.04 in cvs contains some
support for the larger file offsets. You could investigate and
contribute support.
> For the moment, I would like to put the question of API support in the
> OSes aside and concentrate on the implementation of 64-bit file support
> in DJGPP itself.
A review of what's been done already would be a good starting point.
I don't know. I'm still working on djgpp version 2.04.
Sorry, that's the version for GCC. Ah, so I guess it is a list for the
current version of DJGPP. :)
DJDEV & DJLSR v203
(w/GCC & GPP v341)
(w/GLIB v126)
(w/BNU v215)
RP
I'm curious. Will v2.04 use the standard GNU C library or is that out of
the question?
Rod
That's out of the question.
Ah, well, I figured it'd be much easier to maintain DJGPP if it used the GNU
C library. I think it'd also be a step towards 64-bit support and perhaps
even IBM's Cell cpu.
What exactly is the the issue? That the DOS and Linux API's don't match?
That there needs to be a POSIX layer?
Rod Pemberton
Yes, all of that. A large chunk of the DJGPP C library deals with
letting your application pretend that MS-DOS is really a POSIX.1
system, and hiding all the gory details.
Plus, there's a lot of stuff in glibc that just isn't going to work
under MS-DOS. It really wants to be Linux-only.
In short, it's just a bad idea.
> under MS-DOS.
Wow! I find it really interesting that with all the POSIX code you wrote,
and the code for POSIX-on-DOS w/DPMI of the CMU MACH DOS, that a simple
POSIX on DOS 32-bit OS couldn't be written...
I'm currently working on a personal on-top-of DOS Ring 0 OS written almost
entirely in C which (hey, there are CISC instructions...) :
1) compiles with DJGPP, and OW1.3, small amount of NASM
2) from RM, dumps the DJGPP DPMI host or the OW DPMI host/dos-extender and
returns to PM ring 0 32-bit 4Gb base 0
3) setups a new GDT and IDT
4) reprograms PICs
5) setup IRQs (rough, but there, C stack frame getting in the way for some
functions :( )
6) implements ISRs (proto routines for 0x31,0x21,0x33,0x16)
7) (in progress) initializes keyboard and mouse routines (working on the
buffers/queue)
I'm hoping to finish the keyboard and mouse routines soon so I can move on
to floppy/hard disk. I'll also need to get to the PITs sometime... With
time, it could possibly exec all DJGPP or OW programs in an exclusively
32-bit environment... Multitasking should be possible for DJGPP
applications due to the segment memory model. However, OW uses a single 4Gb
segment. I'm not sure if I can get multi-tasking working for it. I was
suprised at just how closely a large portion of my DPMI dumper code matches
the requirements for a GRUB bootloader...
Rod Pemberton
Taken to extremes, you've re-invented Linux ;-)
> I'm currently working on a personal on-top-of DOS Ring 0 OS written
> almost entirely in C which (hey, there are CISC instructions...) :
Now I'm suddenly interested ;) Is it also possible to write
applications for your OS with OW or DJGPP? If so, I might want to
play a bit.
Johann
--
johann myrkraverk com (you know the drill with the @ and .)
I classify Outlook mail as spam, use something else.
>Is it possible...
No, not yet. I'm still at the keyboard and mouse routines. No hard disk
support. No application loader.
Theoretically possible? Yes, in time it should be possible to run DJGPP/OW
apps eventually. I'm not releasing source at this time.
RP
> Of course it can be written. It just wouldn't be DJGPP.
>
> Taken to extremes, you've re-invented Linux ;-)
And with an addition of a lisp engine, he'll re-invent emacs ;)
Heh!
I think it's a matter of flavor. I don't like Linux for the most part, but
I do like GCC, Tso's fdisk, dd, and netcat. However, although I had a few
problems with the install, I was really impressed with Vector Linux. It was
blazingly fast. Otherwise, I can live without buggy cfdisk, scripts, ext,
ext2, reiserfs, multi-user, secure logins, all of which are a nightmare in
my opinion. If I have to give up 98SE, I already know I hate XP, so it'll
probably be VL. I think the X in XP stands for "Stop you crazy person!
You're not allowed to do that, because I'm the OS."
Rod Pemberton
> "Johann 'Myrkraverk' Oskarsson" <myrkr...@yahoo.com> wrote in message
> news:m3bqy9xl...@jin.myrkraverk.com...
>> Now I'm suddenly interested ;) Is it also possible to write
>> applications for your OS with OW or DJGPP? If so, I might want to
>> play a bit.
>>Is it possible...
> No, not yet. I'm still at the keyboard and mouse routines. No hard disk
> support. No application loader.
> Theoretically possible? Yes, in time it should be possible to run DJGPP/OW
> apps eventually. I'm not releasing source at this time.
Ok, but if/when you do get to that point, I don't mind a slight prod,
either at my email address at the top, or the bottom; in case I'm not
monitoring this or other dos channels then.
> For personal use, I compiled a very raw but complete list of every interrupt
> called by every function for an older version of DJGPP. DJGPP version 3.4.1
> calls about 170 DOS, BIOS, etc. interrupts. I'll just list the ones that
> call 71xx functions below my signature. If you need to know which ones call
> specific functions, just ask in this newsgroup or the other newsgroup you
> post DR-DOS announcements too.
Thank you! How did you compile this list?
> Have you contacted Henrik Haftmann or Jason
> Hood about 64-bit support in DOSLFN?
Yes, I have written Jason an email today; I am awaiting his reply.
Udo
But was not the Gnu C library designed to be portable to different
OSes? I remember I read that it once supported several OSes, not only
Linux and Hurd. The developers even encouraged other programmers to
develop new ports of glibc; they said it would not be too hard. What
has become of this idea?
Udo
DJGPP runs under DOS. That includes older DOSs, FreeDos, quasi-DOS
from windoze 9x etc. Programs for it are portable. They don't
need to worry about GUIs, because there are none.
The fundamental purpose is to make the world of Unix, Posix, Linux
programs available to DOS users. DJGPP does this very well. It
has no problems with DLL hell, etc. It is a command line environment.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
I compiled the list manually by searching with Windows find. That was just a
_very_ small portion of the list. DJGPP wasn't too bad since most calls use
__dpmi_int(). DJGPP calls about 170 DOS, BIOS, DPMI, etc. functions that I
could find. Today, I think I just found a few more I missed... OW1.3, on
the other hand, was very difficult because of hard code, assembly, various
methods of calling DPMI, etc. I found about 100 DOS, BIOS, DPMI calls for
OW. Of course, it doesn't have LFN support, integrated DPMI support, or
POSIX functions...
I know the LFN api has some non-71xx functions. Time perhaps? I don't
recall at the moment, but let me know if you need more...
Rod Pemberton