From: utzoo!decvax!ucbvax!CAD:tektronix!zehntel!sytek!menlo70!hao!seismo!rocheste!parker Newsgroups: net.micro.atari Title: Re: 6502 compilers Article-I.D.: rocheste.599 Posted: Wed Feb 2 00:13:39 1983 Received: Wed Feb 16 05:38:59 1983 Wow!! Let me start by saying that there are several misleading statements in your message. First, you can only do a memory fetch in 5 cycles only if you have the base address loaded into two page zero locations and the 8-bit index loaded in the Y register. If you don't have this situation, you need to take many cycles (instructions) to load these registers. It is very hard to write a compiler that makes good use of page zero due to the fact that you have to share it with the OS and after that there isn't much of it left for program variables. Once you start swapping page zero you lose most of its advantages. Also, if you have an array with more than 256 bytes, you can't just use the index register anyway. Enough!! Now back to the subject of the C compiler sold by OSS. First of all, it is NOT a true compiler in that it does not generate 6502 code in the normal sense. It really generates subroutine calls which emulate something like a P-code. If you look at the BYTE magazine bench mark of Sept. 1981 and the update of Jan. 1983, you will see that there were several 6502 compilers tested, the best coming in at 14 seconds (Actually a little bit less than that if you read the Jan. issue, but its validity is in question since there weren't any controls), all of the compilers under 20 seconds were for Z80. The OSS compiler takes about 300 seconds to execute this bench mark and the Atari PASCAL (compiler) takes about 190 seconds. Well, now the plug. There is a compiler for the Atari that generates *real* 6502 machine code. It comes on an 8K cartridge and includes an Editor (true full screen) and Monitor as well as the compiler!!!!! It also generates very good 6502 code. It executes the prime number bench mark mentioned above in 13.4, yes I said 13.4, seconds. It also compiles that bench mark in just 2, yes I said 2, seconds off the disk!!! Compare that to the compilation times of the other compilers in the bench mark (all of them take minutes, not seconds and are running off of faster disk drives than the Atari). The compile time is only about 1/4 second if you compile it from the editor buffer!!! Now that I have you drooling at the mouth (or in total disbelief), let me tell you that you're going to have to wait to get one. It isn't scheduled to come on the market until the end of March (and you won't see any ads for it until about May). If things work out, OSS will be carrying this compiler as well. It is called AMPL, and if you haven't guessed by now, I'm the author. If you really can't wait till then, contact me and maybe we can work something out. Clinton W. Parker, owner Action Computer Services 1105 Plymouth Ave. So. Rochester, NY 14608 (716) 235-6572 rochester!parker