Welcome, Guest. Please login or register.

Author Topic: C coding noobie needs help converting a 68k program to PPC/OS 4  (Read 2323 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Your first milestone would be to migrate the code not to OS4, but to gcc. SASC is a great C compiler for Amiga but provides a lot of non-standard functionality, some of which you may need to reimplement. Once you can get the original 68K application code to build properly (and give a working executable) in gcc, then you can look into porting it to OS4.

For the second step, you can opt to keep the code as 3.x compatible as possible, or you can make it more OS4 coding standards compatible. The major difference between the two is mostly down to the way OS library functions are invoked (eg IExec->AllocVec(...) as opposed to AllocVec(...)) and the preferred names for elemental types (int32 as opposed to LONG).
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: C coding noobie needs help converting a 68k program to PPC/OS 4
« Reply #1 on: October 08, 2010, 01:52:11 PM »
Quote from: woof;583578
Hello Karlos

You can still use ULONG if you want

and just adding
#ifdef __amigaos4__
#define __USE_INLINE__
#define __USE_BASETYPE__
#endif

allow you to still call the os3 way the OS library functions like that AllocVec(...)

Alain Thellier


I know; I said he had a choice of which route to take. The alternative is to go for the preferred OS4 coding standards if he didn't care about keeping the code backwards compatible.
int p; // A