flat assembler
Message board for the users of flat assembler.

Index > OS Construction > xOS version 0.2

Author
Thread Post new topic Reply to topic
me239



Joined: 06 Jan 2011
Posts: 200
me239 09 Aug 2011, 23:10
Hello everyone, here is another update of xOS.
Screenshots:

Image
Image
Image
Image
Readme:
Code:
-----xOS version 0.2 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 educational 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
         start:
                  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
---------------------------------
*Clear-screen
AH = 04
---------------------------------
*Allocate TSR memory block
AH = 05
CX = number of paragraphs to be allocated +1 for rounding
return:
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
return:
CX = file size
-------------------------------
*Print character to STDOUT
AH = 08
AL = character
-------------------------------
*Get Interrupt handler
AH = 09
AL = Interrupt number
Returns:
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
-------------------------------
*Get string
AH = 0ch
DS:SI = location of buffer
CX = number of characters to accept
-------------------------------
*Get numerical input
AH = 0dh
Returns:
AX = numerical value typed in word format
-------------------------------
*OS diagnostic
AH = 0eh
Returns:
CX = size of kernel
DL = number of TSRs active
BX = version of kernel
AX = amount of usable memory
-------------------------------
*Get date
AH = 0fh
Returns(values in BCD):
CH = century
CL = year
DH = month
DL = day
-------------------------------
*Get time
AH = 10h
Returns(values in BCD):
CH = hour
CL = minutes
DH = seconds
DL = daylight savings flag
-------------------------------
*Print number
AH = 11h
BX = number to be printed
    

List of included examples and description:
A20.ASM = checks to see if A20 line is enabled and if not, enable it
BASIC.ASM = MikeOS basic ported to xOS. Type name of .BAS file to run after command
BMP.ASM = Simple command line bitmap viewer
CLOCK.ASM = TSR clock application
DEL.ASM = sample program to delete del.txt
DIAG.ASM = sample program to show kernel size etc.
DOS.ASM = hello world for MS-DOS
DOSTSR.ASM = MS-DOS TSR emulator using Dex4u's int 21h
ESCAPE.ASM = TSR application to terminate frozen programs. Press F12 to exit the application.
EXET/2.ASM = sample EXE programs
FAT.ASM = sample program to display a text file to the prompt
FILEN.ASM = sample program to demonstrate the rename api
HELLO.ASM = simple hello world program
INP.ASM = simple dialog box using my ASCII GUI
LOOP.ASM = purposely hangs computer as a demonstration for my Escape utility
SMILE.ASM = sample smile application
SOUND.ASM = plays the tones G, D, A, C (closing time- semisonic)
TEMPA.ASM = simple temperature converter
TEST.ASM = samples different APIs available
TSR.ASM = hooks int 22h
TSR2.ASM = hooks int 23h
TSR3.asm = hooks int 21h
TSRTEST.ASM = test int 22h and 23h
VID.ASM = application to change video/graphic modes
WIN.ASM = sample window app using my ASCII GUI
GTEMP.ASM = graphical temperature converter. Syntax: gtemp <C for Celsius to Fahrenheit or F for Fahrenheit to Celsius>


Description:
Download
Filename: cmd.zip
Filesize: 238.87 KB
Downloaded: 821 Time(s)

Post 09 Aug 2011, 23:10
View user's profile Send private message Reply with quote
timryazthunder



Joined: 18 Jan 2014
Posts: 44
timryazthunder 16 Mar 2014, 06:58
Your interface looks like MS-DOS.
Post 16 Mar 2014, 06:58
View user's profile Send private message Reply with quote
me239



Joined: 06 Jan 2011
Posts: 200
me239 07 Aug 2014, 02:25
timryazthunder wrote:
Your interface looks like MS-DOS.
I was sort of going for that look. I manually placed all the spaces in the "dir" coto look like DOS (I'm a big fan). There are some inconsistencies with the layout (certain spaces in other commands). Some people don't believe it's actually from scratch and think it's FreeDOS or some other flavor. I can promise I made it though.
Post 07 Aug 2014, 02:25
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.