Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed May 5, 2015
1 parent 97939a1 commit 1a31de7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion boot.s
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ _start:

# Set the size of the _start symbol to the current location '.' minus its start.
# This is useful when debugging or when you implement call tracing.
.size _start, . - _start
.size _start, . - _start
6 changes: 3 additions & 3 deletions main.nim
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ type
proc kmain(mb_header: PMultiboot_header, magic: int) {.exportc.} =
if magic != 0x2BADB002:
discard # Something went wrong?

var vram = cast[PVIDMem](0xB8000)
screenClear(vram, Yellow) # Make the screen yellow.

# Demonstration of error handling.
var x = len(vram[])
var outOfBounds = vram[x]

let attr = makeColor(Yellow, DarkGrey)
writeString(vram, "Nim", attr, (25, 9))
writeString(vram, "Expressive. Efficient. Elegant.", attr, (25, 10))
Expand Down
8 changes: 4 additions & 4 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You are required to have:

* QEMU
* a C and asm cross-compiler for i586
* Nim from git HEAD
* Nim 0.10.2 or higher
* nimble (*)

\* You can always grab the nake library manually from [here](https://github.com/fowlmouth/nake).
Expand All @@ -53,9 +53,9 @@ and build the cross compiler. Then perform the following actions:
```bash
$ wget ftp://sourceware.org/pub/binutils/snapshots/binutils-2.24.51.tar.bz2
$ tar -xf binutils-2.24.51.tar.bz2
$ mkdir build
$ mkdir build
$ ./binutils-2.24.51/configure --target=i586-elf --prefix=$PWD/build/ --disable-nls
$ make
$ make -j4
$ make install
```

Expand All @@ -68,7 +68,7 @@ You may then grab the GCC source and build it:
$ wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2
$ tar -xf gcc-4.9.2.tar.bz2
$ ./gcc-4.9.2/configure --target=i586-elf --prefix=$PWD/build/ --disable-nls --enable-languages=c --without-headers
$ make all-gcc
$ make all-gcc -j4
$ make install-gcc
```

Expand Down

0 comments on commit 1a31de7

Please sign in to comment.