Welcome, Guest. Please login or register.

Author Topic: PowerPC asm programming  (Read 7871 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: PowerPC asm programming
« Reply #29 from previous page: February 26, 2003, 09:13:48 PM »
Quote

I like to try to stay far away from any proprietary code. This allows me to port my code to other operating systems written for the PowerPC.


Even if you could use some magical BIOS int calls to make os-portable code under PowerPC (which you can't), that really isn't a good way to achieve it. For starters, you are excluding yourself from any niceties that the operating system provides; such as screens in AmigaOS, or multiple shells (with desktops) under linux.

The trick is to keep your display code seperate from your core code.

For example, I have written an OpenGL application. It easily compiles for Win32, Linux x86, LinuxPPC, and various other operating system, without changing a SINGLE line of the core code.

You simply provide an OS-specific front end, which calls the routines in the main program. For example, there is a windows.c for Win32 OpenGL, and a glut.c for all operating systems that support glut.

This approach also translates to assembler; there is nothing stopping you seperating up your assembler program into objects and linking them depending on your target platform.
Playstation Network ID: xeron6
 

Offline fatman2021Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2002
  • Posts: 118
    • Show only replies by fatman2021
    • http://www.geocities.com/fatman2021/
Re: PowerPC asm programming
« Reply #30 on: February 27, 2003, 12:42:52 AM »
Any good PowerPC emulators out for  DOS/Windows
 

Offline Hardboy

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 248
    • Show only replies by Hardboy
Re: PowerPC asm programming
« Reply #31 on: February 27, 2003, 07:06:46 PM »
I´ve written my own. It doesn´t work 100% OK at the moment, but some testing would surely help, if anyones interested...
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: PowerPC asm programming
« Reply #32 on: February 28, 2003, 04:48:13 PM »
Hey Tickly...

Did you know that the integer registers on PowerPC are 32-bits? Thats 32, not 64...

:lol:

Sorry man, I just couldn't resist it :-D
int p; // A
 

Offline Rogue

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 566
    • Show only replies by Rogue
    • http://www.hyperion-entertainment.com
Re: PowerPC asm programming
« Reply #33 on: February 28, 2003, 05:36:14 PM »
Quote

fatman2021 wrote:
I like to try to stay far away from any proprietary code. This allows me to port my code to other operating systems written for the PowerPC.


You are already using proprietary code if you are using int10 and VBE. Not only proprietary, but also entirely non-portable.

Every OS will impose some API on you, there is simply no way to do otherwise. A portabillity layer is a good idea, something like libSDL for example.
Look out, I\'ve got a gun