Reputation:
I have created a programming language, from scratch with C. I have built a compiler which processes the code in the input file and converts it to tokens and checks that the tokens are in the correct order. I am on the final step of the compiler: Output/Executable. I want to create an output that can run in terminal. I want to create an a.out output but the only resource I could find was this from nasm which doesn't really help me.
So my question is, how do I create an a.out file (unix executable) that I can run in terminal?
Upvotes: 7
Views: 838
Reputation: 51883
well you wrote you are on the final step of the compiler ...
as have been mentioned before in comments you can:
use existing assembler compiler/linker from your app
create own compiler linker
The language runtime engine:
Upvotes: 1