Is it possible to install a C# compiler without Visual Studio?

Sure, the framework includes a compiler, csc.exe. Look at this article for a quick how-to. The important parts: You can get the command-line compiler (csc.exe) from Microsoft site http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx. Download the redistributable package of the .NET Framework, which includes the compiler and the .NET Framework with C# 2005 syntax support. The compiler is located in the following directory: …

Read more

Is there a way to compile C++ to C Code?

The C++ FAQ has a list of possibilities: Is it possible to convert C++ to C?. In short, it says that you can’t expect this to give you particularly readable code. Think of the complexities involved; multiple inheritance, virtual-function resolution, templates, operator overloading, etc., etc. There’s no clean succinct way of expressing these concepts in pure C. If …

Read more

X86 assembly – Handling the IDIV instruction

The first part of Mysticials answer is correct, idiv does a 128/64 bit division, so the value of rdx, which holds the upper 64 bit from the dividend must not contain a random value. But a zero extension is the wrong way to go. As you have signed variables, you need to sign extend rax to rdx:rax. There is a specific instruction for this, cqto (convert quad …

Read more

Static Semantics meaning?

Semantics is about meaning. It includes: the static semantics, which is the part that can be ascertained at compile time, including data typing, whether all variables are declared, which declaration applies to which variable in the case of scoping, what their type is, whether functions and methods are called with correct calling sequences, whether assignments …

Read more