flat assembler
Message board for the users of flat assembler.

Index > OS Construction > when DOS is not DOS

Author
Thread Post new topic Reply to topic
Mike Gonta



Joined: 26 Dec 2010
Posts: 243
Mike Gonta 14 Jun 2015, 12:21
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.
Code:
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

https://mikegonta.com
Post 14 Jun 2015, 12:21
View user's profile Send private message Visit poster's website Reply with quote
0ffer



Joined: 06 Sep 2014
Posts: 2
0ffer 16 Jun 2015, 15:06
Quote:

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?
Post 16 Jun 2015, 15:06
View user's profile Send private message Visit poster's website Reply with quote
Trinitek



Joined: 06 Nov 2011
Posts: 257
Trinitek 16 Jun 2015, 19:29
0ffer wrote:
How to change io.sys from MS-DOS 7.10 to remove this check?

Run it through a disassembler and look for something that looks like
Code:
cmp byte [???], 0x7A    
and replace the following JE or JNE instruction as you see fit to make it work.
Post 16 Jun 2015, 19:29
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.