Welcome, Guest. Please login or register.

Author Topic: Help needed combining GCC/C++ with asm sources  (Read 5763 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: Help needed combining GCC/C++ with asm sources
« on: March 22, 2004, 11:09:51 AM »
My Advice?

I suggest you recode your ASM parts in C, it will be better in the long run :-)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: Help needed combining GCC/C++ with asm sources
« Reply #1 on: March 22, 2004, 03:31:10 PM »
Sorry, yes, I did think before I clicked "Submit" that It could be eligable for "most useless post of the year award"... but even without portability, I would still recommend using C :-)

My thinking is that CPU's only get faster, theny  never get slower... so I wouldn't worry about optimising it (Yes I can't believe I just said that... Next you will hear that I've just got the job of cheif architect at MicroSoft).

Can't you assemble your ASM functions serparatley and then link them in at link time?

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: Help needed combining GCC/C++ with asm sources
« Reply #2 on: March 22, 2004, 04:06:05 PM »
Quote
Worst case scenario is that I will have to just use stack passing and modify the asm side. Then I should be able to use 'extern "C"' at least


Real Men use stacks... Eh? what? yes Bill I can hear you! You need an heir to the SmallFlacid throne? Yes! I will heed the calling... :lol:


Yes, due to the unfortunate deadend nature of the 68k... you have a very good point.


I think you should make a shared library, that way we can all have the benefit of your functions :-)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: Help needed combining GCC/C++ with asm sources
« Reply #3 on: March 22, 2004, 04:20:34 PM »
Quote

The 680x0 asm stuff in a normal amiga os linrary you mean? a memfunc.library...?

Hmm, I don't see why not. Wouldn't have too many functions in it just now though. Just copy, set, set16, set32, set64, swap16, swap32, swap64.

 


It might be nice to have a standardized API for those functions, especially when porting from 68k code to x86 for example.