Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
mikegonta

14.06.2015, 15:02
 

when DOS is not DOS (Miscellaneous)

In the beginning, int 0x21 was two MS-DOS system files - io.sys and msdos.sys. Originally io.sys was an OEM customizable BIOS similar to the earlier CPM's BDOS. When IBM introduced the "PC" io.sys was and is an interface to the classic PC BIOS. msdos.sys is the low level file system interface. In the latest actual DOS version (the one that came with Windows98) io.sys contains the functionality of msdos.sys (msdos.sys is actually a text file for configuration). io.sys is a high level BIOS and while it is the essence of DOS - it's not actually DOS, nor is it an operating system - that's the providence of command.com.

Simply rename your own real mode operating system (standalone, game, etc) "command.com" and create a bootable DOS USB flash drive with the latest version of io.sys (freely downloadable on the net). io.sys will load and initialize and then load and run your own real mode code - giving you full access to the MS-DOS "BIOS" without actually running DOS.

You've always been able to replace command.com with your own version, however the user will see a screen asking for the name and location of the replacement (even if it is named command.com and is located in the root directory.
To get around this and have io.sys load and run your own code directly it must be a DOS "MZ" exe file even though it is named command.com and the first byte of the code must be 0x7A which is is checked by io.sys.

0x7A is the "jp" opcode.

; FASM
use16
format mz
  jp .1 ; first byte must be 0x7A
.1:

; io.sys displays a Windows98 splash screen in graphics mode
  mov ax, 3
  int 0x10 ; change to text mode
 
  push cs
  pop ds
  mov ah, 9
  mov dx, hello
  int 0x21
  jmp $
hello: db 'hello IOsys world$'

In this version of io.sys - io.sys does not have to be the first file in the root directory, msdos.sys is not required (not even an empty file) and long file names are supported. Another cool thing is that you can have io.sys display your own splash screen instead of the Windows98. Simply create a 320X400 256 color bmp, rename it "logo.sys" and put it in the root directory.

---
Mike Gonta
look and see - many look but few see

SudoBIOS - a completely transparent 32 bit protected mode BIOS extender - say goodbye to real mode code.

glennmcc

Homepage E-mail

North Jackson, Ohio (USA),
14.06.2015, 19:42

@ mikegonta

when DOS is not DOS

Was I wrong all these years in thinking that IO.SYS/MSDOS.SYS in earlier
versions of MSDOS and later simply IO.SYS _were_ actually the OS
and that COMMAND.COM was simply the command interpreter ?


> In the beginning, int 0x21 was two MS-DOS system files -
> io.sys and msdos.sys. Originally io.sys was an OEM
> customizable BIOS similar to the earlier CPM's BDOS. When IBM
> introduced the "PC" io.sys was and is an interface to the classic PC
> BIOS. msdos.sys is the low level file system interface. In the
> latest actual DOS version (the one that came with Windows98) io.sys
> contains the functionality of msdos.sys (msdos.sys is actually a
> text file for configuration). io.sys is a high level BIOS and
> while it is the essence of DOS - it's not actually DOS, nor
> is it an operating system - that's the providence of command.com.
>

---
--
http://glennmcc.org/

mikegonta

14.06.2015, 19:56

@ glennmcc

when DOS is not DOS

glennmcc wrote:

> Was I wrong all these years in thinking that IO.SYS/MSDOS.SYS in earlier
> versions of MSDOS and later simply IO.SYS _were_ actually the OS
> and that COMMAND.COM was simply the command interpreter ?

Apparently you were/are absolutely right. The vast majority of people believe that the operating system is it's User Interface. Delete command.com, boot DOS and see what happens - nothing. Ask your friends what they think of that Operating System.

---
Mike Gonta
look and see - many look but few see

SudoBIOS - a completely transparent 32 bit protected mode BIOS extender - say goodbye to real mode code.

0ffer

Homepage

16.06.2015, 16:50

@ mikegonta

when DOS is not DOS

> To get around this and have io.sys load and run your own code
> directly it must be a DOS "MZ" exe file even though it is named
> command.com and the first byte of the code must be 0x7A which is is checked
> by io.sys.

How to change io.sys from MS-DOS 7.10 to remove this check?
io.sys from MS-DOS 8.0 make other check...

mikegonta

17.06.2015, 13:41

@ mikegonta

when DOS is not DOS

A lively discussion is here.

---
Mike Gonta
look and see - many look but few see

SudoBIOS - a completely transparent 32 bit protected mode BIOS extender - say goodbye to real mode code.

Back to the board
Thread view  Mix view  Order
22049 Postings in 2034 Threads, 396 registered users, 204 users online (0 registered, 204 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum