-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cb05f6
commit 342dbdc
Showing
50 changed files
with
2,015 additions
and
2,582 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
|
||
all: bootld kernel diskim run | ||
all: boot kern bin disk run | ||
|
||
bootld: | ||
make -C boot | ||
boot: | ||
make -C bootld | ||
|
||
kernel: | ||
make -C kern | ||
kern: | ||
make -C kernel | ||
bin: | ||
cat obj/boot16.bin obj/kern16.bin > obj/os1-300.bin | ||
|
||
diskim: | ||
cat bin/boot16.bin bin/kern16.bin > bin/os1-200.bin | ||
|
||
dd if=/dev/zero of=disk.img bs=512 count=720 | ||
dd if=bin/os1-200.bin of=disk.img conv=notrunc | ||
disk: | ||
dd if=/dev/zero of=img/disk.img bs=512 count=1440 | ||
dd if=obj/os1-300.bin of=img/disk.img conv=notrunc | ||
|
||
run: | ||
qemu-system-i386 -fda disk.img | ||
qemu-system-i386 -fda img/disk.img | ||
|
||
clean: | ||
make -C boot clean | ||
make -C kern clean | ||
rm bin/* | ||
rm disk.img | ||
make -C bootld clean | ||
make -C kernel clean | ||
rm obj/* | ||
rm img/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
Operating System One | ||
Version 2.0.0 | ||
Operating System One | ||
====================================================== | ||
|
||
Operating System One 2.0.0 or OS/1 2.0.0 is the second verison | ||
of Operating System One. Version 2.0.0 is written in assembly for the | ||
Intel i386 platform, and is compiled with GNU Assembler. Version 2.0.0 | ||
features a new UI design. If you wish to build OS/1 2.0.0 you need a | ||
i386-elf cross-compiler. OS/1 2.0.0 is provided with a "weird" system | ||
called SCE. | ||
Operating System One (shortened to OS/1) is | ||
a simple 16-bit operating system written in | ||
assembly under a cross-compiled GNU Assembler | ||
for the Intel i386 CPU. | ||
|
||
To compile OS/1 just run : `make` in the root | ||
of the directory. | ||
|
||
If you encounter any errors file them on the | ||
Github repository. | ||
|
||
List of software needed to build Oklahoma : | ||
* i386-elf GNU Binutils | ||
* QEMU (or any other emulator) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
AS=i386-elf-as | ||
LD=i386-elf-ld | ||
LF=-Tlink16.ld *.o -o ../obj/boot16.bin | ||
|
||
all: | ||
$(AS) boot16.S -o boot16.o | ||
$(AS) libb16.S -o libb16.o | ||
|
||
$(LD) $(LF) | ||
|
||
clean: | ||
rm *.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
.section .text.boot | ||
.global _boot16 | ||
.code16 | ||
|
||
_boot16: | ||
xor %ax, %ax | ||
mov %ax, %ds | ||
mov %ax, %ss | ||
mov $_boot16,%sp | ||
cld | ||
|
||
mov $0x03, %ax | ||
int $0x10 | ||
|
||
mov $0x1003,%ax | ||
mov $0x00, %bx | ||
int $0x10 | ||
|
||
mov $0x11, %ah | ||
mov $0x11, %al | ||
int $0x10 | ||
|
||
mov $msg0, %si | ||
call puts16 | ||
|
||
call delay | ||
|
||
mov $msg1, %si | ||
call puts16 | ||
|
||
call delay | ||
|
||
mov $msg2, %si | ||
call puts16 | ||
|
||
call delay | ||
call delay | ||
|
||
call disk_read | ||
|
||
jmp KERN | ||
|
||
1: cli | ||
jmp 1b | ||
|
||
.section .rodata | ||
msg0: .asciz " === Operating System One ... Version 3.0.0 === \r\n" | ||
msg1: .asciz "\r\n {0} : Starting the system disk..." | ||
msg2: .asciz "\r\n {1} : Reading the disk..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
.section .text | ||
.global puts16 | ||
.global delay | ||
.global disk_read | ||
.global KERN | ||
.set KERN, 0x7e00 | ||
.code16 | ||
|
||
puts16: | ||
lodsb | ||
|
||
or %al, %al | ||
jz .done | ||
|
||
mov $0x0e, %ah | ||
mov $0x00, %bh | ||
int $0x10 | ||
|
||
jmp puts16 | ||
|
||
.done: | ||
ret | ||
|
||
delay: | ||
mov $0x0f, %cx | ||
mov $0x4240, %dx | ||
mov $0x86, %ah | ||
int $0x15 | ||
ret | ||
|
||
disk_read: | ||
mov $0x02, %ah | ||
mov $0x7e00, %bx | ||
mov $65, %al | ||
mov (BOOT), %dl | ||
mov $0x00, %ch | ||
mov $0x00, %dh | ||
mov $0x02, %cl | ||
int $0x13 | ||
|
||
jc disk_fail | ||
|
||
ret | ||
|
||
disk_fail: | ||
mov $err0, %si | ||
call puts16 | ||
|
||
mov $0x00, %ah | ||
int $0x16 | ||
|
||
int $0x19 | ||
|
||
.halt: | ||
jmp .halt | ||
|
||
# .section .data | ||
BOOT: .byte 0 | ||
.section .rodata | ||
err0: .asciz "\r\n Error {1} : Failed to read the system disk | Any key to restart..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
OUTPUT_FORMAT(binary); | ||
ENTRY(_boot16); | ||
|
||
SECTIONS | ||
{ | ||
. = 0x7c00; | ||
.text : SUBALIGN(0) { | ||
*(.text.boot); | ||
*(.text) | ||
} | ||
|
||
.rodata : SUBALIGN(0) { *(.rodata) } | ||
.data : SUBALIGN(0) { *(.data) } | ||
.sig : AT(0x7DFE) { SHORT(0xaa55); } | ||
|
||
/DISCARD/ : { | ||
*(.comment); | ||
*(.note*) | ||
} | ||
|
||
} |
Binary file not shown.
Oops, something went wrong.