[futurebasic] FAT code resource

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 1999 : Group Archive : Group : All Groups

From: "Osamu Shigematsu" <shige@...>
Date: Fri, 29 Jan 1999 02:18:55 +0900
Hi, all.

I want to make FAT code resource which can be called from FB using CALL
statement.

Can I do that? If anybody had done, and if any source codes available, let
me know. I use FB 2 and CodeWarrior Pro 3 and 4.

The code I wrote in FB runs fast more than enough, but, I think if I wrote
it in C, it runs more faster.

Anyway, can I know that the CPU is PowerPC or not? If so, I use FB for 68k
and call coderesource for PPC. I know how to build 68k only/PPC only code
resource.

i.e.
LONG IF cpu_ppc
  resH& = GET RESOURCE (_"CODE",_myResID)
  resH& = FN HLOCK (resH&)
  RESIGTER (A0) = [resH&]
  ` jsr    (A0)
  CALL RELEASERESOURCE (resH&)
  ' or CALL "CODE",_myResID
XELSE
  FN myFunc
END IF

Thanks.

Osamu Shigematsu