• Lucid Dreaming - Dream Views




    Results 1 to 25 of 34

    Thread: C++ Problem

    Hybrid View

    1. #1
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      I think GNU is the standard. I know that you can do _asm with GNU.

      Also, are you doing command line compilation? I think you have to add a whole ton of crap to the make to do inline assembly.

      Also, maybe it's different for your compiler, but I always use references for parameters in inline assembly. I don't remember if you need to do that with GNU, I know one of them required you to do that.
      Code:
      mov      edi, [DestAddr]
             mov      ecx, [MixLen]
             mov      esi, [SrcAddr]

    2. #2
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      Why are you using your own sound routines? It might be easier to use OpenAL

    3. #3
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386
      So I can or I can't keep the functions as-is?

      I didn't write the Assembly code-- This is apart of a game enginge I'm editing and adding to.

    4. #4
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      I would use OpenAL for a game, that way you are guaranteed that it will work.

      3000 audio commands in asm? What is the name of this engine that you're working on, it sounds really big.

    5. #5
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Quote Originally Posted by Seismosaur View Post
      So I can or I can't keep the functions as-is?
      you cannot use Intel style assembly with GCC

      I believe there are some pre-processor macros around to convert between the two syntaxes, but I have near zero experience with assembly inside C++

    6. #6
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      Yes you can I forget how though, some type of compiler flags. Try
      Code:
      -xchip=pentium5
      I' think that's actually something else, but there is a similar flag for the asm. I don't do command line, my IDE takes care of that.

    7. #7
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Quote Originally Posted by ninja9578 View Post
      Yes you can
      you're right,
      I just googled it

      Code:
      gcc -o my_program -masm=intel my_program.c

    8. #8
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      I find intel asm soooo much easier than the unix style one. How do people read that junk?

      You can do misp asm inline too if you are on a PPC computer like me

    9. #9
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      I like to think I'm a fairly competent programmer
      but I draw the line at assembly

      now, I've never done anything game orientated
      I'm primarily database and web server middleware

      but seriously,
      does DIY assembly *really* make that much of a difference?
      (with all it's portability & bug pitfalls and show-stoppers)

      maybe it's cause I change my mind too often
      A minor re-jig to C code vs. scraping and re-writing pages of assembly

      anyway....

    10. #10
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386
      Ausome, now I don't have to phuck around with other compilers!

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •