📄 os.xml
字号:
<?xml version="1.0"?>
<doc>
<assembly>
<name>OS</name>
</assembly>
<members>
<member name="T:Hanselman.CST352.CPU">
<summary>
CPU is never instanciated, but is "always" there...like a real CPU. :) It holds <see cref="F:Hanselman.CST352.CPU.physicalMemory"/>
and the <see cref="F:Hanselman.CST352.CPU.registers"/>. It also provides a mapping from <see cref="T:Hanselman.CST352.Instruction"/>s to SystemCalls in
the <see cref="T:Hanselman.CST352.OS"/>.
</summary>
</member>
<member name="F:Hanselman.CST352.CPU.pageSize">
<summary>
The size of a memory page for this system. This should be a multiple of 4. Small sizes (like 4) will
cause the system to thrash and page often. 16 is a nice compromise for such a small system.
64 might also work well. This probably won't change, but it is nice to be able to.
This is loaded from Configuration on a call to <see cref="M:Hanselman.CST352.CPU.initPhysicalMemory(System.UInt32)"/>
</summary>
</member>
<member name="F:Hanselman.CST352.CPU.clock">
<summary>
The clock for the system. This increments as we execute each <see cref="T:Hanselman.CST352.Instruction"/>.
</summary>
</member>
<member name="F:Hanselman.CST352.CPU.theOS">
<summary>
The CPU's reference to the <see cref="T:Hanselman.CST352.OS"/>. This is set by the <see cref="T:Hanselman.CST352.EntryPoint"/>.
</summary>
</member>
<member name="M:Hanselman.CST352.CPU.initPhysicalMemory(System.UInt32)">
<summary>
Initialized our <see cref="F:Hanselman.CST352.CPU.physicalMemory"/> array that represents physical memory. Should only be called once.
</summary>
<param name="memorySize">The size of physical memory</param>
</member>
<member name="F:Hanselman.CST352.CPU.physicalMemory">
<summary>
Here is the actual array of bytes that contains the physical memory for this CPU.
</summary>
</member>
<member name="F:Hanselman.CST352.CPU.registers">
<summary>
We have 10 registers. R11 is the <see cref="P:Hanselman.CST352.CPU.ip"/>, and we don't use R0. R10 is the <see cref="P:Hanselman.CST352.CPU.sp"/>. So, that's 1 to 10, and 11.
</summary>
</member>
<member name="F:Hanselman.CST352.CPU.bitFlagRegisters">
<summary>
We have a Sign Flag and a Zero Flag in a <see cref="T:System.Collections.BitArray"/>
</summary>
</member>
<member name="M:Hanselman.CST352.CPU.executeNextOpCode">
<summary>
Takes the process id from the <see cref="F:Hanselman.CST352.OS.currentProcess"/> and the CPU's <see cref="P:Hanselman.CST352.CPU.ip"/> and
gets the next <see cref="T:Hanselman.CST352.Instruction"/> from memory. The <see cref="T:Hanselman.CST352.InstructionType"/> translates
via an array of <see cref="T:Hanselman.CST352.SystemCall"/>s and retrives a <see cref="T:System.Delegate"/> from <see cref="M:Hanselman.CST352.CPU.opCodeToSysCall(Hanselman.CST352.InstructionType)"/>
and calls it.
</summary>
</member>
<member name="M:Hanselman.CST352.CPU.opCodeToSysCall(Hanselman.CST352.InstructionType)">
<summary>
The <see cref="T:Hanselman.CST352.InstructionType"/> translates via an array of <see cref="T:Hanselman.CST352.SystemCall"/>s and
retrives a <see cref="T:System.Delegate"/> and calls it.
</summary>
<param name="opCode">An <see cref="T:Hanselman.CST352.InstructionType"/> enum that maps to a <see cref="T:Hanselman.CST352.SystemCall"/></param>
</member>
<member name="M:Hanselman.CST352.CPU.DumpRegisters">
<summary>
Dumps the values of <see cref="F:Hanselman.CST352.CPU.registers"/> as the <see cref="T:Hanselman.CST352.CPU"/> currently sees it.
</summary>
</member>
<member name="M:Hanselman.CST352.CPU.DumpInstruction">
<summary>
Dumps the current <see cref="T:Hanselman.CST352.Instruction"/> for the current process at the current <see cref="P:Hanselman.CST352.CPU.ip"/>
</summary>
</member>
<member name="M:Hanselman.CST352.CPU.DumpPhysicalMemory">
<summary>
Dumps the content of the CPU's <see cref="F:Hanselman.CST352.CPU.physicalMemory"/> array.
</summary>
</member>
<member name="M:Hanselman.CST352.CPU.BytesToUInt(System.Byte[])">
<summary>
Pins down a section of memory and converts an array of bytes into an unsigned int (<see cref="T:System.UInt32"/>)
</summary>
<param name="BytesIn">array of bytes to convert</param>
<returns>value of bytes as a uint</returns>
</member>
<member name="M:Hanselman.CST352.CPU.UIntToBytes(System.UInt32)">
<summary>
Pins down a section of memory and converts an unsigned int into an array of (<see cref="T:System.Byte"/>)s
</summary>
<param name="UIntIn">the uint to convert</param>
<returns>uint containing the value of the uint</returns>
</member>
<member name="M:Hanselman.CST352.CPU.UtilRoundToBoundary(System.UInt32,System.UInt32)">
<summary>
Utility function to round any number to any arbirary boundary
</summary>
<param name="number">number to be rounded</param>
<param name="boundary">boundary multiplier</param>
<returns>new rounded number</returns>
</member>
<member name="P:Hanselman.CST352.CPU.sf">
<summary>
Public get/set accessor for the Sign Flag
</summary>
</member>
<member name="P:Hanselman.CST352.CPU.zf">
<summary>
Public get/set accessor for the Zero Flag
</summary>
</member>
<member name="P:Hanselman.CST352.CPU.sp">
<summary>
Public get/set accessor for Stack Pointer
</summary>
</member>
<member name="P:Hanselman.CST352.CPU.ip">
<summary>
Public get/set access for the CPU's Instruction Pointer
</summary>
</member>
<member name="T:Hanselman.CST352.EntryPoint">
<summary>
"Bootstraps" the system by creating an <see cref="T:Hanselman.CST352.OS"/>, setting the size of the <see cref="T:Hanselman.CST352.CPU"/>'s memory,
and loading each <see cref="T:Hanselman.CST352.Program"/> into memory. Then, for each <see cref="T:Hanselman.CST352.Program"/> we create a
<see cref="T:Hanselman.CST352.Process"/>. Then we start everything by calling <see cref="M:Hanselman.CST352.OS.execute"/>
</summary>
</member>
<member name="M:Hanselman.CST352.EntryPoint.Main(System.String[])">
<summary>
The entry point for the virtual OS
</summary>
</member>
<member name="M:Hanselman.CST352.EntryPoint.PrintInstructions">
<summary>
Prints the static instructions on how to invoke from the command line
</summary>
</member>
<member name="M:Hanselman.CST352.EntryPoint.PrintHeader">
<summary>
Prints the static informatonal header
</summary>
</member>
<member name="T:Hanselman.CST352.Instruction">
<summary>
Represents a single line in a program, consisting of an <see cref="F:Hanselman.CST352.Instruction.OpCode"/>
and one or two optional parameters. An instruction can parse a raw instruction from a test file.
Tge instruction is then loaded into an <see cref="T:Hanselman.CST352.InstructionCollection"/> which is a member of
<see cref="T:Hanselman.CST352.Program"/>. The <see cref="T:Hanselman.CST352.InstructionCollection"/> is translated into bytes that are
loaded into the processes memory space. It's never used again, but it's a neat overly object oriented
construct that simplified the coding of the creation of a <see cref="T:Hanselman.CST352.Program"/> and complicated the
running of the whole system. It was worth it though.
</summary>
</member>
<member name="M:Hanselman.CST352.Instruction.ToString">
<summary>
Overridden method for pretty printing of Instructions
</summary>
<returns>A formatted string representing an Instruction</returns>
</member>
<member name="F:Hanselman.CST352.Instruction.OpCode">
<summary>
The OpCode for this Instruction
</summary>
</member>
<member name="F:Hanselman.CST352.Instruction.Param1">
<summary>
The first parameter to the opCode. May be a Constant or a Register value, or not used at all
</summary>
</member>
<member name="F:Hanselman.CST352.Instruction.Param2">
<summary>
The second parameter to the opCode. May be a Constant or a Register value, or not used at all
</summary>
</member>
<member name="M:Hanselman.CST352.Instruction.#ctor(System.String)">
<summary>
Public constructor for an Instruction
</summary>
<param name="rawInstruction">A raw string from a Program File.</param>
<example>Any one of the following lines is a valid rawInstruction
<pre>
1 r1 ; incr r1
2 r6, $16 ; add 16 to r6
26 r6 ; setPriority to r6
2 r2, $5 ; increment r2 by 5
3 r1, r2 ; add 1 and 2 and the result goes in 1
2 r2, $5 ; increment r2 by 5
6 r3, $99 ; move 99 into r3
7 r4, r3 ; move r3 into r4
11 r4 ; print r4
27 ; this is exit.
</pre>
</example>
</member>
<member name="T:Hanselman.CST352.InstructionType">
<summary>
This enum provides an easy conversion between numerical opCodes like "2" and text
and easy to remember consts like "Addi"
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Noop">
<summary>
No op
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Incr">
<summary>
Increments register
<pre>
1 r1
</pre>
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Addi">
<summary>
Adds constant 1 to register 1
<pre>
2 r1, $1
</pre>
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Addr">
<summary>
Adds r2 to r1 and stores the value in r1
<pre>
3 r1, r2
</pre>
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Pushr">
<summary>
Pushes contents of register 1 onto stack
<pre>
4 r1
</pre>
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Pushi">
<summary>
Pushes constant 1 onto stack
<pre>
5 $1
</pre>
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Movi">
<summary>
Moves constant 1 into register 1
<pre>
6 r1, $1
</pre>
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Movr">
<summary>
Moves contents of register2 into register 1
<pre>
7 r1, r2
</pre>
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Movmr">
<summary>
Moves contents of memory pointed to register 2 into register 1
<pre>
8 r1, r2
</pre>
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Movrm">
<summary>
Moves contents of register 2 into memory pointed to by register 1
<pre>
9 r1, r2
</pre>
</summary>
</member>
<member name="F:Hanselman.CST352.InstructionType.Movmm">
<summary>
Moves contents of memory pointed to by register 2 into memory pointed to by register 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -