CIL, Prolog and Pawn

C

Common Intermediate Language (CIL), formerly known as Microsoft Intermediate Language (MSIL), is the lowest programming language at the human language level, defined by the Common Language Infrastructure (CLI) specifications, and is used by the .NET Framework, .NET Core and Mono.

Languages ​​targeting a CLI-compliant running environment are compiled to CIL, which is assembled into an object code that has an octet-style format. CIL is an object-oriented assembly language and is entirely stack-based. Its bytecode is translated into native code or most commonly executed by a virtual machine.

CIL was initially known as Microsoft Intermediate Language (MSIL) during beta releases of .NET languages. Due to C # standardization and common language infrastructure, the bytecode is now officially known as CIL.

Common Intermediate Language is object-oriented and stack-based. This means that the data is pushed onto a stack instead of being pulled out of registers like most processor architectures.

A CIL assembly and instructions are generated either by a compiler or by a utility called IL Assembler (ILAsm) that is shipped with the execution environment.

The assembled CIL can also be disassembled in the code again using IL Disassembler (ILDASM). There are other tools, such as .NET Reflector, that can decompile CIL into a high-level language (e.g., C# or Visual Basic). This makes CIL a very easy target for reverse engineering. This feature is shared with Java bytecode. However, there are tools that can kill the code and make it so that the code can not be easily read, but can still be run.

Just-in-Time (JIT) compilation involves transforming the byte code into immediately executable code by the processor. The conversion takes place gradually during the execution of the program. JIT compilation offers environment-specific optimization, execution type security, and assembly verification. To accomplish this, the JIT compiler examines the assembly metadata for any illegal access and treats the appropriate violations.

CLI-compliant execution intervals also have the option of performing an AOT-of-time (AOT) compilation of an assembly to make execution faster by eliminating the JIT process during running.

Prolog is a language-specific to artificial intelligence (Prolog – Programming in Logic). Its origin belongs to Alain Colmerauer from the University of Marseille, France.

It was originally designed for lexical analysis. Today, there are several open-source and proprietary implementations.

One of the best open-source implementations today is swi-prolog.

PAWN is a programming language made up of a mixture of already known programming languages. PAWN is used by many games, including AMX Mod X (a mode for Counter-Strike 1.6 servers) and a multiplayer mode for GTA: San Andreas (SA-MP). It has functions and “callbacks” like any other programming language.

PAWN is a type-free language for 32-bit architecture with a syntax similar to language C. A PAWN source code is compiled into a binary file for optimal execution speed. From the PAWN compiler, the P-code or bytecode results, which subsequently runs on a virtual machine.

The speed of execution, the stability, and the simplicity and the fact that it does not consume from the resources of the computer were essential design criteria for both the language and the virtual machine. PAWNO is the program with which you edit or create a script, using a source file.

It, in turn, uses pawncc.exe which acts as a compiler for PAWNO helping it find the errors made in the .amx file (compiled script). The compiled file is used by an executable (the .pwn file is the source).

About the author

Ilias spiros
By Ilias spiros

Recent Posts

Archives

Categories