PDOS/386 API list
PDOS/386 API list
PDOS/386 now supports the following APIs:
1. MSDOS 32-bit INT 21H (you can quibble about this one since it didn't exist)
2. Win32 (msvcrt.dll and kernel32.dll)
3. Linux (INT 80H)
4. OS/2 2.0 (doscalls.dll)
5. PDOS-generic (stack parameter containing struct containing C library function pointers plus extra stuff)
In order to accomplish that, I needed to get the first 4 of the above to stop relying on the stack (or registers) at entry to the executable, clearing the way for PDOS-generic. E.g. for Linux ELF I made it read /proc/<pid>/command instead of the stack.
What this means is that if you write your Linux/Win32/OS/2 programs "properly" (TM), they work on both real Linux etc and PDOS/386.
It is all based around C90 plus ANSI X3.64. ie that's the only thing I support (and even if you do that, you still need to follow the rules I just made up).
All the tools, including the slightly modified gcc 3.2.3, are C90-compliant and the system is self-hosting.
And it is all public domain in case you see a commercial opportunity and don't want any restrictions (ie you can close source it, and no credit required).
I started working on this on 1994-04-28.
On 2024-04-29 I'm planning on getting a life.
Or borrowing someone else's.
Or reading a book on someone else's.
Or googling to try to find a Wiki on how to get one.
http://pdos.org
1. MSDOS 32-bit INT 21H (you can quibble about this one since it didn't exist)
2. Win32 (msvcrt.dll and kernel32.dll)
3. Linux (INT 80H)
4. OS/2 2.0 (doscalls.dll)
5. PDOS-generic (stack parameter containing struct containing C library function pointers plus extra stuff)
In order to accomplish that, I needed to get the first 4 of the above to stop relying on the stack (or registers) at entry to the executable, clearing the way for PDOS-generic. E.g. for Linux ELF I made it read /proc/<pid>/command instead of the stack.
What this means is that if you write your Linux/Win32/OS/2 programs "properly" (TM), they work on both real Linux etc and PDOS/386.
It is all based around C90 plus ANSI X3.64. ie that's the only thing I support (and even if you do that, you still need to follow the rules I just made up).
All the tools, including the slightly modified gcc 3.2.3, are C90-compliant and the system is self-hosting.
And it is all public domain in case you see a commercial opportunity and don't want any restrictions (ie you can close source it, and no credit required).
I started working on this on 1994-04-28.
On 2024-04-29 I'm planning on getting a life.
Or borrowing someone else's.
Or reading a book on someone else's.
Or googling to try to find a Wiki on how to get one.
http://pdos.org
Re: PDOS/386 API list
Linux INT 80H might also give you compatibility with Plan 9 via Linuxemu. (It's the first item under "unix".)
I hope your getting a life goes better than mine. I've been trying for 15 years! It probably will. I've been held back by health and by difficulty trusting people.
I wouldn't recommend borrowing someone else's!
I hope your getting a life goes better than mine. I've been trying for 15 years! It probably will. I've been held back by health and by difficulty trusting people.
I wouldn't recommend borrowing someone else's!
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Re: PDOS/386 API list
I looked at the link, but it's a fool's errand. I support a very limited subset of INT 80H - enough to get pdpclib-based programs to work. Or a subset of that. E.g. If you wrote an assembler program to write to the screen and then exit - yeah, that will be covered by my INT 80H.eekee wrote:Linux INT 80H might also give you compatibility with Plan 9 via Linuxemu. (It's the first item under "unix".)
Well I've spent 30 years doing PDOS, and I didn't have a life before that anyway, so I don't have high expectations.I hope your getting a life goes better than mine. I've been trying for 15 years! It probably will. I've been held back by health and by difficulty trusting people.
I wouldn't recommend borrowing someone else's!
-
- Member
- Posts: 48
- Joined: Sat Jan 28, 2023 11:41 am
- Location: Belarus
- Contact:
Re: PDOS/386 API list
Have you implemented all your ideas and are no longer predicting the emergence of new ones? Going into commerce? Are you leaving for a desert island? Maybe something else? Are you done creating?kerravon wrote: Well I've spent 30 years doing PDOS, and I didn't have a life before that anyway, so I don't have high expectations.
Re: PDOS/386 API list
Every time I think "that's it - everything I wanted to prove has been proven", I have a new idea. And it's been non-stop for the last few years. A few hours ago I got the ability to build and execute arbitrary C90 ELF executables (makefile.lnp).Alexey1994 wrote:Have you implemented all your ideas and are no longer predicting the emergence of new ones? Going into commerce? Are you leaving for a desert island? Maybe something else? Are you done creating?kerravon wrote: Well I've spent 30 years doing PDOS, and I didn't have a life before that anyway, so I don't have high expectations.
There are a couple of structural things I haven't quite proven. Currently in my pseudo-bios I use setjmp and have a special exit so that programs don't close down the pseudo-bios itself. I believe that that can now be done cleanly using the new "runnum" in start.c in PDPCLIB. It's being proven a bit at a time.
And then there's another revamp.
For a long time I've been using PosOpenFile, PosReadFile etc APIs - inspired by OS/2 functions called DosRead etc.
However, I'm planning on changing those APIs to - fopen, fread etc
pdos-generic has an __os.h file containing the C library (some things are still missing, but they will be added in due course). My plan is to have some defines so that I can import and export that C library.
The OS (PDOS-generic) will import a C library from the pseudo-bios, as well as using a different C library for its internal use, and then export that C library - via multiple inclusion of __os.h governed by different defines.
The C library that PDOS-generic uses will need to import from PDOS.
But PDOS itself will also use it.
So anyway, one full C library (with fprintf etc) will import from a basic C library (only fwrite etc to "wb" files). Everything will use __os.h but in some cases the extra functions (fprintf) simply won't exist (and you will crash if you try to execute them). So a full C library needs to devolve to just the essential C functions.
It will be neat/compact.
If it works at all. I may be missing something.
I've started proving it already with the implementation of OS/2 doscalls.c. OS/2 programs call the C library which calls the low-level functions (DosRead etc), but I simply turn them straight around (in src/doscalls.c) to use fread instead.
After that is done, maybe things will finally stop.
But some of these things are triggered by people sending me code (like pdld), opening up a new branch.
Sector C did that too. It triggered me to create Multisector C.
Oh yeah - and the mainframe hasn't been properly fleshed out yet. I don't support FBA disks yet. Nor do I support FAT overlaid on CKD disks. Nor have I proven FAT on EBCDIC.
So yeah - scratch that "finally stop" thing.
Oh yeah - and then there's the replacement of PDOS/86 to finally move away from the MSDOS API and on to the OS/2 1.x API and NE executables (even for RM16 - and not family API with dual paths).
And the ARM (PdAndro) doesn't do text to speech properly, so blind people will probably get irate. I need to find someone who knows someone. I tried contacting a blind programmer but he broke contact.
And my 2 year old daughter is already saying "keyboard skills" when she wants to play on PDOS/386. She used to say "milk bottle" (I tried to get her to type "MILK" which is phonetically correct (very difficult to find such English words)) because I put a picture of her milk bottle (when someone from Slovakia added limited graphics support to PDOS/386) on PDOS/386, and I kept asking her "do you want to drink real milk or do keyboard skills?" so that's how she picked that up.
She doesn't really use "MILK" or "A" (a.bat to display a big A). She just likes typing on the command line until it fills up and I need to press enter to get a fresh line.
Yeah, doesn't sound like I'm going to stop after all.
Re: PDOS/386 API list
BTW, did you see my post in alt.os.development a couple of months ago about the potential Smaller C bootstrapping issue that I have hopefully solved? Just something to factor in. It's been on my mind ever since you mentioned it.Alexey1994 wrote:kerravon wrote: Have you implemented all your ideas
-
- Member
- Posts: 48
- Joined: Sat Jan 28, 2023 11:41 am
- Location: Belarus
- Contact:
Re: PDOS/386 API list
Perhaps you thought that I was Alexey Frunze. But I'm not that Alexey. The passport says Aliaksei.kerravon wrote: BTW, did you see my post in alt.os.development a couple of months ago about the potential Smaller C bootstrapping issue that I have hopefully solved? Just something to factor in. It's been on my mind ever since you mentioned it.
My interest is caused by the fact that at almost 30 years old I have great creative floods.
For example, I got the idea to make the scanf function in graphical mode, drawing a beautiful GUI based on the first line. Maybe someone has already done this. But the idea came, and there is no desire to go through with its implementation.
I'm afraid that at some point ideas will stop coming to mind, and then the creative path can end. It seemed to me that you were approaching this.
Re: PDOS/386 API list
I'm not actually expecting creative ideas in OS development. It should be a well-studied field with plenty of qualified scientists/engineers.Alexey1994 wrote: I'm afraid that at some point ideas will stop coming to mind, and then the creative path can end. It seemed to me that you were approaching this.
I am doing something non-traditional for a non-traditional purpose (I'm creating a "starter system" - for OS developers or normal developers - capable of running on low-end machines - not something (at least primarily) targeted to normal end users), so perhaps that gives an opportunity for creativity. But I'm expecting that to stop. The trouble is I expected it to stop multiple times in the past but then there's something new. Perhaps because I switch to different hardware too.
Note also that another interest of mine is conflict/human psychology. It's not something I've formally studied (unlike computer science), but I have been informally "rederiving the field from first principles", and now that I have a child I am continuing that - trying to detect the genetic instincts (and then formulating a strategy to counter the negative ones). Oh - and I have a desire to reach out to Japanese children of the same age (currently she is a bit over 2) to try to get them to learn touch-typing in Katakana - likely using the "Moon" keyboard invented on 2channel. That's why I was looking for phonetic English words too. Katakana is pure phonetic. So they have a perfect language available - they're just not using it. Fits into a single byte too.
-
- Member
- Posts: 48
- Joined: Sat Jan 28, 2023 11:41 am
- Location: Belarus
- Contact:
Re: PDOS/386 API list
When your daughter is 10, you can teach her how to solder NOR/NAND elements from bipolar transistors and resistors, and assemble computer parts from them. In any case, I remember that when I was 10, I really wanted to do this, but I didn’t have the opportunity, since there were no cheap elements from Aliexpress.kerravon wrote:Oh - and I have a desire to reach out to Japanese children of the same age (currently she is a bit over 2) to try to get them to learn touch-typing in Katakana - likely using the "Moon" keyboard invented on 2channel. That's why I was looking for phonetic English words too. Katakana is pure phonetic. So they have a perfect language available - they're just not using it. Fits into a single byte too.
Re: PDOS/386 API list
I'm not a hardware guy, but I am interested in this:Alexey1994 wrote: When your daughter is 10, you can teach her how to solder NOR/NAND elements from bipolar transistors and resistors, and assemble computer parts from them.
https://cod5.com/citizen-computer.html
Transistors are expensive?In any case, I remember that when I was 10, I really wanted to do this, but I didn’t have the opportunity, since there were no cheap elements from Aliexpress.
As an aside - the C90-compliant toolchain that ships with PDOS/386 is now able to produce Linux ELF executables and gccwin (as an ELF) is able to rebuild itself on both PDOS/386 and real Linux. Tools available by searching for "Linux" at pdos.org and getting pdosl.zip. I'm looking to create my own Linux distro now, similar to how I have my own Freedos distro already.