Before answering this question, understand that I am not asking how to create my own programming language, I am asking how, using vb.net code, I can create a compiler for a language such as vb.net. In fact, the user enters the code, he receives the .exe. NO MEANS, I want to write my own language, because it seems that other questions related to the compiler are being asked here. I also do not want to use the vb.net compiler itself and I do not want to duplicate the IDE.
The exact goal of what I want to do is quite difficult to explain, but all I need is to push in the right direction to write a compiler (if possible, from scratch) that can simply enter input and create .exe. I opened the .exe files as plain text before (my own programs) to see if I could get any sense from what I assumed would be a human readable text, but I was clearly disappointed to see random ascii although it’s clear why this is all I found.
I know that a .exe file is just lines of code processed by the computer on which it is included, but my question here really comes down to the following: what code is .exe? How could I do this in a text editor if I wanted to? (No, I do not want to do this, but if I understand the process, my goals will be much easier to achieve.) What makes an executable file an executable file? Where is the code logic?
This is supposed to be a programming issue, not a computer issue, so I did not post it on SuperUser. I know a lot of information about the System.IO namespace, so I know how to create a file and write to it, I just do not know what exactly I would like to place inside this file in order to make it work as an executable file.
I apologize if this question is "confusing", "dumb" or "obvious", but I could not find any information about the actual contents of the executable anywhere.
One of my Google searches
Something looked promising
EDIT: The second link here, while it looked good, was a complete failure. I am not going to spend hours of my time hitting keys and recording results. "Use" Alt "and 3-digit combinations to create characters that do not appear on the keyboard, but which you need in the program." (step 4) How do I know which characters I need?
Thank you very much for your help, and my apologies if this question is nooby or "bad".
To summarize simply: I want to create a program in vb.net that can compile code in a specific language into a single executable file. What are the methods that can allow me to do this, and if they are not, how can I start writing my own from scratch?