Title
-Intro
-Disk Map
-RAM Map
-Boot
-Building
--Windows
--Other
-Contributing
-Bugs

$AX OS

System Guide

Intro

Disk Map

0x0000:0x0000 - 0x0000:0x0200
Kernel
[512 bytes]
0x0000:0x0200 - 0x0000:0x1A00
File Table
[6144 bytes]
0x0000:0x1A00 +
File Space


With the custom $AX filesystem there is the possibility of storing 1440 independant files, each consisting of a sector (512 bytes). In this space, the kernel and filesystem take 512 bytes and 6144 bytes. Please note that this leaves well over 1400 locations for programs or files.

RAM Map

0x0000 - 0x07C0
Reserved
0x07C0 - 0x09C0
Kernel
[512 bytes]
0x09C0 - 0x0BC0
System Variable space
[512 bytes]
0x0BC0 - 0x23C0
File table
[6144 bytes]
0x23C0 - 0xFFFF
Program space
[56383 bytes]


The System Variable space is technically open for any program to use but data may be wiped when calling to the kernel. The call most likely to wipe data from that area is get_string_and_print, where a maximum of 257 bytes can be over-written at the start of the variable space.

Please note that with the $AX OS, the file table is always loaded into RAM both speeding up file finding and reducing disk wearing. This helps keep the $AX OS fast but yet simple.

Yet another thing to note is that although theoretically there is 56383 of program space - this may be altered if the space doesn't exist. It's advised not to worry about it, as many modern computers can spare 64kB of RAM.

Boot

When the PC is powered on the kernel (bootloader) is loaded in at 07C0h. The kernel loads the file table at 0BC0h and then preceeds to load programs in at 23C0h.

Building

Below is advice on how to build $AX for different Operating Systems. All compilation has been done with NASM version 2.07, it is advised that you download this version as newer versions have been known not to work.

Windows

Make sure you have the correct version of NASM installed (2.07) before starting. I also like to have a program called HxD found at http://www.mh-nexus.de which proves to be a useful tool for editing a floppy disk or floppy disk image.
Step 1
Open the .asm (assembly) file you wish to edit in your favourite text editor. My prefference in windows is notepad.exe.
Step 2
Make the changes to the program that you want to change and save them.
Step 3
Open command prompt and type the following:
cd "location of installed NASM"
nasm "location of changed assembly file"

Where between the speech marks is swapped for file locations.
Step 4
You should either have compiled code with your .asm file or have a compile error in command prompt. If you have a compile error, refer to NASM's online documentation or forums. If you don't have an error, continue to Step 5.
Step 5
Open up HxD (or your own Hex editor). Note that on newer versions of Windows you will have to open the Hex editor with Administrator privelages. Now open either the floppy disk or floppy disk image in the editor that you wish to test after. In the same program also open the binary file (NOT the .asm file).
Step 6
Now copy the binary file over the top of the previous binary. Note that both should be 512 bytes big and should overlap perfectly.
Step 7
Save the edited floppy disk or floppy disk image and run it.

Congratulations, you have now edited your first program in $AX! If you have any questions, please email me at danbarry16@googlemail.com.

Other

If you figure out how to compile $AX on a OS not mentioned here, please upload how you did this at http://www.heluxresearch.info. As a general rule of thumb, try following the instructions that closest resembles the system you are running currently.

Contributing

Contributing can be done by emailing danbarry16@googlemail.com with the code you want to change and a description of the changes you have made. Please try to maintain the current formatting style and comment as much of the code as is needed in order to make sense to new comers. Happy coding!

Bugs

If you are using the OS on either real hardware or a virtual machine and encounter a bug, please feel free to submit a bug in the issues section, along with what the bug is and how we can repeat it. If you think the bug may be specific to your system please also give us the details of your hardware.

Bugs and suggestions can be submitted at http://www.heluxresearch.info.