New Commit.
git-svn-id: https://spexeah.com:8443/svn/Asuro@4 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
ad4301222a
commit
e2d1d14da0
21 files changed
+38
-214
No files matched your search
-52
@@ -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
|
|
||||||
Binary file not shown.
+9
-3
@@ -7,7 +7,7 @@ echo "======================="
|
|||||||
echo " "
|
echo " "
|
||||||
echo "Compiling ASM Stub..."
|
echo "Compiling ASM Stub..."
|
||||||
echo " "
|
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 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "Failed to compile stub!"
|
echo "Failed to compile stub!"
|
||||||
@@ -21,7 +21,7 @@ echo "======================="
|
|||||||
echo " "
|
echo " "
|
||||||
echo "Compiling FPC Sources..."
|
echo "Compiling FPC Sources..."
|
||||||
echo " "
|
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 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "Failed to compile FPC Sources!"
|
echo "Failed to compile FPC Sources!"
|
||||||
@@ -35,7 +35,13 @@ echo "======================="
|
|||||||
echo " "
|
echo " "
|
||||||
echo "Linking..."
|
echo "Linking..."
|
||||||
echo " "
|
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 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "Failed linking!"
|
echo "Failed linking!"
|
||||||
|
|||||||
-72
@@ -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 " "
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
ERRCOUNT=0
|
|
||||||
echo "======================="
|
|
||||||
echo "== ASURO =="
|
|
||||||
echo "======================="
|
|
||||||
./compile
|
|
||||||
./run
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
+28
-1
@@ -19,6 +19,7 @@ var
|
|||||||
xpos: Integer = 0;
|
xpos: Integer = 0;
|
||||||
ypos: Integer = 0;
|
ypos: Integer = 0;
|
||||||
|
|
||||||
|
procedure ktest();
|
||||||
procedure kclearscreen();
|
procedure kclearscreen();
|
||||||
procedure kwritechr(c: Char);
|
procedure kwritechr(c: Char);
|
||||||
procedure kwritestr(s: PChar);
|
procedure kwritestr(s: PChar);
|
||||||
@@ -27,8 +28,34 @@ procedure kwritedword(i: DWORD);
|
|||||||
|
|
||||||
implementation
|
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
|
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'];
|
procedure kclearscreen(); [public, alias: 'kclearscreen'];
|
||||||
var
|
var
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ implementation
|
|||||||
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: DWORD); stdcall; [public, alias: 'kmain'];
|
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: DWORD); stdcall; [public, alias: 'kmain'];
|
||||||
begin
|
begin
|
||||||
kclearscreen();
|
kclearscreen();
|
||||||
|
ktest();
|
||||||
kwritestr('FUCK YOU!');
|
kwritestr('FUCK YOU!');
|
||||||
kwritestr('Freepascal barebone OS booted!');
|
kwritestr('Freepascal barebone OS booted!');
|
||||||
xpos := 0;
|
xpos := 0;
|
||||||
|
|||||||
Loaded 20 of 21 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user