Path: news1.icaen!news.uiowa.edu!news.physics.uiowa.edu!math.ohio-state.edu!uwm.edu!www.nntp.primenet.com!nntp.primenet.com!news-peer.gsl.net!news.gsl.net!portc01.blue.aol.com!audrey01.news.aol.com!not-for-mail From: mikew50@aol.com Newsgroups: comp.sys.apple2.programmer Subject: Re: 6502 binary format & xassembler Date: 19 Nov 1996 02:14:46 GMT Organization: AOL http://www.aol.com Lines: 137 Sender: news@aol.com Message-ID: <19961119021700.VAA13913@ladder01.news.aol.com> References: <56heil$c48@narses.hrz.tu-chemnitz.de> NNTP-Posting-Host: ladder01.news.aol.com I've gotten some e-mail requesting more information about OMF. While I replied in e-mail, I thought I should post the most pertinant reply for the sake of general discussion. As for _free_ compilers, well, in my experience you get what you pay for. However, I would port the ORCA compilers if I thought there was a viable commercial market, and I would discuss allowing someone else to port them if I thought the person involved was serious, realistic and capable. If you fit the bill, send some e-mail and we'll talk. I _don't_ think you're going to get a C compiler for the 6502 that will satisfy anyone. While the original K&R C was designed for small systems, modern ANSI C is a big language--too big for a 64K machine. ORCA/C is 200K, and that's just the compiler. You still need to add space for the O/S, environment and for compiler workspace. That size is pretty typical. A 65816 computer with 1M is a pretty easy fit. The more you cut down on the memory or processor, the harder it will be to satisfy people with the compiler. Mike Westerfield --- reply to an e-mail --- .... > - Is the (i.e. any) use of the OMF binary format free? (I heard it was > published by Addison Wesley first...) > This includes building assemblers/compilers for it, producing binary > files in this format, using it in OS loaders, etc... Actually, it was designed originally by me for the 8 bit Apple II, and adapted by me and several other people for use with the Apple IIGS. Its use is free. > - Where can I get the description of the OMF binary format (best in > electronical form) The best reference is "Apple IIGS GS/OS Reference," which is out of print. You can generally find a copy by advertising in the Apple II usegroups, though. Another commercial source is the ORCA/M reference manual. That's still available from us. I've never taken the time to publish the specifications in electronic form. There are some tables in the documentation that make understanding the format a lot easier, so it's not just a matter of uploading ASCII. If you'd like to do the work to publish the specification, I have no objections. The current documentation is in Microsoft Word format on a Macintosh. What formats can you handle? > - As far as I have heard, this format works for both the 6502 and the 65816, > is this true? (recently another company made the SuperCPU 64 available, > which is a 20MHz 65816 for the C64 :-) It has been implemented on both, yes. The format is CPU independent, though. I recently got a request for some information about how available support was. Here's the relivant parts of that reply, which you might find interesting: --- cut to the reply --- >You wrote about how the OMF is well supported, but you neglected to say >where information about the OMF is. Good point. :) Here's three places off the top of my head: ORCA/M 4.1 Reference Manual (8 bit Apple II version) ORCA/M 2.1 Reference Manual (16 bit Apple IIGS version) Apple IIGS GS/OS Reference Manual (Apple Computer, published by Addison Wesley) These sources document the format itself. I think it was also documented in the MPW IIGS cross development tool reference manuals, but I could be wrong. I know it was documented in several other Apple publications, but those were superseded by the GS/OS reference manual. The format was also documented in the original DOS 3.3 version of ORCA/M, published by Hayden Computer, but that company is gone so it's a moot point. As for products, the following are a few of the ones I can name offhand that use the OMF: ORCA/M 3.4 (Assembler, Apple II, Hayden Software) ORCA/M 4.1 (Assembler, Apple II, Byte Works) ORCA/M 2.1 (Assembler, Apple IIGS, Byte Works) MPW IIGS Cross Assembler (Assembler, Mac to Apple IIGS, Apple Computer) Merlin 8/16 (Assembler, Apple IIGS, Roger Wagner Publishing) ORCA/M 2.1 (Assembler, Apple IIGS, Byte Works) APW Assembler (Assembler, Apple IIGS, Apple Computer) APW C (C Compiler, Apple IIGS, Apple Computer) MPW IIGS C (C Compiler, Mac to Apple IIGS, Apple Computer) ORCA/C (C Compiler, Apple IIGS, Byte Works) MPW IIGS ORCA/C (C Compiler, Mac to Apple IIGS, Byte Works) MPW IIGS Pascal (Pascal Compiler, Mac to Apple IIGS, Byte Works) ORCA/Pascal (Pascal Compiler, Apple IIGS, Byte Works) TML Pascal 1.0 (Pascal Compiler, Apple IIGS, TML Systems) ORCA/Modula-2 (Modula-2 Compiler, Apple IIGS, Byte Works) ORCA/Integer BASIC (BASIC Subset Compiler, Apple IIGS, Byte Works) Like I said, this is just a short list off of the top of my head. These are also commercial programs; there were many other freeware, shareware, and never-released languages that use OMF. In fact, pretty much every language released for the Apple IIGS used the OMF. As a serious language, that last one, Integer BASIC, is a joke. On the other hand, it wasn't written to be a serious language--it was written to be a demonstration compiler, showing how to install a compiler in the ORCA/APW shell. The front end information is not important for OMF considerations, but the back end is interesting because it writes OMF files used as input to linkers. One of the unique features of the OMF is that the same internal format is used for both executable files and object files. That makes it easier to develop sensible utilities. (Of course, the internal records used vary a great deal.) The OMF is also unique in that it can handle 16 or 32 bit calculations easily, as needed. 8 bit implementations generally only do 16 bit calculations, but the 16 bit implementations do 32 bit internal calculations and handle either 16 or 32 bit input files. It can also handle little-endian or big-endian numbers. These features mean, in a nutshell, that it's easy to use the format across platforms and CPUs. --- end of reply --- If there's anything else I can do to help, be sure and let me know. Mike Westerfield