psteffn@CATICSUF.CSUFRESNO.EDU (Paul Steffn) (06/25/91)
Well, I think there is just as much arrogance in assembly programming as in C programming. I know a C programmer who thinks he is gods gift to the world [and he even openly says so..] and he looks down on assembly programmers as hopeless bit twiddlers. I know a few assembly programmers who look down on C but not because of ego but because of it's limitations. The problem with writing a program partly in C and partly in Assembly is that it limits what you can do in assembly. For instance, what registers are being used [and if you want to use them, save them every time you go to your routine and recall them to their original state every time you return], if you can safely turn off multitasking with a Forbid, or most importantly, how well the compiler generated code with your interrupt routines. Writing a demo partly in C/Assembly causes more problems than it solves. Only 100% assembly programming gives you a feel of what is going on. For a typical Amiga demo, how much would C really benefit a demo programmer? You mentioned that you've seen sources to Amiga demos that could have been done partly in C. I doubt you've seen many sources. The way I see writing a demo is you have a setup routine. Usually just setting up a copper list in chip ram and setting some registers. It could be done in less lines in Assembly code than C. The actual execution of the demo is usually just a loop that waits for a mouse keypress. Something like; wait btst #6,$bfe001 bne.s wait While all the graphics processing is done as an interrupt that is executed during every vertical blank period. Some different rules apply to interrupt routines which I'm sure your C compiler authors didn't take into account. And then there is the routine that attempts to put the Amiga back in the original state it was. Why would anyone want to write a demo in C/Assembly? If you only benefit by having 20% of your code easier to read, why bother???