6502 assembler question

This is a discussion on 6502 assembler question within the C Programming forums, part of the General Programming Boards category; So I'm almost finished my implementation of the 6502 core emulator. Now for the assembler. Should this assembler be producing ...

  1. #1
    C lover
    Join Date
    Oct 2007
    Location
    Virginia
    Posts
    265

    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:

    Code:
    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
    Location
    California
    Posts
    3,257
    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
    Location
    The edge of the known universe
    Posts
    32,822
    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.
    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. A question about a question
    By hausburn in forum C++ Programming
    Replies: 3
    Last Post: 04-25-2010, 06: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 Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. assembler and linker stuff...question
    By dirkduck in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 12-17-2001, 12:10 AM

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