Jump to content
IGNORED

C or assembly?


vanman

Recommended Posts

Is it easier to program the lynx with assembly or C?

 

C is slower, compiler contains bugs and doe not understand all instructions the lynx can handle. Small games can easiely done in C, but if you want to use hardware and interupts, you should switch to ASM.

If you use C you have to use a (imo bad) Inline Assembler. This is because not everything is yet converted to a library function.

 

Example:

One of my games started as C. Now only the game-logic and the frame is done in C, everything else in inline-asm.

 

Just compare my (very easy) examples:

http://www.uni-giessen.de/~gd1113/lynx/kurs/

 

 

Tschau,

Sage

Link to comment
Share on other sites

You can also like assembly modules to C modules. Depending on the size and speed needs of your game I'd do as much as possible in C, unless you happen to have a whole lot of time on your hands. Especially if you're new to programming, I think you would have a better change of success if you at least start with C so you can begin to see results as your game takes shape.

 

The C compiler produces assembler output as an intermediate format. You can also use that intermediate output as a starting point for assembly language -- even though the output is way less than optimal, you can always pick through and improve the parts that need it.

 

Eric

Link to comment
Share on other sites

The C compiler produces assembler output as an intermediate format.  You can also use that intermediate output as a starting point for assembly language -- even though the output is way less than optimal, you can always pick through and improve the parts that need it.

 

Not really. I woulnt recommend using the ASM output as a starting point.

And remember: The BLL Lyxass has a bit library of powerful macros and functions. But it is not compatible to the inline asm.

 

But... it's your choice.

 

Tschau,

Sage

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...