Pascal: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
mNo edit summary |
No edit summary |
||
Line 78: | Line 78: | ||
=== stub.asm === |
=== stub.asm === |
||
Assemble with: |
|||
⚫ | |||
<pre> |
<pre> |
||
;///////////////////////////////////////////////////////// |
;///////////////////////////////////////////////////////// |
||
Line 165: | Line 161: | ||
=== kernel.pas === |
=== kernel.pas === |
||
Compile with: |
|||
⚫ | |||
or: |
|||
⚫ | |||
<pre> |
<pre> |
||
{ |
{ |
||
Line 509: | Line 499: | ||
</pre> |
</pre> |
||
=== Linking === |
=== Compiling and Linking the modules === |
||
Assemble stub.asm with: |
|||
⚫ | |||
The Pascal modules with: |
|||
⚫ | |||
* -Aelf - instructs the internal fpc assembler to output an ELF object.; |
|||
* -n - ignores fpc.cfg; |
|||
* -O3 - perform level 3 optimizations; |
|||
* -Op3 - tune code for PentiumPro / P-II / Cyrix 6x86 / K6 (TM); |
|||
* -Si - enable C++ style INLINE keyword; |
|||
* -Sc - enable C style operators; |
|||
* -Sg - enable support for labels; |
|||
* -Xd - tells the compiler to forget the standard library path; |
|||
* -Rintel - sets the inline assembly syntax to intel style; |
|||
* -Tlinux - specifies that the target operating system is Linux. (Don't even ask!) |
|||
⚫ | |||
Then link the whole thing with: |
|||
ld -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o |
ld -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o |
||