addressing modes with respect to a C language program

This is a discussion on addressing modes with respect to a C language program within the C Programming forums, part of the General Programming Boards category; can anyone give one example each for various addressing modes with respect to C language..... for example what addressing mode ...

  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    2

    Question addressing modes with respect to a C language program

    can anyone give one example each for various addressing modes with respect to C language.....

    for example what addressing mode is used in the following statement?

    a=200+300;

  2. #2
    Registered User
    Join Date
    Mar 2009
    Posts
    399
    The addressing modes used is going to depend on your processor and compiler. Not to mention that the example you posted might be compiled to several instructions.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,049
    Quote Originally Posted by ckarthickit View Post
    can anyone give one example each for various addressing modes with respect to C language.....
    For starters there's no need to know about addressing modes when programming in C.
    Only assembly language programmers are concerned with them - so why bother?
    Quote Originally Posted by ckarthickit View Post
    for example what addressing mode is used in the following statement?

    a=200+300;
    Most likely the immediate mode, but the assembler is king, as it may optimize it differently.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Generate the assembly and have a look (for your compiler / architecture).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. c program help :>
    By n2134 in forum C Programming
    Replies: 9
    Last Post: 02-06-2010, 12:12 PM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  3. I need some help with my program please.
    By agentxx04 in forum C Programming
    Replies: 9
    Last Post: 09-26-2004, 08:51 AM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 11:04 PM

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