|
Post by Uncle Henry on Oct 16, 2017 5:45:21 GMT -5
The recordings in "Works on the Wireless", although they thrill me personally, appear not to excite the members at the Art-Music forum very much at all. Nor is there at the present forum a great deal of enthusiasm for our lady novelists is that not so? So, although we will not stop contributing to those two, we need a further enterprise.
Now both "Linux" and "Windows" are highly unsatisfactory; there is an urgent requirement for a new computer operating system what. So that is what we shall do: write one.
We already have the "boot" code, which will be posted here in a day or two, with full explanation. What has to be done next:
1) We choose its name 2) We set out a set of requirements for it 3) We write an ethernet driver 4) We write an improved file system
This will all happen here on The Third, the members of which will be the first both to assist with, and to see, every aspect!
P.S. The original DOS took some American about six months to write, so it is all perfectly feasible isn't it.
|
|
|
Post by Uncle Henry on Oct 17, 2017 3:28:45 GMT -5
Well a first step could be to devise a suitable name for our system. We should not call it "doors" or "walls" is that not clearly so. Nor should we give it the name of its creator as in the case of "Linux", so we cannot call it "Sydney" is that not also so? At present it has the working title "Doris" but no doubt some one from our erudite membership can manage a much better one.
|
|
|
Post by Uncle Henry on Oct 18, 2017 4:29:00 GMT -5
If you want to follow along and do this yourselves you will need: Computer A, for development, preferably with Linux. I use one with Linux Slackware and the NASM assembler. If it is not already supplied you can download NASM from here: en.wikipedia.org/wiki/Netwide_Assemblerwww.nasm.us/Also the following, which you are almost certain to have already: dd, ls, and any text editor. Computer B, for testing. This should not contain any important data, since it will probably be overwritten. And thirdly, one USB stick, simply for transferring the OS from computer A to computer B. Probably it will be possible to use a Windows thing for computer A, but I have not tried doing that.
|
|
|
Post by Uncle Henry on Oct 21, 2017 3:40:09 GMT -5
Just a note about the units with which we will have to be dealing. For the purposes of the everyday BIOS our USB sticks are considered as if divided into a number of sectors, and each sector consists of 512 bytes. 512 bytes are the smallest quantity of data that can be read or written at a time. And not just any old 512 bytes, but the 512 bytes beginning at a sector boundary: 0, 512, 1024, and so on.
A "track" is generally defined as 18 sectors. Tracks are no longer physical entities, but the definition is still used by every BIOS. One track is the largest quantity of data that can be read or written at a time. Again, to read or write that largest quantity of data (one track) the read or write has to start at a track boundary: 0*9216 bytes, 1*9216 bytes, 2*9216 (i,e,18432) bytes, and so on.
|
|
|
Post by Uncle Henry on Oct 24, 2017 2:26:29 GMT -5
So what happens when the computer starts up from a USB stick? Well an option is set in the BIOS telling it that said stick is where it should start from. So the BIOS will read one sector (512 bytes, remember), into your computer memory, and then it will at once execute the instructions in those 512 bytes that it has just read in. The process has been called "boot-strapping" by the wise-cracking trans-Atlantics.
There are four essential stages in this initial sector: 1) set our segment registers and make a stack 2) check the a20 state, and change it if necessary 3) go into "unreal" mode 4) read the second sector of our OS, and jump to it.
|
|
|
Post by Uncle Henry on Oct 24, 2017 2:53:59 GMT -5
Stage 1: set our segment registers and make a stack
section .text
[BITS 16]
; This ORG seems to be essential, perhaps for the lgdt later. Although ; this code looks simple, even small variations can cause problems. The ; code here has been tested successfully on about twenty computers. [ORG 7c00h]
; 1) Set segment registers, and set up a stack, down from 9000 hexadecimal _start: xor ax,ax cli ; Applies to the program, not to the bios mov ds,ax mov es,ax mov fs,ax ; Possibly necessary for the gdt things later ; mov ax,9000h ; Initialize a silly stack mov ss,ax ; It may even eventually be mov sp,0ff8h ; unnecessary! cld ;
|
|