This is a little tutorial for writing machine code and a friendly guide of MSB-OS which makes
the preceding goal possible.
SETUP AND CONFIGURATIONS:
Setup :
1) First download the MSB operating system from :
http://www.magicschoolbook.com/computing/MSB-OS_v3.img which is the latest
version v3
A previous version can be downloaded
from:http://www.magicschoolbook.com/computing/MSB-OS_v2.img which is the
preceding version v2.
1) You would also need a PC emulator such as Bochs which can run the MSB-OS img
file. Bochs is a small but powerful emulator and can be downloaded
from:https://www.emutopia.com/index.php/item/1939-bochs-2-6-11 (Actually i
recommend downloading from 3rd link given in the links section) which is the latest
version, Previous versions can be easily downloaded from the same site.
You have to install it on your device.
Configurations:
After installation on the installation window you have to click/select/tick on run/open bochs
and exit option along with the read-me file option(Avoid clicking on the desktop icon which
gets created).
1) Bochs is successfully installed and a Start-menu will appear where there is a
list of options to select from,"Disk & boot" is the one to select, then you click
the "edit" button to the left.
2) Set it up to use a 1.44MB floppy drive.
3) Then click the browse button to select the MSB-OS image file.
4) Then select the disk type, again 1.44MB.
5) Do not select the write protection option
6) Then set the status to inserted.
7) Once you've edited the settings, you can save it (Save using the name
MSB-OS). You have to save so that you don't have to set it all up again in
future. A small configuration file will be created, you can create a desktop
shortcut for that
8) Start button then runs it.
Welcome to MSB-OS : Click Enter(Return key)
This will take us to the Control Room.
Navigation: You can navigate using the arrow keys and You can come back to the
Control Room anytime you want on the press of one single key - F11.
To explore you can press enter to see what's inside the particular section.
Note: Don't type anything you are not sure of as it may lead to a crash, if anything of
that sort happens try pressing the Esc key or exit Bochs.
Navigate and enter the middle box “Text Editor + Manual”: Now press F1 key to load
the Manuals.
As you can see a list of manual appear, Navigate to Man1 and enter :
The text editor can be accessed by using Ctrl+n for creation of new manuals and
other text files.
Preview of Man1 : Try reading the manuals to get a better understanding on MSB-OS
and also try to follow the instructions for writing your first machine code. F5 key is
used for running the embedded machine code in the manual.
For quick navigation between pages you can use the keys PgUp and PgDn to go up and
down by a page respectively.
There are 2 Machine editors namely Mach.ed1(Green) and Mach.ed2(Blue/cyan) which can
be switched by pressing the F10 key but when you are inside the Text editor pressing F10
will simply turn the Editing mode active, this enables you to edit text.
If you want to return to Home or Control Room press F11 key.
To access the Mach.ed2(blue/cyan) you can press the F12 key (swap key):
Now if you press F12 key again you will return to manuals(location where you were earlier)
To switch to Mach.ed1(Green) use the F10 key (switch key) :
Note: if you press F12 now nothing happens, this is because Mach.ed1 does not support the
multitasking feature of Swapping by the means of F12 key but it can still support the use of
F10 (switch key).
Now if you press F10 key, you will return to the Blue Mach.ed2 and now if you press
F12(swap key) you will return to the manuals.This happens because Mach.ed2(Blue)
supports multitasking feature of swapping by means of F12 key.
Writing your First program: Go to Home(Control Room) by pressing F11 key and navigate to
the box above Text editor+Manual that is Machine editor.
After entering the Machine Editor you will see one of the program code cells lit up in cyan :
If you scroll up(by using PgUp key), you'll find the top of it and you'll see the numbers
change to a duller colour once you've gone outside that cell :
Note:If you scroll down to the end of it, you'll find the index, and then when the colour
changes you'll be out the other end of the cell.
Type the caps lock key, then type in "eoc" without the quotes and follow that with return.
"eoc" stands for end of code.
You can change the zeros after that without doing any harm to anything, Something like this
must appear:
Scroll up and you'll see that you're at the end of the code (Page-up key) and you should see
something like this:
The routine "rbwt" reboots the machine.
Don't touch anything there though - it's safe to look.
Note:Page-down key lets you run down to the index.
If you scroll on down to the index...you'll reach an address with 124 in it. Keep an eye on the
numbers at the bottom left of the screen and you'll see one of them tick up towards 124 as
you press the PgDn key.That's where the index ends and you get into stack space.A little
further down is the start of the other machine editor.
Press F9 and select Mach.Ed1and then you would be able to see cyan color cells,That
means it's able to edit it:
you scroll down to