Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

when DOS is not DOS (Miscellaneous)

posted by mikegonta(R), 14.06.2015, 15:02

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.

 

Complete thread:

Back to the forum
Board view  Mix view
15192 Postings in 1365 Threads, 250 registered users, 13 users online (0 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum