New Commit.

git-svn-id: https://spexeah.com:8443/svn/Asuro@4 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
kieron committed 2015-09-18 17:21:37 +00:00
1 parent ad4301222a
commit e2d1d14da0
21 files changed
+44 -220

No files matched your search

BIN
View File
Binary file not shown.
-52
View File
@@ -1,52 +0,0 @@
@echo off
set /a ERRCOUNT=0
echo =======================
echo == ASURO COMPILATION ==
echo =======================
echo.
echo Compiling ASM Stub...
echo.
nasm -f elf src\stub.asm -o lib\stub.o
if %ERRORLEVEL% GEQ 1 (
echo Failed to compile stub!
set /a ERRCOUNT=%ERRCOUNT%+1
) ELSE (
echo Success.
)
echo.
echo =======================
echo.
echo Compiling FPC Sources...
echo.
fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Tlinux -FElib\ src\kernel.pas
if %ERRORLEVEL% GEQ 1 (
echo Failed to compile FPC Sources!
set /a ERRCOUNT=%ERRCOUNT%+1
) ELSE (
echo Success.
)
echo.
echo =======================
echo.
echo Linking...
echo.
ld -A elf32-i386 --gc-sections -s -Tlinker.script -o bin\kernel.obj lib\stub.o lib\kernel.o lib\multiboot.o lib\system.o lib\console.o
if %ERRORLEVEL% GEQ 1 (
echo Failed linking!
set /a ERRCOUNT=%ERRCOUNT%+1
) ELSE (
echo Success.
)
echo.
echo =======================
echo.
if %ERRCOUNT% GEQ 1 (
echo %ERRCOUNT% Errors Occurred, please review.
) ELSE (
echo No errors.
)
echo.
echo =======================
echo.
echo Press any key to exit...
pause > nul
BIN
View File
Binary file not shown.
+9 -3
View File
@@ -7,7 +7,7 @@ echo "======================="
echo " "
echo "Compiling ASM Stub..."
echo " "
nasm -f elf src/stub.asm -o lib/stub.o
nasm -f elf src/stub/stub.asm -o lib/stub.o
if [ $? -ne 0 ]
then
echo "Failed to compile stub!"
@@ -21,7 +21,7 @@ echo "======================="
echo " "
echo "Compiling FPC Sources..."
echo " "
fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Tlinux -FElib/ src/kernel.pas
fpc -Aelf -n -va -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Tlinux -FElib/ src/kernel.pas
if [ $? -ne 0 ]
then
echo "Failed to compile FPC Sources!"
@@ -35,7 +35,13 @@ echo "======================="
echo " "
echo "Linking..."
echo " "
ld -m elf_i386 -s --gc-sections -Tlinker.script -o bin/kernel.bin lib/stub.o lib/kernel.o lib/multiboot.o lib/system.o lib/console.o
objstring="";
for object in `find lib/ -name "*.o"`; do
objstring=$objstring$object" ";
done;
echo "Object Files: "$objstring
echo " "
ld -m elf_i386 -s --gc-sections -Tlinker.script -o bin/kernel.bin $objstring
if [ $? -ne 0 ]
then
echo "Failed linking!"
-72
View File
@@ -1,72 +0,0 @@
#!/bin/sh
ERRCOUNT=0
echo "======================="
echo "== ASURO COMPILATION =="
echo "======================="
echo " "
echo "Compiling ASM Stub..."
echo " "
nasm -f elf src/stub.asm -o lib/stub.o
if [ $? -ne 0 ]
then
echo "Failed to compile stub!"
ERRCOUNT=$((ERRCOUNT+1))
else
echo "Success."
fi
echo " "
echo "======================="
echo " "
echo "Compiling FPC Sources..."
echo " "
fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Tlinux -FElib/ src/kernel.pas
if [ $? -ne 0 ]
then
echo "Failed to compile FPC Sources!"
ERRCOUNT=$((ERRCOUNT+1))
else
echo "Success."
fi
echo " "
echo "======================="
echo " "
echo "Linking..."
echo " "
ld -m elf_i386 -s --gc-sections -Tlinker.script -o bin/kernel.bin lib/stub.o lib/kernel.o lib/multiboot.o lib/system.o lib/console.o
if [ $? -ne 0 ]
then
echo "Failed linking!"
ERRCOUNT=$((ERRCOUNT+1))
else
echo "Success."
fi
echo " "
echo "======================="
echo " "
echo "Creating ISO..."
echo " "
cp bin/kernel.bin iso/boot/asuro.bin
grub-mkrescue -o Asuro.iso iso
if [ $? -ne 0 ]
then
echo "Failed to create ISO!"
ERRCOUNT=$((ERRCOUNT+1))
else
echo "Success."
fi
echo " "
echo "======================="
echo " "
if [ "$ERRCOUNT" -ne "0" ]
then
echo "$ERRCOUNT Errors Occurred, please review."
else
echo "No errors."
fi
echo " "
echo "======================="
echo " "
-7
View File
@@ -1,7 +0,0 @@
#!/bin/sh
ERRCOUNT=0
echo "======================="
echo "== ASURO =="
echo "======================="
./compile
./run
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+34 -7
View File
@@ -12,13 +12,14 @@
}
unit console;
interface
var
xpos: Integer = 0;
ypos: Integer = 0;
procedure ktest();
procedure kclearscreen();
procedure kwritechr(c: Char);
procedure kwritestr(s: PChar);
@@ -26,10 +27,36 @@ procedure kwriteint(i: Integer);
procedure kwritedword(i: DWORD);
implementation
type
TCharacter = bitpacked record
Character : Char;
Attributes : Char;
end;
PCharacter = ^TCharacter;
TVideoMemory = Array[0..1999] of TCharacter;
PVideoMemory = ^TVideoMemory;
T2DVideoMemory = Array[0..24] of Array[0..79] of TCharacter;
P2DVideoMemory = ^T2DVideoMemory;
var
vidmem: PChar = PChar($b8000);
vidmem : PChar = PChar($b8000);
memory : PVideoMemory = PVideoMemory($b8000);
mem2d : P2DVideoMemory = P2DVideoMemory($b8000);
procedure ktest(); [public, alias: 'ktest'];
begin
memory^[0].Attributes:= #7;
memory^[0].Character:= 'T';
mem2d^[1][0].Attributes:=#7;
mem2d^[1][0].Character:='E';
while true do begin
end;
end;
procedure kclearscreen(); [public, alias: 'kclearscreen'];
var
i: Integer;
@@ -144,4 +171,4 @@ begin
kwritestr(@Buffer[0]);
end;
end.
end.
+1
View File
@@ -26,6 +26,7 @@ implementation
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: DWORD); stdcall; [public, alias: 'kmain'];
begin
kclearscreen();
ktest();
kwritestr('FUCK YOU!');
kwritestr('Freepascal barebone OS booted!');
xpos := 0;
Loaded 20 of 21 files, more files were not shown because too many files have changed in this diff. Show more