|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ||| Simple OS demo for 6.004 Beta processor -- 4/19/94 Steve Ward ||| os.uasm: The top-level file, which references (via .includes) ||| files kernel.uasm, containing the OS kernel code, and user.uasm, ||| containing the user-mode code. ||| ||| os.uasm and its .includes contain a primitive OS kernel for the Beta ||| along with three simple user-mode processes hooked together thru ||| a semaphore-controlled bounded buffer. ||| ||| The three processes -- and the kernel -- share an address space; ||| each is allocated its own stack (for a total of 4 stacks), and ||| each process has its own virtual machine state (ie, registers). ||| The latter is stored in the kernel ProcTbl, which contains a data ||| structure for each process. ||| The getkey() SVC used for input has a 1-char buffer; you can ||| easily overflow the buffer by typing fast. .include beta.uasm | Define Beta instructions, etc. .options clock tty ||| The file kernel.uasm contains a primitive OS kernel for the Beta. .include kernel.uasm ||| The file user.uasm contains all of the user-mode code for our ||| little demo. This includes three user-mode processes, which ||| communicate using semaphores. .include user.uasm ||| Here's an unretouched sample of output from a BSIM run of the demo: ||| ||| Start typing, Bunky. ||| ||| 00000000> hello ||| ELLOHAY |||