Thread: Code::Blocks assembly

  1. #1
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738

    Code::Blocks assembly

    I want to ask if there are any tutorials only about writing assembly code in codeblocks.

    Their site says that it's not supported yet, but how do you explain that i managed to use it? I used it's disassembler to see the basic structure, and since then it was straightforward, but i lack the necessary experience to go on to more complex things...
    Devoted my life to programming...

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Try looking for assembly tutorials for GCC instead - that's the name of the compiler.

    Saying tutorials for code-blocks is like saying tutorials for notepad.
    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.

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    412
    Do you mean using code::blocks against an external assembler, or using inline assembly in gcc?
    If it's the former, search for tutorials for nasm, yasm or gas for example.

    As for gcc's inline assembler; I have never used it myself but I believe it uses gas syntax, with a few extensions.

  4. #4
    Registered User UltraKing227's Avatar
    Join Date
    Jan 2010
    Location
    USA, New york
    Posts
    123
    when someone or a team releases a project like Code::Blocks, they may have
    began to implement asm support and seen the date for the release is already
    date and they dont have enough time to remove the codes they made and
    release it so they release it 'as-is'. because the asm support is not complete,
    they say the Compiler doesnt support asm to avoid some guys to come over
    and complain that the asm support has destroyed their Pc (impossible but this
    is just an example).
    Last edited by UltraKing227; 03-07-2010 at 01:08 PM.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    It's nothing to do with the IDE, it's all down to the compiler.

    You can write
    __asm("mov eax,0");
    just as easily using notepad and compile from the command line, as you can using some fancy IDE and pressing the compile project button.

    Just google "gcc asm tutorial" or similar.
    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.

  6. #6
    Registered User UltraKing227's Avatar
    Join Date
    Jan 2010
    Location
    USA, New york
    Posts
    123
    sorry, but i sometimes use the word Ide instead of compiler.
    i know its a bad habit. im still trying to take this habit off, though.

  7. #7
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Quote Originally Posted by Salem View Post
    It's nothing to do with the IDE, it's all down to the compiler.
    You can write
    __asm("mov eax,0");
    Mine works like this:
    Code:
     asm("mov $0, %eax;"); // Same as yours
    How can i know what assembly format does my compiler support?
    Devoted my life to programming...

  8. #8
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > How can i know what assembly format does my compiler support?
    Google.
    Like I said earlier.
    Do you really want me to chew all your food?
    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. Inline assembly and compiler optimizations?
    By TmX in forum C Programming
    Replies: 6
    Last Post: 03-04-2010, 07:41 PM
  2. Learning Assembly
    By mrafcho001 in forum Tech Board
    Replies: 5
    Last Post: 03-12-2006, 05:00 PM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  4. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM
  5. C,C++,Perl,Java
    By brusli in forum C Programming
    Replies: 9
    Last Post: 12-31-2001, 03:35 AM