flat assembler
Message board for the users of flat assembler.

Index > OS Construction > xOS update

Author
Thread Post new topic Reply to topic
me239



Joined: 06 Jan 2011
Posts: 200
me239 10 Jul 2011, 05:11
Well, I thought it was about time I update my xOS since I haven't worked on it in about a year, so here it is. NEW FEATURES:
*FAT12 read and execution
*10 API's via int 21h and 20h
Interrupts:

*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
-------------------------------
*Print character to STDOUT
AH = 08
AL = character
-------------------------------
*Get Interrupt handler
AH = 09
AL = Interrupt number
Returns:
AX = handler offset
BX = handler segment

I know it still needs improvement, but I think it still looks pretty nice for a couple of hours of work.
EXAMPLE PROGRAMS: The floppy includes a few sample programs to demonstrate xOS's API's
TEST.COM, creates a window, reads the first 50 characters of TEST.TXT, waits for keypress, and then displays a message box
HELLO.COM basic hello world application
PIC.COM sample Bitmap program for mode 13h
VID.COM allows users to change video modes with a keypress
FAT.COM reads first 50 characters of TEST.TXT to STDOUT
TSRTEST.COM tests interrupts 22h & 23h
TSR.COM hooks interrupt 22h, loads itself to upper memory, and reports new segment in decimal
TSR2.COM same as TSR.COM, but hooks 23h
TSR3.COM example of hooking kernel interrupt 21h
CMD.COM kernel. Cannot be executed by user
SMILE.COM smiley application
W.COM my impression of a VBDOS application with ASCII windows and buttons


Description: Includes all files with source for xOS Beta
Download
Filename: cmd.zip
Filesize: 55.23 KB
Downloaded: 313 Time(s)

Post 10 Jul 2011, 05:11
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.