roelandjansen / pcmos386v501

PC-MOS/386 v5.01 and up, including cdrom driver sources.
GNU General Public License v3.0
418 stars 60 forks source link

mos5src vs kernel #36

Closed ghost closed 5 years ago

ghost commented 5 years ago

I looked at the MOSDDINT.ASM patch to understand it, so then I looked for the body of mosliman in KERNEL, but could not find it. Then I looked in MOS5SRC and there it is, in the file MOSLIMAN.ASM.

I also see there is file duplication between KERNEL and MOS5SRC, such as MOS.ASM. Looks like 5.01 in KERNEL vs 5.02 in MOS5SRC.

Does MOS5SRC supersede KERNEL? Can anyone explain further?

the-grue commented 5 years ago

It does look like it. You'll see messages stating "5.01 Kernel Ends Here" in some of the files in mos5src. I have built the kernel out of the mos5src tree, but haven't tried it yet.

andrewbird commented 5 years ago

But is 5.02 an unfinished release?

ghost commented 5 years ago

After comparing the list of source files side by side, I see that I missed MOSLIMAN.ASM in KERNEL when grepping the first time. It's there. Maybe MOS5SRC is an unfinished development version. Here's the list. a=kernel b=mos5src

    a   19DEF.INC         b   19DEF.INC
    a   1USERS.INC        b   1USERS.INC
    a   25USERS.INC       b   25USERS.INC
    a   31DEF.INC         b   31DEF.INC
    a   3ADEF.INC         b   3ADEF.INC
    a   52DEF.INC         b   52DEF.INC
    a   5USERS.INC        b   5USERS.INC
    a   A1DEF.INC         b   A1DEF.INC
    a   ADDDEV.ASM        b   ADDDEV.ASM
    a   ADDTASK.ASM       b   ADDTASK.ASM
    a   ALIAS.ASM         b   ALIAS.ASM
    a   ALT999.ASM        b   ALT999.ASM
    a   ANDEF.INC         b   ANDEF.INC
    a   AVDEF.INC         b   AVDEF.INC
    a   BIOSLOAD.INC      b   BIOSLOAD.INC
    a   BIOSRES.INC       b   BIOSRES.INC
    a   BOOT.ASM          b   BOOT.ASM
    a   CLASS.ASM         b   CLASS.ASM
                          b   COMPFILE.C
    a   COPYRIT.INC       b   COPYRIT.INC
                          b   CPUSPEED.INC
    a   DDTVNA.ASM        b   DDTVNA.ASM
    a   DDTW99GT.ASM      b   DDTW99GT.ASM
    a   DEBUG.ASM         b   DEBUG.ASM
    a   DEBUGCON.ASM      b   DEBUGCON.ASM
    a   DEBUGEND.ASM      b   DEBUGEND.ASM
    a   DEBUGEXT.ASM      b   DEBUGEXT.ASM
    a   DEBUGMAC.INC      b   DEBUGMAC.INC
    a   DEBUGMAN.ASM      b   DEBUGMAN.ASM
    a   DEBUGSUP.ASM      b   DEBUGSUP.ASM
    a   DEBUGTRA.ASM      b   DEBUGTRA.ASM
    a   DEVREQH.INC       b   DEVREQH.INC
    a   DIRMAP.ASM        b   DIRMAP.ASM
    a   DISKCOPY.ASM      b   DISKCOPY.ASM
    a   DISKID.ASM        b   DISKID.ASM
    a   DISPSER.ASM       b   DISPSER.ASM
    a   DPMISEG.INC       b   DPMISEG.INC
    a   DSKSTRUC.INC      b   DSKSTRUC.INC
                          b   ED.C
    a   EDASM.ASM         b   EDASM.ASM
    a   ELOAD.ASM         b   ELOAD.ASM
                          b   EMULINK.DEF
    a   ERRCODES.INC      b   ERRCODES.INC
    a   EXDEF.INC         b   EXDEF.INC
    a   EXE2BIN.DAT       b   EXE2BIN.DAT
    a   EXPORT.ASM        b   EXPORT.ASM
                          b   FAKE17.ASM
    a   FILEMODE.ASM      b   FILEMODE.ASM
    a   FILTER.ASM        b   FILTER.ASM
    a   FMCOMMON.INC      b   FMCOMMON.INC
    a   FORMAT.ASM        b   FORMAT.ASM
    a   GENMOUSE.INC      b   GENMOUSE.INC
    a   GETSER.ASM        b   GETSER.ASM
    a   GROUP.INC         b   GROUP.INC
    a   HDSETUP.ASM       b   HDSETUP.ASM
    a   HELP.INC          b   HELP.INC
                          b   HELP.PAS
                          b   HELP.SRC
                          b   HELP.TXT
                          b   HELPGEN.C
    a   IMPORT.ASM        b   IMPORT.ASM
    a   INIT.ASM          b   INIT.ASM
    a   INT14.INC         b   INT14.INC
                          b   INT17.ASM
                          b   ISMOS.DEF
    a   ISRSUB.INC        b   ISRSUB.INC
    a   JMPMACRO.INC      b   JMPMACRO.INC
    a   KERNEL.MAK        b   KERNEL.MAK
    a   KERNEL.ZIP
    a   KERNEL1.MAK
                          b   KEYDEF.H
    a   KEYMAP.ASM        b   KEYMAP.ASM
    a   LIFE386.ASM       b   LIFE386.ASM
    a   LLREC.INC         b   LLREC.INC
    a   MACROS.INC        b   MACROS.INC
    a   MAKETERM.MAK      b   MAKETERM.MAK
    a   MAKEUSER.ASM      b   MAKEUSER.ASM
    a   MAKEUTIL.MAK      b   MAKEUTIL.MAK
    a   MAXUSERS.INC      b   MAXUSERS.INC
    a   MBOOT.INC         b   MBOOT.INC
    a   MBR.INC           b   MBR.INC
    a   MBRDEF.INC        b   MBRDEF.INC
    a   MINBRDPC.ASM      b   MINBRDPC.ASM
    a   MISPEED.ASM       b   MISPEED.ASM
                          b   MODEM.C
    a   MONITOR.ASM       b   MONITOR.ASM
    a   MORE.ASM          b   MORE.ASM
    a   MOS.ASM           b   MOS.ASM
                          b   MOS5SRC.ZIP
    a   MOSADM.ASM        b   MOSADM.ASM
    a   MOSBACK.ASM       b   MOSBACK.ASM
    a   MOSBDB.INC        b   MOSBDB.INC
    a   MOSCDB.INC        b   MOSCDB.INC
    a   MOSCNF.INC        b   MOSCNF.INC
    a   MOSCNTXT.ASM      b   MOSCNTXT.ASM
    a   MOSDD7F.ASM       b   MOSDD7F.ASM
    a   MOSDDBLF.ASM      b   MOSDDBLF.ASM
    a   MOSDDBLK.ASM      b   MOSDDBLK.ASM
    a   MOSDDCLK.ASM      b   MOSDDCLK.ASM
    a   MOSDDCON.ASM      b   MOSDDCON.ASM
    a   MOSDDINT.ASM      b   MOSDDINT.ASM
    a   MOSDDTMC.ASM      b   MOSDDTMC.ASM
    a   MOSDDTSH.ASM      b   MOSDDTSH.ASM
    a   MOSDEBUG.ASM      b   MOSDEBUG.ASM
    a   MOSDEVS.ASM       b   MOSDEVS.ASM
    a   MOSEMS.INC        b   MOSEMS.INC
    a   MOSFRONT.ASM      b   MOSFRONT.ASM
    a   MOSFUN00.ASM      b   MOSFUN00.ASM
    a   MOSFUN01.ASM      b   MOSFUN01.ASM
    a   MOSFUN0F.ASM      b   MOSFUN0F.ASM
    a   MOSFUN39.ASM      b   MOSFUN39.ASM
    a   MOSFUN44.ASM      b   MOSFUN44.ASM
    a   MOSFUTIL.ASM      b   MOSFUTIL.ASM
    a   MOSFUTL2.ASM      b   MOSFUTL2.ASM
    a   MOSFUTL3.ASM      b   MOSFUTL3.ASM
    a   MOSFUTL4.ASM      b   MOSFUTL4.ASM
    a   MOSGFB.INC        b   MOSGFB.INC
    a   MOSHEMAN.ASM      b   MOSHEMAN.ASM
    a   MOSINIT.ASM       b   MOSINIT.ASM
    a   MOSINIT2.ASM      b   MOSINIT2.ASM
    a   MOSINT06.ASM      b   MOSINT06.ASM
    a   MOSINT10.ASM      b   MOSINT10.ASM
    a   MOSINT13.ASM      b   MOSINT13.ASM
    a   MOSINT15.ASM      b   MOSINT15.ASM
    a   MOSINT16.ASM      b   MOSINT16.ASM
    a   MOSINT17.ASM      b   MOSINT17.ASM
    a   MOSINT21.ASM      b   MOSINT21.ASM
    a   MOSINT28.ASM      b   MOSINT28.ASM
    a   MOSINT38.ASM      b   MOSINT38.ASM
    a   MOSINT74.ASM      b   MOSINT74.ASM
    a   MOSITASK.ASM      b   MOSITASK.ASM
    a   MOSKBBE.ASM       b   MOSKBBE.ASM
    a   MOSKBCF.ASM       b   MOSKBCF.ASM
    a   MOSKBDK.ASM       b   MOSKBDK.ASM
    a   MOSKBFOR.INC      b   MOSKBFOR.INC
    a   MOSKBFR.ASM       b   MOSKBFR.ASM
    a   MOSKBGR.ASM       b   MOSKBGR.ASM
    a   MOSKBHU.ASM       b   MOSKBHU.ASM
    a   MOSKBINZ.INC      b   MOSKBINZ.INC
    a   MOSKBIT.ASM       b   MOSKBIT.ASM
    a   MOSKBLA.ASM       b   MOSKBLA.ASM
    a   MOSKBNL.ASM       b   MOSKBNL.ASM
    a   MOSKBNO.ASM       b   MOSKBNO.ASM
    a   MOSKBPO.ASM       b   MOSKBPO.ASM
    a   MOSKBSF.ASM       b   MOSKBSF.ASM
    a   MOSKBSG.ASM       b   MOSKBSG.ASM
    a   MOSKBSP.ASM       b   MOSKBSP.ASM
    a   MOSKBSV.ASM       b   MOSKBSV.ASM
    a   MOSKBUK.ASM       b   MOSKBUK.ASM
    a   MOSLIMAN.ASM      b   MOSLIMAN.ASM
    a   MOSLOGO.INC       b   MOSLOGO.INC
    a   MOSMIMAN.ASM      b   MOSMIMAN.ASM
    a   MOSMISC.ASM       b   MOSMISC.ASM
    a   MOSNXTSK.ASM      b   MOSNXTSK.ASM
    a   MOSPSP.INC        b   MOSPSP.INC
    a   MOSREGS.INC       b   MOSREGS.INC
    a   MOSREGS2.INC      b   MOSREGS2.INC
    a   MOSRLB.INC        b   MOSRLB.INC
    a   MOSRTASK.ASM      b   MOSRTASK.ASM
    a   MOSSAVER.ASM      b   MOSSAVER.ASM
    a   MOSSCBDF.INC      b   MOSSCBDF.INC
    a   MOSSCBEX.INC      b   MOSSCBEX.INC
    a   MOSTCB.INC        b   MOSTCB.INC
    a   MOSTEMP.ASM       b   MOSTEMP.ASM
    a   MOSTFB.INC        b   MOSTFB.INC
    a   MOXCPCOR.ASM      b   MOXCPCOR.ASM
    a   MOXCPDAT.INC      b   MOXCPDAT.INC
    a   MOXCPINT.ASM      b   MOXCPINT.ASM
    a   MOXCPPLS.ASM      b   MOXCPPLS.ASM
    a   MOXCPSUB.ASM      b   MOXCPSUB.ASM
    a   MOXCPSXT.INC      b   MOXCPSXT.INC
    a   MOXCPTSK.ASM      b   MOXCPTSK.ASM
    a   MOXDDTGN.ASM      b   MOXDDTGN.ASM
    a   MOXMEM.INC        b   MOXMEM.INC
    a   MOXMOS.INC        b   MOXMOS.INC
    a   MOXSPLDT.INC      b   MOXSPLDT.INC
    a   MOXUTIL.ASM       b   MOXUTIL.ASM
    a   MOXUTL.INC        b   MOXUTL.INC
    a   MSYS.ASM          b   MSYS.ASM
    a   NETNAME.ASM       b   NETNAME.ASM
    a   OPTIONS.INC       b   OPTIONS.INC
    a   PAGE.INC          b   PAGE.INC
    a   PATCH410.ASM      b   PATCH410.ASM
    a   PATCHID.ASM       b   PATCHID.ASM
    a   PATCHMAC.INC      b   PATCHMAC.INC
    a   PILDS.INC         b   PILDS.INC
                          b   PMU.H
    a   PRINT.ASM         b   PRINT.ASM
    a   QC.ASM            b   QC.ASM
    a   RDI.ASM           b   RDI.ASM
    a   REMDEV.ASM        b   REMDEV.ASM
    a   REMTASK.ASM       b   REMTASK.ASM
                          b   RETRY.ASM
                          b   RSA.H
    a   SEARCH.ASM        b   SEARCH.ASM
                          b   SERIAL.DEF
    a   SERINFO.ASM       b   SERINFO.ASM
    a   SERIOMAC.INC      b   SERIOMAC.INC
    a   SETMOUSE.ASM      b   SETMOUSE.ASM
    a   SETSER.ASM        b   SETSER.ASM
    a   SPOOL.ASM         b   SPOOL.ASM
    a   SRTERM.ASM        b   SRTERM.ASM
                          b   SRTERM.DEF
    a   SUNIOMAC.INC      b   SUNIOMAC.INC
    a   T1DEF.INC         b   T1DEF.INC
    a   T5DEF.INC         b   T5DEF.INC
    a   TERMDEF.INC
    a   TESTING.INC       b   TESTING.INC
    a   TIM1.ASM          b   TIM1.ASM
    a   TTDEF.INC         b   TTDEF.INC
    a   TVDEF.INC         b   TVDEF.INC
    a   UNTERM.ASM        b   UNTERM.ASM
    a   UPDAT501.ASM      b   UPDAT501.ASM
    a   VERIFY.ASM        b   VERIFY.ASM
    a   VERSCHK.INC       b   VERSCHK.INC
    a   VERSION.INC       b   VERSION.INC
    a   VGNA.ASM          b   VGNA.ASM
    a   VIDCHK.INC        b   VIDCHK.INC
    a   VIDPATCH.ASM      b   VIDPATCH.ASM
    a   VIEW.ASM          b   VIEW.ASM
    a   VNAPLUS.ASM       b   VNAPLUS.ASM
    a   VPTIOMAC.INC      b   VPTIOMAC.INC
    a   VTDEF.INC         b   VTDEF.INC
    a   VTDRIVER.ASM      b   VTDRIVER.ASM
    a   WDI.ASM           b   WDI.ASM
    a   WDIOTHER.ASM      b   WDIOTHER.ASM
    a   XIFMACS.INC       b   XIFMACS.INC
                          b   _286.ASM
    a   _286N.ASM         b   _286N.ASM
    a   _386.ASM          b   _386.ASM
    a   _ALL.ASM          b   _ALL.ASM
    a   _ARNET.ASM        b   _ARNET.ASM
    a   _CHARGE.ASM       b   _CHARGE.ASM
                          b   _DPMI.ASM
    a   _DPMI.INC         b   _DPMI.INC
    a   _EMS.ASM          b   _EMS.ASM
    a   _GIZMO.ASM        b   _GIZMO.ASM
    a   _MOUSE.ASM        b   _MOUSE.ASM
    a   _NETBIOS.ASM      b   _NETBIOS.ASM
    a   _PIPE.ASM         b   _PIPE.ASM
    a   _RAMDISK.ASM      b   _RAMDISK.ASM
    a   _SERIAL.ASM       b   _SERIAL.ASM
the-grue commented 5 years ago

I would imagine it is an incomplete/unfinished release. VERSION.INC in both trees say 5.1, so it wasn't "officially" changed to a different version as far as I can tell.

ghost commented 5 years ago

I wondered why MAKEMOS.BAT uses mos5src to build the shell

cd ..\mos5src make -f makeutil.mak all

So I tried it with kernel instead of mos5src, but it failed. Some of the files that exist is both places are different, so there is a potential mismatch between kernel and shell. I think each file must be examined for changes to know what we are working with. Seems like a tedious task.

ghost commented 5 years ago

Thinking about the date bug, I thought why not start by working backwards from the output error message "Cannot find file" so I started looking at the boot floppy image and found that string in command.com. Then I changed one byte of the string to prove it's the one I'm looking for, and now the boot fails with

Internal error # Command processor cannot be found.

So you can't just willy nilly change object bytes in command.com. That's good to know. But I thought $$shell.sys was the command processor. What is its connection to command.com, anyone know?

ghost commented 5 years ago

Comparing the floppy image directory vs shipmos, I see many identical dates, but on the floppy some newer dates too, so maybe some patches have been applied to the floppy.

shipmos has a 524 byte command.com, 33794 byte $$shell.sys

the floppy is the other way around, a 41825 byte command.com and 2 byte $$shell.sys

So apparently they are related, but grep did not see any mention of command.com in a makefile. Maybe something funky they did with patches.

More confusion to sort out ...

roelandjansen commented 5 years ago

5.02 never has been released;

there was also a start made that would make DPMI possible.

the-grue commented 5 years ago

Hi @src153! Have you tried the full build under the kernel directory? Almost everything will build. I'll put up a patch shortly to fix it so everything in there builds with the commands:

make -f kernel.mak $$mos.sys or make -f kernel.mak $$eval.sys make -f makeutil.mak all make -f maketerm.mak all

I'll also fix the issue @andrewbird discovered yesterday in mos5src/makeutil.mak with the C builds not being able to find the include files. See #37

the-grue commented 5 years ago

See fix 1a5b9c. I really need to learn how to use this tool more effectively!

ghost commented 5 years ago

The 2012 date bug is evident when you "type" the contents of a file. The error message is "Cannot find file". I found that message in moxcpcor.asm (one of the shell modules). I altered it and rebuilt the shell to verify I had the correct string, so now I know where it comes from. My idea is to work backwards from there, if possible, towards the date bug. Maybe just wishful thinking, but it's the best idea I have ATM.

But meanwhile, I noticed that moxcpcor.asm is one of those files in MOS5SRC that has been updated for 5.02. The changelog ends at "mjs 8/12/92 version 5.04" and it says, patched into release 5.01 by updat501.sys version 1.08. So then I look at updat501.asm, and it includes patches up to 1.13. So then I look in KERNEL at updat501.asm, and it's the same, up to 1.13. And a file compare shows the two are identical. So far so good, with updat501.asm.

But I see that moxcpcor.asm has many changes. However, that may be OK. If all changes to the shell are backwards compatible with the 5.01 kernel, building the shell from MOS5SRC should be fine. But are they? Who knows. I guess the best thing is to keep using MOS5SRC for the shell, until something breaks.

andrewbird commented 5 years ago

I guess the best thing is to keep using MOS5SRC for the shell, until something breaks.

I don't know, you raise some valid points about mos5src being a 5.02 work in progress.

ghost commented 5 years ago

moxcpcor.asm has some post 5.01 changes that sound important. And they sound backwards compatible with 5.01 (maybe?). But that's a guess. We're like archaeologists trying to understand an ancient culture by digging up their bones.

the-grue commented 5 years ago

On a lark, I ran command.com from SHIPMOS.ZIP through the debugger and it is built as moxcptsk.com from moxcptsk.asm. Not sure at what point in the shipping process it gets renamed, but there it is.

24 bytes of code and 500 bytes of "db 100 dup ('stack')

ghost commented 5 years ago

Thank you. Mysteries like that bug me. 1 mystery solved, infinity-1 to go.

ghost commented 5 years ago

On a lark, I ran command.com from SHIPMOS.ZIP through the debugger and it is built as moxcptsk.com from moxcptsk.asm. Not sure at what point in the shipping process it gets renamed, but there it is.

24 bytes of code and 500 bytes of "db 100 dup ('stack')

This is important to know. How can it be flagged for later search, and not lost in closed issues? Can the Wiki index to a post?

ghost commented 5 years ago

Settled, closing.