flat assembler
Message board for the users of flat assembler.

Index > OS Construction > xOS version 0.1

Thread Post new topic Reply to topic

Joined: 06 Jan 2011
Posts: 200
Well I added a few more features to my OS and also decided to stop calling it 'xOS Beta'. I thought it was about time to release a 'real' version. I'm not calling it Ver 1.0, but rather 0.1 because it still lacks many features I wish to soon implement. Anyways here it goes...
*Basic file I (not I/O because there isn't any writing yet so for now just I)
*12 API's via int 21h & 20h
*'DIR' simple wild cards eg. '*.com'
*COM and EXE execution
*TSR support
I've also included some more example programs including a command line bitmap viewer (file must be less than 64k).
here is the readme from the folder
-----xOS version 0.1 user guide------------
1. About
2. Command line
3. Programming
4. API's
1. About-----------------------------------
    xOS is a simple Hobby OS written in FASM that aims to be an education learning platform for beginner OS developers.
 xOS is free to modify and distribute as long as the author (Me239) is given credit and is licensed under the GNU General        

        Public License.
2. Command line-----------------------------
     xOS features a simple command line interface capable of running applications with multiple arguments and parameters and         

        allows wild cards for it's 'dir' command. xOS uses standard MS-DOS executables COM and EXE files. To run a COM file,         

simple type the name with or without the .com extension. To run an EXE, the .exe extension MUST be specified, otherwise                 

the COM file with that name will be executed or a 'Bad command or file name' message will be produced. For help using the     

command line in xOS simply type 'help' in the command line and a list of valid commands will be brought up along with an      

explanation of each command's functions.
3. Programming------------------------------
   xOS features several API's for general program usage. The kernel's main interrupts are interrupt 21h for programs and                 

also interrupt 20h for program termination. xOS allows for both of these interrupts to be hooked, but can be 
       disabled by typing 'restart' at the prompt. TSR's are also one of xOS's features. xOS gives each TSR a spot in HIMEM
    in respect to it's size. Each program is loaded at segment 0x1010 in order to provide enough room for disk buffers 
        used by the kernel, so memory access below segment 0x1010 is highly discouraged otherwise the system may crash. 
    Whenever a program is executed, the first 31 bytes of the command line is placed at offset 0x80 to allow input from
 the command line interface. Here is an example 'Hello World' program written for xOS in FASM:
            org 100h ; standard MS-DOS COM file
                  mov ah, 03 ; xOS's print string function
                   mov si, msg ; address of the string
                 int 21h ; xOS's kernel interrupt
                   int 20h ; terminate our program
             msg     db 'Hello World!', 0 ; NULL terminated string to be printed
    Many other examples are included in the 'Examples' folder along with the source. 
4. API's-------------------------------------
     Here is a list of all the functions currently supported in xOS
*INT 20H*
No parameters, ends program

*INT 21h*
*MessageBox (Creates a red messagebox in the center of the screen with text)
AH = 01
DS:SI = location of message
*Create fullscreen box with status bar
AH = 02
DH = top and bottom status bar color
DL = foreground color
DS:SI = text to printed to status bar
*Print string
AH = 03
DS:SI = location of NULL terminated string
AH = 04
*Allocate TSR memory block
AH = 05
CX = number of paragraphs to be allocated +1 for rounding
AX = new segment for tsr block
*Hook interrupt
AH = 06
AL = Interrupt number
BX = Segment of handler
DX = Offset of handler
*Read/execute file
AH = 07
AL = 1 for read file or 2 for execute file
DS:BX = segment and offset to read or execute file into
DS:SI = location of file name to load
CX = file size
*Print character to STDOUT
AH = 08
AL = character
*Get Interrupt handler
AH = 09
AL = Interrupt number
AX = handler offset
BX = handler segment 
*Delete file
AH = 0ah
DS:SI = file to delete
*Rename file
AH = 0bh
DS:SI = original file name
ES:DI = new filename


Description: xOS source folder
Filename: cmd.zip
Filesize: 157.89 KB
Downloaded: 77 Time(s)

Post 17 Jul 2011, 08:33
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.