Welcome, Guest. Please login or register.


Author Topic: IS-DOS crash bug. (Read 1982 times)

Offline BruceTanner

  • EP lover
  • *
  • Posts: 550
  • Country: gb
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #15 on: 2021.January.06. 23:54:37 »
There is another reason we might need to be able to re-build IS-DOS: EXDOS 3 and FAT16 support in CP/M apps.

EXDOS 3 has to use an extra byte in the "reserved" area of the FISH FCB structure (for flags which were previously held in the top 4 bits of a FAT12 cluster number). The question that has been in my mind recently is: when IS-DOS converts FISH FCBs to CP/M FCBs, and back again, is this byte also copied? Probably not :oops: but I haven't been able to try it yet :oops: :oops: Looking at the source now, definitely not :oops: :oops: :oops:.

I cannot remember from 30+ years ago if there is an unused / reserved byte in CP/M FCBs that can be used; if there are, it should be an easy fix but if there are not, it will need more thought...:roll:

Offline elmer

  • EP fan
  • *
  • Posts: 144
  • Country: us
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #16 on: 2021.January.07. 00:00:18 »
i will try to create one file from sources, i hope, it can be managed. Until now i could manage these kind of activities, and i hope it can be done for IS-DOS also.

Good luck! Having it all in one SJASM source file would be useful for quick assemby.

I'll send you my disassembly of the whole of IS-DOS, partially commented, and the SJASM build files that I am using for making the patched versions. :cool:

Offline elmer

  • EP fan
  • *
  • Posts: 144
  • Country: us
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #17 on: 2021.January.07. 00:12:20 »
There is another reason we might need to be able to re-build IS-DOS: EXDOS 3 and FAT16 support in CP/M apps.

:ds_icon_cheesygrin:


I cannot remember from 30+ years ago if there is an unused / reserved byte in CP/M FCBs that can be used; if there are, it should be an easy fix but if there are not, it will need more thought...:roll:

One of the things that I'd love to import from other versions of CP/M 2.2, if it isn't already used in IS-DOS, is the otherwise-undefined LAST RECORD BYTE COUNT, that CP/M 3 uses to define exact file sizes.

https://www.seasip.info/Cpm/bytelen.html




Online gflorez

  • EP addict
  • *
  • Posts: 3065
  • Country: es
  • OS:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #18 on: 2021.January.07. 01:46:58 »
... there's a decent amount of self-modifying code in there, so it can't just run as a ROM.

Maybe, once the code sorted, you can compare it with the EXDOS+ISDOS Rom we manage. As far as I know the two Roms were packed on Hungary, not by Intelligent Software. But I don't know if in this case the Rom is only a container to load in Ram the ISDOS extension.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13801
  • Country: hu
  • OS:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
    • http://enterprise.iko.hu/
Re: IS-DOS crash bug.
« Reply #19 on: 2021.January.07. 10:28:59 »
Maybe, once the code sorted, you can compare it with the EXDOS+ISDOS Rom we manage. As far as I know the two Roms were packed on Hungary, not by Intelligent Software. But I don't know if in this case the Rom is only a container to load in Ram the ISDOS extension.
The "ROM ISDOS" just copy (decompress) the IS-DOS.SYS file to 100h and start is, simulate the original 05h type file start.
And only a little modification: when the IS-DOS reload itself, modified it for copy it again from ROM instead from loading from disk.

Offline BruceTanner

  • EP lover
  • *
  • Posts: 550
  • Country: gb
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #20 on: 2021.January.07. 20:17:51 »
Original sources using M80 and L80, possible to do the job under IS-DOS, but much faster to use XCPM utility from Lgb, which are run these CP/M programs under Windows (Linux version also exist).
Run M.BAT then L.BAT for do the job.
Just in case anyone else is trying: using M80 with XCPM when I was working on EXDOS, I found that it could not produce .PRN files. Might just be the Linux version...:roll:

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13801
  • Country: hu
  • OS:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
    • http://enterprise.iko.hu/
Re: IS-DOS crash bug.
« Reply #21 on: 2021.January.07. 20:43:20 »
Just in case anyone else is trying: using M80 with XCPM when I was working on EXDOS, I found that it could not produce .PRN files. Might just be the Linux version...:roll:
Under Windows is working!

Offline geco

  • EP addict
  • *
  • Posts: 5849
  • Country: hu
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 78.0 Firefox 78.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #22 on: 2021.January.08. 19:46:30 »
Here is the SJASM version of the sources of IS-DOS 1.0, it is ugly, because i changed all TAB's to spaces, but i started it and it is working, it seems our original ISDOS.SYS was dumped from the memory, because there are 2 bigger areas and a 2 byte and a 4 byte space which contain data, compiled source contains 00h-s, and filled up after start.

Please check it, and report if you find any problem.

Offline elmer

  • EP fan
  • *
  • Posts: 144
  • Country: us
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #23 on: 2021.January.08. 20:26:11 »
Here is the SJASM version of the sources of IS-DOS 1.0, it is ugly, because i changed all TAB's to spaces, but i started it and it is working, it seems our original ISDOS.SYS was dumped from the memory, because there are 2 bigger areas and a 2 byte and a 4 byte space which contain data, compiled source contains 00h-s, and filled up after start.

Cool, thanks! :)

Yes, the only thing that makes sense to me is that source was built on a computer that had used MOVECPM to make a 48KB CP/M system (with 40KB TPA), and leave the top 16KB free for linking programs directly into the Page3 ($C000-$FFFF) region.

The two numbers printed when you assemble START.MAC are the addresses needed for the L80 "/P" options that put IS-DOS into the correct area of memory.

Then the development batch file would just save out the memory (using the numbers printed), and the ISSQUASH program mentioned in START.MAC is then used to process the memory dump and insert the missing checksum data, and the serial# data, into the final IS-DOS.SYS image.

That is kinda cool, and it certainly helps to explain (to me) how the programmers at IS managed to develop the Enterprise ROMs with rather primitive M80/L80 programs that were available back then.

IIRC, there were a number of CP/M add-in boards for the IBM PC back then that would have allowed for this kind of workflow.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13801
  • Country: hu
  • OS:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
    • http://enterprise.iko.hu/
Re: IS-DOS crash bug.
« Reply #24 on: 2021.January.08. 20:49:11 »
IIRC, there were a number of CP/M add-in boards for the IBM PC back then that would have allowed for this kind of workflow.
Yes, Bruce already wrote it earlier: at the IS used PC with a Z80 card. Softwares started before any Enterprise hardware exist.

Offline elmer

  • EP fan
  • *
  • Posts: 144
  • Country: us
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #25 on: 2021.January.09. 18:49:50 »
I've kept on working (for the moment) with the original source files that Zozo kindly posted earlier, and his build scripts only need a few changes to compile a good version of IS-DOS ...

Change MAKECOM.ASM ...
Code: [Select]
  defpage 0
  page 0

  output IS-DOS.NEW
 
  org 00f0h
  incbin ISDOS.BIN,008Ch

PEND: equ $
  end   

Change L.BAT ...
Code: [Select]
DEL OS.REL 2> nul
XCPM LIB80.COM OS=CODES,EXCODES,BOOT0/E 2> nul
REN OS.LIB OS.REL
XCPM L80.COM OS,/P:C9E4,START,VID,CLI,CMD,FNINIT,CLIV,/P:E100,FIX,CLIO,CLIF,REBOOT,FNVAR,FUNC,CPM,CHAR,BUFDEV,VIDEV,END,ISDOS.BIN/N/Y/E <nnnn 2> nul
SJASM4 MAKECOM.ASM


To explain ... the L80 command line is too long if you add in all of the filenames and the "/P" commands, so I used LIB80 to create an OS.REL library from the first three assembled files, so that it can be used to shorten the command line.

This is than complicated because XCPM doesn't seem to support LIB80 renaming the output file from OS.LIB to OS.REL, so I had to specifically add that to the L.BAT file.


When L80 links a file to the top of memory like this, it adds a 128-byte header onto the file to move the data into place when the .COM file is run, so I had to modify MAKECOM.ASM to strip off the extra bytes from the front of the file.


When that is all built, you basically get a file called "IS-DOS.NEW" that is almost-identical to the shipped version of IS-DOS.SYS.

There are a few differences, but the only one that actually matters is that the "Duplicate Definition" of "ORM" that L80 reports is something that MUST be fixed.

Attached is a file showing the differences between IS-DOS.SYS and ISDOS.NEW, where they come from, and why they are expected and don't matter.

Anyway, the point of this is to confirm that the original source files from 1985 really do correspond to the shipped version of IS-DOS that we all know and love. ;-)

Offline geco

  • EP addict
  • *
  • Posts: 5849
  • Country: hu
  • OS:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #26 on: 2021.January.09. 18:57:48 »
Yes, I got nearly the same differences with the sjasm version, except if i remember well the 6 bytes from CMD.MAC.
I used 0C900h as delta, because i set org 00f0h before EXOS header

Offline BruceTanner

  • EP lover
  • *
  • Posts: 550
  • Country: gb
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #27 on: 2021.January.09. 19:09:17 »
the L80 command line is too long if you add in all of the filenames and the "/P" commands
The .REL files do not have to have the same base name as the source files, and back in the day (and still for EXDOS 3) we would assemble the sensibly-named .MAC source files to a less-sensibly-named two letter .REL file, for example START.MAC would assemble to ST.REL, REBOOT.MAC would assemble to RE.REL etc to shorten the L80 command line length!

XCPM doesn't seem to support LIB80 renaming the output file from OS.LIB to OS.REL.
I am not surprised, XCPM is very hacked together by lgb and he did warn us that not all functions are supported! :roll:

Anyway, the point of this is to confirm that the original source files from 1985 really do correspond to the shipped version of IS-DOS that we all know and love. ;-)
This is very good news! :mrgreen:

Offline elmer

  • EP fan
  • *
  • Posts: 144
  • Country: us
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #28 on: 2021.January.09. 19:11:10 »
Yes, I got nearly the same differences with the sjasm version, except if i remember well the 6 bytes from CMD.MAC.

You did a better job than me! ;-)


I don't know why I wanted to get the original M80/L80 build working, but it seemed nice to think that we could actually build this code on an Enterprise itself someday (if IS-DOS allowed us to leave the top 16KB segment free for L80 to use ... which the original IS-DOS specification would have supported).


Anyway, another thing  ... Bruce, while I was getting frustrated trying to figure out how to make this work, and couldn't find out where XCPM came from, I ended up making a 48KB CP/M environment to do the M80/L80 build in RunCPM.  Is that a program that you have seen (it is linux-compatible)?

Offline BruceTanner

  • EP lover
  • *
  • Posts: 550
  • Country: gb
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 84.0 Firefox 84.0
    • View Profile
Re: IS-DOS crash bug.
« Reply #29 on: 2021.January.09. 19:13:53 »
So... M80 or SJASM? :twisted: :lol:

Good work both, choice is good! :mrgreen: