1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:57:57 -07:00

runtime: finish pchw -> tiny, added gettime for tiny

R=rsc
CC=golang-dev
https://golang.org/cl/1514041
This commit is contained in:
Daniel Theophanes 2010-06-07 14:18:42 -07:00 committed by Russ Cox
parent 3956e5a029
commit 129c6c14d1
5 changed files with 17 additions and 5 deletions

View File

@ -171,7 +171,7 @@ main(int argc, char *argv[])
if(strcmp(goos, "windows") == 0) if(strcmp(goos, "windows") == 0)
HEADTYPE = 10; HEADTYPE = 10;
else else
if(strcmp(goos, "pchw") == 0) if(strcmp(goos, "tiny") == 0)
HEADTYPE = 11; HEADTYPE = 11;
else else
print("goos is not known: %s\n", goos); print("goos is not known: %s\n", goos);

View File

@ -26,8 +26,8 @@ GOFILES=\
type.go\ type.go\
version.go\ version.go\
GOFILES_pchw=\ GOFILES_tiny=\
pchw/io.go\ tiny/io.go\
OFILES_windows=\ OFILES_windows=\
syscall.$O\ syscall.$O\

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
TEXT _rt0_386_pchw(SB), 7, $0 TEXT _rt0_386_tiny(SB), 7, $0
// Disable interrupts. // Disable interrupts.
CLI CLI

View File

@ -1,4 +1,8 @@
// just the write function // Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "runtime.h"
extern void ·write(int32 fd, void *v, int32 len, int32 cap); // slice, spelled out extern void ·write(int32 fd, void *v, int32 len, int32 cap); // slice, spelled out
@ -8,3 +12,8 @@ write(int32 fd, void *v, int32 len)
·write(fd, v, len, len); ·write(fd, v, len, len);
return len; return len;
} }
void
gettime(int64*, int32*)
{
}

View File

@ -24,6 +24,9 @@ and GOOS set to your normal GOOS (linux, darwin). Then:
cat bootblock 8.out | dd of=disk conv=notrunc cat bootblock 8.out | dd of=disk conv=notrunc
bochs bochs
Use the built-in print(text string) function to print to the
console.
You may have to tweak the .bochsrc depending on your system, You may have to tweak the .bochsrc depending on your system,
and you may need to install the Bochs emulator. and you may need to install the Bochs emulator.