Thread: 6502 assembler question

  1. #1
    C lover
    Join Date
    Oct 2007

    6502 assembler question

    So I'm almost finished my implementation of the 6502 core emulator. Now for the assembler. Should this assembler be producing machine code? That is, something like the following:

    0F C1 DD 23 E4 
    27 89 65 4C A3

    Is that the idea? And if this is a stupid question, too bad because I really would like to know.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Should this assembler be producing machine code?
    That's the primary job of an assembler, so I would say "yes". The other thing the assembler should be doing is assigning memory addresses for labels, and then transposing those addresses in the generated machine code when the programmer uses those labels in instruction operands.
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    The compiler, assembler, linker, loader and process address space programming tutorial - hacking the process of building programs using C language -notes and illustrations
    How much you want to compress the tool chain is entirely up to you.

    Assembler output typically has unresolved symbols and relocation information.
    Linker output typically has no unresolved symbols, but may still be relocatable.
    Loader fixes relocation information and loads the program.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question about a question
    By hausburn in forum C++ Programming
    Replies: 3
    Last Post: 04-25-2010, 05:24 AM
  2. SDL buffer channels question
    By TriKri in forum Game Programming
    Replies: 3
    Last Post: 12-09-2009, 05:52 PM
  3. Newbie question, C #
    By mate222 in forum C# Programming
    Replies: 4
    Last Post: 12-01-2009, 06:24 AM
  4. Question...
    By TechWins in forum A Brief History of
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. assembler and linker stuff...question
    By dirkduck in forum A Brief History of
    Replies: 2
    Last Post: 12-17-2001, 12:10 AM