Cgiasm

This is a discussion on Cgiasm within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I decided to do a fairly big, one-person project for the summer, and I settled on making my own assembler. ...

  1. #1
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913

    Cgiasm

    I decided to do a fairly big, one-person project for the summer, and I settled on making my own assembler. Makes sense to me that the first step to AI is a program that writes its own code and compiles it, so I'm figuring out how to make compilers and stuff. I'm going to base it on HTML and CGI using geocities ( because they're the only free server I could find that let you write your own code from scratch. Anyway - a couple of questions on compiling ASM (or ASSEMBLING it).
    - I have a list of the binary (machine language) equivalents of all the instructions, but how do I enter binary into a file, because the standard is decimal and ASCII, so how? I'll need to specify it in binary (preferrably) and then maybe use a converter to put it into a file in that form, so that it's usabl;e as an executable.
    - How would I include the oparands in the code?
    - Any volunteers to test it in September?
    Any additional advice would be awesome. Thanks.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Creating an assmebler seems like a b*tch of a project IMHO....

    I did a little program that works out the binary code to produce a message box at runtime......That fairly simple principal took me a long time to noodle around with......and then I didnt dump anything into an executable....I just held the code in memory and routed a newly created thread in its direction (the code for it is on my website under Obfuscated Hello World).....

    If you want info on the executable format for Windows, then look up some tutorials on the PE Format (Portable Executable)......Iczilion's site has a good starter tutorial with links for more info.

    Good luck!

  3. #3
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Well thanks, but as it turns out, there was actually an explanation of how to do that in the exact same book as I found the list of binary instructions. Anyay - if anyonewants to see it, it'll be at The CGIASM Website

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The CGIASM Solution
    By sean in forum C Programming
    Replies: 0
    Last Post: 06-06-2002, 11:43 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21