Home

Awesome

Battlestar

License Go Report Card

What is Battlestar?

Quick start

Build and install Battlestar, build the samples and run the "life" sample:

This requires DosBox, Go, Yasm and GCC.

Build and boot a kernel (requires GCC, Yasm, Battlestar and the qemu-system-i386 executable):

Features and limitations

Sample program

This is a 16-bit x86 program, for DOS:

// "Life"
// The original was written by "melezov" (http://256bytes.untergrund.net/demo/334)

fun main
    al = 0x13               // set graphics mode (mode 13h)
                            // 320x200, 256 colors, one byte per pixel
    int 10

    stack -> sp             // pop  sp
    stack -> b              // pop  bx
    stack -> ds             // pop  ds

    ds -> es                // push ds, pop es

    al = 62
    ch = 0xFA
    loopwrite               // rep stosb

    loop

        di <<< 3           // rotate left 3

        di -= 7            // subtraction
        di ^= 2            // xor

        al = readbyte di   // read byte from memory
        al += [di+321]     // add value at [di+321] (pixel on the line below)
        al /= 2

        di -> stack
        write               // stosb
        write

        di += 0x13E
        write
        write

        stack -> di

    end // loops forever

end

In progress

Installation

Make sure Go, Yasm and GCC are installed.

Installation:

sudo make PREFIX=/usr install

For development, install soft links instead:

sudo make install-dev

Build all the samples:

make samples

Build dependencies

Runtime dependencies

Optional runtime dependencies

External links

General info