os-70-350

os-70-350 Commit Details


Date:2013-12-01 23:05:58 (11 years 9 months ago)
Author:Natalie Adams
Branch:master
Commit:34376e6c59ff1bbf0e38dbc116ff34a15c7a07aa
Parents: 13dac6cafbedbadbeb6342f4439164ee211e1e06
Message:Adding first OS/bootloader

Changes:

File differences

yourfirstos/firstos.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
BITS 16
start:
mov ax, 07C0h; Set up 4K stack space after this bootloader
add ax, 288; (4096 + 512) / 16 bytes per paragraph
mov ss, ax
mov sp, 4096
mov ax, 07C0h; Set data segment to where we're loaded
mov ds, ax
mov si, text_string; Put string position into SI
call print_string; Call our string-printing routine
jmp $; Jump here - infinite loop!
text_string db 'This is my cool new Operating System!', 0
print_string:; Routine: output string in SI to screen
mov ah, 0Eh; int 10h 'print char' function
.repeat:
lodsb; Get character from string
cmp al, 0
je .done; If char is zero, end of string
int 10h; Otherwise, print it
jmp .repeat
.done:
ret
times 510-($-$$) db 0; Pad remainder of boot sector with 0s
dw 0xAA55; The standard PC boot signature
yourfirstos/make-qemu.bat
1
2
..\ext\nasm\nasm -f bin -o os.flp firstos.asm
..\ext\qemu\qemu-system-x86_64.exe -L ..\ext\qemu -m 128 -fda os.flp
yourfirstos/make-qemu.sh
1
2
3
4
#!/bin/bash
nasm -f bin -o os.flp firstos.asm
qemu-system-x86_64.exe -m 128 -fda os.flp
yourfirstos/make-vb.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
@echo off
set vboxmanage="C:\Program Files\Oracle\VirtualBox\vboxmanage.exe"
set vboxname=os1_%COMPUTERNAME%_%USERNAME%
..\ext\nasm\nasm -f bin -o os.img firstos.asm
%vboxmanage% unregistervm %vboxname% --delete 2> nul
%vboxmanage% createvm --name %vboxname% --basefolder %CD% --register
%vboxmanage% modifyvm %vboxname% --memory "256"
%vboxmanage% modifyvm %vboxname% --bioslogodisplaytime "1"
%vboxmanage% storagectl %vboxname% --name Floppy --add floppy --bootable on
%vboxmanage% storageattach %vboxname% --device 0 --storagectl Floppy --type fdd --medium %CD%\os.img
%vboxmanage% startvm %vboxname%
pause
%vboxmanage% controlvm %vboxname% poweroff
timeout /t 2 /nobreak > NUL
%vboxmanage% unregistervm %vboxname% --delete
yourfirstos/make-vb.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
vboxmanage=`which vboxmanage`
vboxname=os1_`hostname`_$USER
nasm -f bin -o os.img firstos.asm
$vboxmanage unregistervm $vboxname --delete 2> nul
$vboxmanage createvm --name $vboxname --basefolder $PWD --register
$vboxmanage modifyvm $vboxname --memory "256"
$vboxmanage modifyvm $vboxname --bioslogodisplaytime "1"
$vboxmanage storagectl $vboxname --name Floppy --add floppy --bootable on$PWD%CD%\os.img
$vboxmanage startvm $vboxname
pause
$vboxmanage controlvm $vboxname poweroff
timeout /t 2 /nobreak > NUL
$vboxmanage unregistervm $vboxname --delete

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.88221s using 14 queries.