Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!fluke!ssc-vax!dmg From: dmg@ssc-vax.UUCP (David Geary) Newsgroups: comp.sys.amiga Subject: C vs. Assembler Message-ID: <2008@ssc-vax.UUCP> Date: 16 Jun 88 16:29:24 GMT Organization: Boeing Aerospace Corp., Seattle WA Lines: 83 >In article <312@pedro.UUCP> (Pete Ashdown) writes: >To this day, I still haven't learned a structured language. I _tried_ to get >into 'C', but I found out quickly that I was uneasy not knowing _exactly_ what >was going on with my program. I prefer assembly, simply because I feel that >I am more in control. Speed has another thing to do with it. I know 'C' can >be very fast for some programmers, but I think it would end up being very >slow code for me, simply because I am a beginner at it. Above all, I want to >write games on the Amiga. After seeing Marble Madness kludge its scrolling, >I don't think that 'C' is the language I am looking for. I really haven't >seen "brilliant game #1" that was written in 'C'. It also may have something >to do with the fact that I loaned out my K&R and haven't gotten it back >yet :-). >Thanks for your suggestions. I may just turn back to examining 'C'. I have >already done program #1 to some extent in assembly. Should I turn back to >'C' or should I keep going with assembly? I'd be curious to find out from >other 68000 assembly programmers (like Mark R.) how they got started. If they >went from 'C' to assembly or just started out in assembly. Unlike many C programmers, I have never done any serious assembly, however, I am well-versed in C, having taught it for over 2 years. I can understand your preferring assembly because it gives you more control. I always recommend that my students (in an introductory C class) do two things to become better at C: 1) Read other people's C source. 2) Learn assembly. I do not recommend that they actually USE assembly (although I have nothing against assembly), but it helps tremendously if you understand some assembly when learning C. It's much easier to comprehend how arguments are "passed" if you understand concepts like a stack ;-) I get tired, though, of claims such as: WRITTEN ENTIRELY IN ASSEMBLY FOR MAXIMUM SPEED AND SMOOTH RESPONSE. Give me a break. When you are writing C code you ARE writing in assembly - call it Power Assisted Assembly ;-). Sure, there are some assembly gurus out there who could take the assembly output by a C compiler, and optomize it for more speed, but I think our current compilers on the Amiga are good enough so that the gains made by optomization of the assembly are rarely justifiable, and/or rarely make a significant difference in speed. As for games, well, I'm currently working on a game called "brilliant game #1" ;-). Actually, it's an Arkanoid clone, which is about halfway done, and is entirely in C. At first, I had some problems with speed, but it was due to a lack of understanding the Amiga, not problems with C being too slow. C will give you the ability to "think" in a higher-level language, and still give you most of the benefits of assembly. C will also give you SOME degree of portability. C's portability is a bit overstated in my opinion, but for sure, it'll be more portable than assembly. I'd recommend that you take the time to learn C. The fact that you already know assembly will help you tremendously when learning C. My best students are ALWAYS assembly programmers. As an assembly language programmer with no HHL experience, C is the perfect choice. If you are concerned with C "doing things under the covers" that you cannot control, you can always look at, and/or change the assembly output by your C compiler. Good luck on your games... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ "...They don't give a damn, ~ ~ about no trumpet playin' band ~ ~ It aint what they call ~ ~ rock and roll..." ~ ~ ~ ~ Sultans of Swing ~ ~ Dire Straits ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- *********************************************************** * David Geary, Boeing Aerospace Co., Seattle, WA * * I disclaim all disclaimers.... * ***********************************************************