8008guy
Veteran Member
In case you missed this
https://hackaday.com/2018/10/01/microsoft-releases-crown-jewels-from-1982/#more-327120
https://hackaday.com/2018/10/01/microsoft-releases-crown-jewels-from-1982/#more-327120
It is a pity that IO.SYS is missing.
It is a pity that IO.SYS is missing.
It is present. What is not present, unfortunately, is a description of a working build process (ie. how to turn the source into a bootable disk). An old MASM is required, but that's easy to fix.
Is SKELIO.ASM not it? It's my understanding IO.SYS is where OEM customizations went.
Thank you !!!!is skelio.asm not it? It's my understanding io.sys is where oem customizations went.
I've reconstructed these based on the binary MSDOS.SYS in the same release, so you can find building 2.00 and 2.11 versions of MSDOS.SYS at http://www.seasip.info/DOS/
Next step, fix that bug in DEBUG that gets the CALL 5 offset 2 bytes too low (still present in the Windows 10 DEBUG!)
;MSCODE.ASM - line 112 (+1 byte)
entry CALL_ENTRY ; System call entry point and dispatcher
POP AX ; IP from the INT at 8
POP AX ; Segment from the INT at 8
POPF ; Restore flags
;MISC.ASM - line 629 (-3 bytes)
HAVDIF:
; MOV BX,ENTRYPOINTSEG
; SUB BX,AX
MOV CL,4
SHL AX,CL
MOV DS,DX
MOV WORD PTR DS:[PDB_CPM_Call+1],AX
; MOV WORD PTR DS:[PDB_CPM_Call+3],BX
MOV WORD PTR DS:[PDB_CPM_Call+3],(30H SHL 8) + mi_INT
MOV DS:[PDB_Exit_Call],(int_abort SHL 8) + mi_INT
; MOV BYTE PTR DS:[PDB_CPM_Call],mi_Long_CALL
MOV BYTE PTR DS:[PDB_CPM_Call],3DH
;MSINIT.ASM - line 272 (-5 bytes)
; MOV BYTE PTR DS:[ENTRYPOINT],mi_Long_JMP
; MOV WORD PTR DS:[ENTRYPOINT+1],OFFSET DOSGROUP:CALL_ENTRY
MOV WORD PTR DS:[ENTRYPOINT],OFFSET DOSGROUP:CALL_ENTRY
; MOV WORD PTR DS:[ENTRYPOINT+3],AX
MOV WORD PTR DS:[ENTRYPOINT+2],AX
How about rewriting the CALL 5 hack entirely, so that it doesn't rely on address wraparound?
You would break WordStar 3 if you do that. WordStar is one of the CP/M derived programs that checked the value of memory size in that position. I think a lot more programs used the memory size value than bothered with CALL 5, especially since CALL 5's stack rearranging and other CP/M oddities were poorly documented.
PSP looks like this:
0005 DB 3Dh ;opcode for cmp ax,
0006 DW memory_size
0008 INT 30h
Yes, that's why I leave that intact, embedded in a 'CMP AX,xxxx' instruction (affects only flags).
Code:PSP looks like this: 0005 DB 3Dh ;opcode for cmp ax, 0006 DW memory_size 0008 INT 30h
The only thing this would break is code that relies on a far jump being at 0000:00C0
You would break WordStar 3 if you do that. WordStar is one of the CP/M derived programs that checked the value of memory size in that position. I think a lot more programs used the memory size value than bothered with CALL 5, especially since CALL 5's stack rearranging and other CP/M oddities were poorly documented.