OS/2, eCS & ArcaOS - Technical > Programming
native mainframe mini-clone
Martin Iturbide:
Ok, I have PDOS/386 running in VirtualBox. The pdos.zip vhd image did all the trick.
What OS/2 executables can I run just as testing? Is there another disk I have to mount?
What else do you recommend doing on PDOS just to play around and possible understand it better.
I run milk.bat just for testing, I see the picture, but I can not exit. Is there any trick?
What is similar to "dir /p" to see the longer directory list paused?
Regards
kerravon:
--- Quote from: Martin Iturbide on September 09, 2025, 10:25:55 pm ---Ok, I have PDOS/386 running in VirtualBox. The pdos.zip vhd image did all the trick.
--- End quote ---
Ok - good that you got it running.
--- Quote ---What OS/2 executables can I run just as testing?
--- End quote ---
I don't think I ship a test OS/2 executable, but you can build a test program:
D:\devel\pdos\pdpclib>pdmake -f makefile.sos
...
gccwin -DXUSE_MEMMGR -U__WIN32__ -D__HAVESYS__=_System -O2 -fno-common -ansi -D__OS2__ -D__32BIT_
_ -D__NOBIVA__ -S -I. -I../src -o fpfuncsw.s fpfuncsw.c
pdas --oformat coff -o fpfuncsw.obj fpfuncsw.s
rm -f fpfuncsw.s
as86 -f coff -o winsupa.obj winsupa.asm
as86 -DOS220 -o needpdos.obj ..\src\needpdos.asm
..\src\needpdos.asm:8: warning: .stack unimplemented; ignored
ld86 -e top --oformat msdos-mz -o needpdos.exe needpdos.obj
rm -f pdpos2.lib
xar r pdpos2.lib os2strt.obj stdio.obj string.obj stdlib.obj
xar r pdpos2.lib start.obj time.obj errno.obj assert.obj signal.obj
xar r pdpos2.lib locale.obj ctype.obj setjmp.obj math.obj __memmgr.obj
xar r pdpos2.lib fpfuncsw.obj winsupa.obj
xar s pdpos2.lib
rm -f os2.lib
genimp doscalls.wat os2.lib
pdld -s --oformat lx --stub needpdos.exe -o pdptest.exe os2strt.obj pdptest.obj pdpos2.lib os2.li
b
And then run "pdptest abc def" to see.
(I did the above on my Windows 2000 system - but the same thing works on PDOS/386 - that's what being a mini-clone is all about)
Or verify it is LX with:
D:\devel\pdos\pdpclib>hexdump pdptest.exe 0 200
000000 4D5A6000 01000000 04000001 FFFF0600 MZ`.............
000010 00100000 00000000 40000000 00000000 ........@.......
000020 00000000 00000000 00000000 00000000 ................
000030 00000000 00000000 00000000 80000000 ................
000040 0E1FB409 BA1000CD 21B001B4 4CCD2100 ........!...L.!.
000050 54686973 2070726F 6772616D 206E6565 This program nee
000060 6473204F 532F3220 322E3020 6F722065 ds OS/2 2.0 or e
000070 71756976 616C656E 740D0A24 00000000 quivalent..$....
000080 4C580000 00000000 02000100 00000000 LX..............
000090 00020000 08000000 01000000 00000000 ................
--- Quote ---Is there another disk I have to mount?
--- End quote ---
There is a pdoso.zip you can download that contains gccwin.exe etc as LX executables.
It was built with this:
D:\devel\pdospkg\misc>grep -i os2 *
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\gccwin.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\as86.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\genimp.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\ld86.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\pdas.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\pdcc.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\pdld.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\pdmake.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\rm.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\sccwin.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\uemacs.exe ::DOS\
final2.bat: mcopy -i pdoso.vhd --offset 504 \os2path\xar.exe ::DOS\
Those executables are not maintained though. But there are plans to mirror sourceforge to github and automatically sync and build everything. I'm not sure what the status of that is. Simon Kissane is the one driving that, with the assistance of Dat Nguyen (in Vietnam).
--- Quote ---What else do you recommend doing on PDOS just to play around and possible understand it better.
--- End quote ---
There isn't anything to do, really. The focus was and is to have a self-hosting toolchain so that you are enabled to develop whatever it is you want to do - wherever you are. If you only have a mainframe - I have you covered. If you only have an Android smartphone - I have you covered. If you only have an Amiga with a 68000 - covered. If you're on an OS/2 machine for some reason - covered. If you like the OS/2 API for some reason, but want to use a mainframe - covered. I could do the same for 68000 but haven't done so yet. It's more to prove the portability than anything else.
--- Quote ---I run milk.bat just for testing, I see the picture, but I can not exit. Is there any trick?
--- End quote ---
Yep:
D:\devel\baby>type milk.bat
echo press x to exit
pfpwin milk.jpg
D:\devel\baby>
Note that I didn't write pfpwin - so I didn't create that interface. :-) Not that I would have done a better job.
--- Quote ---What is similar to "dir /p" to see the longer directory list paused?
--- End quote ---
If you are desperate, you can do "dir a*" to list just things that start with "a", which looks undocumented to me. And there is a "type /p" (I think Simon added that), so I'm guessing that functionality could be copied across. I'll ask Dat to do both of those things. No idea what timeframe that might happen in.
Note that I have been working on PDOS for more than 30 years, and it has now reached the point where I want to make sure that a competent engineer can maintain it without needing my personal touch, so I deliberately try to get Dat to do things, and I just help him if required (essentially training).
Something like getting Windows and OS/2 APIs to work on z/Windows "requires" my personal touch though, so that's what I focus on.
Oh - in case you weren't aware, a VHD can be mounted on Windows too (since Win 7 I think), so you can use genuine Windows to do a "dir". Also the VHD that I ship is both 4k-aligned and cylinder-aligned, so that it can be mounted on an OS/2 machine too, so that you get a better "dir".
If you'd like to make suggestions, we can take that into consideration. There is no actual "master plan". The goal was just to make it exist, and prove some concepts, and that has already been done.
There are some things that have been proven to be outside our capability to date though. Like getting a basic public domain C90-compliant compiler to work. pdcc is there, and capable of compiling a "hello world", but not much else. SubC is there too, and more advanced, but not an appropriate base for a C90 compiler written in C90. So my gcc 3.2.3 fork is still the only real option. There is also cc64, but that is close to being executable-only (generated C code), and only x64.
Martin Iturbide:
Thanks Paul. I will try to check this tonight.
I have a question here:
--- Quote from: kerravon on September 10, 2025, 12:43:00 am ---.... If you're on an OS/2 machine for some reason - covered. If you like the OS/2 API for some reason, but want to use a mainframe - covered.
--- End quote ---
How much of the OS/2 API is covered? Is the API trying to cover what we call the Control Program Interface (CPI)?
I know these projects that tried to replicate the OS/2 API that are incomplete.
- OS2Linux - Common Public License
- 2Ine - BSD alike and some others.
- OSFree - Also a liberal license.
I even tried to make a comparison on this page, but I didn't get far, since I'm not that technical savvy at that deep.
And projecting our needs as the OS/2 community, there is always around the idea of trying to create an OS/2 personality on a different kernel that can run OS/2 Presentation Manager, Workplace Shell and the native OS/2 software (at some extent, of course it will never be 100% perfect compatible)
Regards
kerravon:
--- Quote from: Martin Iturbide on September 10, 2025, 03:46:43 pm ---I have a question here:
--- Quote from: kerravon on September 10, 2025, 12:43:00 am ---.... If you're on an OS/2 machine for some reason - covered. If you like the OS/2 API for some reason, but want to use a mainframe - covered.
--- End quote ---
How much of the OS/2 API is covered?
--- End quote ---
Only enough to stand up a C library so that to tools needed to create everything else (every other API you may wish to have) are available.
You can do it with perfectly valid OS/2 LX executables - all the way.
So here they are:
D:\devel\pdos\pdpclib>type doscalls.wat
++DosExit.DOSCALLS.DosExit.234
++DosOpen.DOSCALLS.DosOpen.273
++DosClose.DOSCALLS.DosClose.257
++DosRead.DOSCALLS.DosRead.281
++DosWrite.DOSCALLS.DosWrite.282
++DosDelete.DOSCALLS.DosDelete.259
++DosMove.DOSCALLS.DosMove.271
++DosExecPgm.DOSCALLS.DosExecPgm.283
++DosSetFilePtr.DOSCALLS.DosSetFilePtr.256
++DosGetDateTime.DOSCALLS.DosGetDateTime.230
++DosDevIOCtl.DOSCALLS.DosDevIOCtl.284
++DosAllocMem.DOSCALLS.DosAllocMem.299
++DosFreeMem.DOSCALLS.DosFreeMem.304
++DosScanEnv.DOSCALLS.DosScanEnv.227
++DosSetRelMaxFH.DOSCALLS.DosSetRelMaxFH.382
++DosGetInfoBlocks.DOSCALLS.DosGetInfoBlocks.312
D:\devel\pdos\pdpclib>
--- Quote ---I know these projects that tried to replicate the OS/2 API that are incomplete.
--- End quote ---
And all copyrighted - so strings attached.
--- Quote ---And projecting our needs as the OS/2 community, there is always around the idea of trying to create an OS/2 personality on a different kernel that can run OS/2 Presentation Manager, Workplace Shell and the native OS/2 software (at some extent, of course it will never be 100% perfect compatible)
--- End quote ---
Ok, well I have created the ability to create that starting with nothing other than PDOS and the OS/2 API. And that includes if you only have a mainframe, with no other OS available.
That's the theoretical scenario that interests me. If you only had xyz hardware, what could you do? You could run some other OS, including Linux, but if you were trying to do a clean room OS implementation, and wanted to be sure you no-one accused you of stealing copyrighted code, you can't just install Linux instead.
Or some other scenario that I haven't thought of.
Basically - there is presumably some reason why other people are copyrighting absolutely everything - even freeware. They insist that they can't make their work public domain, otherwise (something, apparently diabolical) will happen.
So I want to either make that (something) happen, or prove (at least to some extent) that that theory is incorrect.
Or to make something else happen - perhaps a commercial competitor to OS/2. Which I personally don't consider to be diabolical.
One other thing I have just thought of - since we have cc64 available, a 64-bit version of OS/2 could be created. And that can be pure public domain - even the compiler and assembler. Is that of interest? cc64 is like Microsoft C - pointers are 64-bit but "long" is 32-bit. But actually - that can be changed. We can make cc64 do 64-bit long for the OS/2 version. cc64 has bugs in it though, and those bugs can't really be fixed. However, the author of cc64 created an mm64 which may have those bugs fixed - I haven't investigated that. Maybe I can prioritize that.
Martin Iturbide:
--- Quote from: kerravon on September 10, 2025, 04:41:43 pm ---That's the theoretical scenario that interests me. If you only had xyz hardware, what could you do? You could run some other OS, including Linux, but if you were trying to do a clean room OS implementation, and wanted to be sure you no-one accused you of stealing copyrighted code, you can't just install Linux instead.
Or some other scenario that I haven't thought of.
Basically - there is presumably some reason why other people are copyrighting absolutely everything - even freeware. They insist that they can't make their work public domain, otherwise (something, apparently diabolical) will happen.
--- End quote ---
I love Public Domain. I think that public domain helps innovation and I even get happy every January 1st when I see the list of things that turns public domain each year. Eventually OS/2 will be public domain, but sadly I can not wait 60 more years for it ;D
But I think the BSD license is flexible enough like public domain, (like the most close you can get to public domain inside the copyright law), where the author gives you a lot of freedom of what to do with the source code, derivative works can be open or close, so I'm not against it, and I don't feel that why that license there are string attached.
Since we have limited resources, I prefer to mix everything as long at does not give any legal problem, and when interest arrive, move to replace the things that are not open or even try to make every line of code public domain.
Just to explain myself better, if we can get on the "lab" (private environment), for PDOS to boot, imitate the OS/2 API, copy all the IBM OS/2 compiled binaries on it to run Presentation Manager and Workplace shell (I know it is a lot of work), that would demonstrate the experiment that an OS/2 personality was created under a different kernel, and give hope for the OS/2 future. At that moment if people want to replicate the experiment at home, they will have to own a license of OS/2 or ArcaOS to be legal.
That will be like an inflection point that will open up some eyes and gives hope, and from it, the efforts will be focused on opening / cloning more of the OS/2 IBM close source components as open source or public domain. The full "OS/2 Freedom" can not be done in one shot, it has to be done in time with milestones.
But I'm sorry if I'm projecting my own hopes for the OS/2 community to have long term future on your PDOS project. I know you must have your own goals. I just dream away from time to time.
--- Quote ---One other thing I have just thought of - since we have cc64 available, a 64-bit version of OS/2 could be created. And that can be pure public domain - even the compiler and assembler. Is that of interest? cc64 is like Microsoft C - pointers are 64-bit but "long" is 32-bit. But actually - that can be changed. We can make cc64 do 64-bit long for the OS/2 version. cc64 has bugs in it though, and those bugs can't really be fixed. However, the author of cc64 created an mm64 which may have those bugs fixed - I haven't investigated that. Maybe I can prioritize that.
--- End quote ---
An 64-bits version of OS/2 is what would everybody will like, since we are having limitations with the 32bits. But users will only use a 64's bit version of OS/2 only if everything that is running on their machines now gets working on the 64bits version of the OS. Similar to the migration of Windows to 64 bits. When Windows XP for 64 bits was released, nobody used until "WoW64" (Windows 32-bit on Windows 64-bit) was created, so user didn't have all their 32bits software broken.
Regards
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version