anyone know a C++ api for reading/writing object code?

This is a discussion on anyone know a C++ api for reading/writing object code? within the C++ Programming forums, part of the General Programming Boards category; we have this project that the professor wants us to do an assembler so here is the problem how can ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    1

    Question anyone know a C++ api for reading/writing object code?

    we have this project that the professor wants us to do an assembler so here is the problem how can i read write an object file in my assembler? is there is any api to do that stuff for me?
    in which i pass the instructions i want to be put in that object file and it writes the file and load it to see the instructions
    any help will be much appreciated completely clueless here thanks in advance

    EDIT
    i forgot to mention that i need the object file in windows format
    Last edited by abkrino; 11-15-2006 at 06:27 PM.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >is there is any api to do that stuff for me?
    ...
    My best code is written with the delete key.

  3. #3
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    Woudln't that defeat the purpose of doing it (which I think was Prelude's point)?
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,832
    Download the source code for NASM and start reading.

    But since your homework is to write your own assembler, then you can define your own "object" file format however you want to.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using this as synchronization object
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 03-22-2008, 08:49 AM
  2. instantiate unmanaged object in managed code
    By Redhead in forum C++ Programming
    Replies: 1
    Last Post: 01-11-2006, 07:43 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 04:00 PM
  4. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Linux Programming
    Replies: 0
    Last Post: 10-14-2002, 02:30 PM

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