The compiler will use the following template for compiling expressions that involve comparisons: 00 push op1 01 push op2 02 je/jg/jl true_label 03 push_0 04 jmp done_label 05 true_label: 06 push_1 07 done_label: The jmp instruction type used for L02 depends on the AML opcode that is compiled. To conserve space, the ACPI spec only defines opcodes for the following comparison operations: equal, less, greater. All other comparisons are constructed by combining one of the above opcodes with a logical not opcode (e.g. greaterOrEqual = !(less)). The VM opcode exploits the fact the comparison expressions always push a 0/1 value on the stack and uses bitwise operations to emulate some additional logic opcodes: - logic not: 0/1 (on stack) XOR 1 - logic and: 0/1 (left expr on stack) AND 0/1 (right expr on stack) - logic or : 0/1 (left expr on stack) OR 0/1 (right expr on stack)
gopher-os
The goal of this project is to build a 64-bit POSIX-compliant tick-less kernel with a Linux-compatible syscall implementation using Go.
This project is not about building yet another OS but rather exists to serve as proof that Go is indeed a suitable tool for writing low level code that runs at ring-0.
Note: This project is still in the early stages of development and is not yet
in a usable state. In fact, if you build the ISO and boot it, the kernel will
eventually panic with a Kmain returned
error.
To find out more about the current project status and feature roadmap take a look at the status page.
Building and running gopher-os
TLDR version: make run-qemu
or make run-vbox
.
A detailed guide about building, running and debugging gopher-os on Linux/OSX as well as the list of supported boot command line options are available here.
How does it look?
Contributing
gopher-os is Open Source. Feel free to contribute! To get started take a look at the contributing guide.
Licence
gopher-os is distributed under the MIT license.