vanman Posted July 21, 2003 Share Posted July 21, 2003 Is it easier to program the lynx with assembly or C? Quote Link to comment Share on other sites More sharing options...
DanBoris Posted July 24, 2003 Share Posted July 24, 2003 There is a C compiler and libraries for the Lynx here: http://www.geocities.com/SiliconValley/Byte/4242/lynx/ This might be a good way to get started with Lynx programming. The one problem with using C to develop for the 6502 is that no matter how good the compiler is it's hard to compile C into very tight efficient machine code. Dan Quote Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2003 Share Posted October 6, 2003 everybody asks this. and its simple to awnser: if you want full speed and the maximum out of the lynx. take assembler if you want to program easier go for C. please note that assembler is a pain in the ass. only do it if you really want to do it best regards, Vyeyendra Ramnares Quote Link to comment Share on other sites More sharing options...
Vigo Posted November 4, 2003 Share Posted November 4, 2003 please note that assembler is a pain in the ass. only do it if you really want to do it Hmm, i think it depends on your personal experience/attitude. A crack-asm programmer might have problems with C as much as a crack C programmer might have problems with asm. The 6502 is really easy to learn, while C has a more complex structure. On the other hand, you really do not want to code a modern OS with asm, because asm is about dividing complex routines into very small steps, which is also a cause why asm programs are harder to debug. Quote Link to comment Share on other sites More sharing options...
EricBall Posted November 4, 2003 Share Posted November 4, 2003 I haven't done any Lynx programming, but I've done lots of C and ASM (6502 and others). A big benefit of ASM programming is it gives the programmer almost absolute control. There is no translation layer (compiler) making decisions on your behalf. C is also built around function calls and typically uses stack-based local variables. Both are not that efficient for the 6502 (JSR/RTS=12 cycles). And unless the Lynx C compiler has been optimized for the Lynx/6502 there may be other inefficiencies (starting with the size of int). Quote Link to comment Share on other sites More sharing options...
eric_ruck Posted November 4, 2003 Share Posted November 4, 2003 You can always start in C and then hand-optimize in assembler, or just do the critical sections in assembler. Part of the problem with the C code isn't the speed, but it's the size. If you're really pushing the Lynx you will need to optimize for speed, but even if you're not pushing, you'll start running out of room in the address space really, really quick in C. C would be perfect to do something like "Same", or maybe a simple RPG where you could keep individual screens in the ROM space. But in my (currently stalled for lack of time) Breakout project, I'm hitting the space barrier, and my game isn't at all complicated. Eric Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.