From 25ea72c4b5e36f12b6efa1059b31292abeeba680 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Sat, 23 May 2015 21:06:16 -0400 Subject: [PATCH] Update il2cpu.md Grammar fixes, fixed explanations. --- Docs/Compiler/il2cpu.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Docs/Compiler/il2cpu.md b/Docs/Compiler/il2cpu.md index 45e0739fc1..0e2f91ae4e 100644 --- a/Docs/Compiler/il2cpu.md +++ b/Docs/Compiler/il2cpu.md @@ -2,24 +2,22 @@ ### IL2CPU -This is one of the most important piece of code of Cosmos. It is an AOT +This is one of the most important pieces of code of Cosmos. It is an AOT (Ahead-Of-Time) compiler. -When you compile your C# program, it is compiled into the IL (intermediate +When you compile your C# (or any .NET language) program, it is compiled into the IL (intermediate language). The IL is then interpreted and executed by a Virtual Machine when -you open your exe +you open your exe. Cosmos is written in C# and Visual Studio compiles it into IL as always. But a -PC does not came with an interpreter for the IL code. And writing a virtual +PC does not come with an interpreter for the IL code. And writing a virtual machine for running an operating system is not always ideal. -IL2CPU takes the IL code and translates it to processor opcodes. Actually it +This is where IL2CPU comes in. IL2CPU takes the IL code and translates it to processor opcodes. Actually it only supports the x86 architecture. So it translates from IL to x86 opcodes, but it can be ported to any architecture. -As you might think, the develop of IL2CPU is a fundamental step for the grow -of Cosmos. IL2CPU is responsible for the final output of code and should -optimize it as much as possible. - -**TODO: explain this better.** Before finally creating the binary, IL2CPU does some more magic with files created in "C#/ASM". They are executed and from their execution an assembly file is get and integrated into the output. +At this point, IL2CPU performs some more magic before finally converting the entire file into a bootable binary file, which can be loaded by a bootloader on any system (Cosmos uses Syslinux). +As you might think, IL2CPU is a fundamental part of the development +of Cosmos. IL2CPU is responsible for the final output, which is why most optimizations added are for IL2CPU.