Re: LF: C programming for the TI-92


[Prev][Next][Index][Thread]

Re: LF: C programming for the TI-92



At 11:26 PM 12/7/96 -0500, you wrote:
>> 
>> Well, here's my opinion (I'm sure many people will disagree):
>> 
>> I think that all Fargo programs should be written strictly in 
>> assembly language.  When written in ASM, the programs are very fast, 
>> efficient, and don't take up a whole lot of space.  When written in 
>> C, the same program will be much slower, less efficient, and take up 
>> much more space.  The only good thing about C programming is that it 
>> is relatively easy to program in, but if written in ASM, the games 
>> and programs will be much better.
>> 
>> -Ed
>> 
>
>Once C is compiled it is machine code. Once ASM is compiled it is machine
>code as well. I disagree with you about the speed part. Why would it be
>slower?

By this same logic, qbasic files when compiled into machine code should run
just as fast as asm files which have been compiled into machine code. This
is obviously not true.
C is a higher-level language. For every command that you make in c, a
compiler has to brake down that command into many other commands and then
translate those commands into machine code. In assembly, you retain direct
access to each command i.e. the commands are not further, and possibly
inefficiently, broken up. The more code you have, the longer it takes to
process, and the longer the program is. So tight asm routines are much
better than c.