| ★ APPLICATIONS ★ PROGRAMMATION ★ ARNOR C ★ |
ARNOR C (Amstrad Action)![]() | ARNOR C (Popular Computing Weekly)![]() | ARNOR C (Amstrad Computer User)![]() | ARNOR C (Aktueller Software Markt)![]() |
LINKING UP WITH ARNOR C Now that you've all become master C programmers, following our recent series, Kenn Garroch introduces Amor C, the C compiler, linker and editor is rapidly becoming quite a popular programming language with software houses. That is, they think that people should be using it instead of Basic or machine code. The price of many of the packages is coming down thus putting this powerful language in the hands of the home user. Arnor C at £49.95 is pretty cheap as far as C's go, and is pretty comprehensive. What you get for your money is basically a development system for writing applications on Amstrad machines running CP/M Plus, ie, the 6128 and the PCW8256/8512s. There are six main sections to the package: the compiler, linker, joiner, editor, runtime handler and runtime generator. This means that the C can be used for development and also to create your own saleable software. The inclusion of the runtime generator will turn your object files into COM files and includes a licence to sell. If you are starting with C for the first time then you will also need a couple of good books to enable you to understand the language. The Big Red Book of C by Kevin Sullivan from Sigma Press, 5 Alban Road, Wilmslow, Cheshire, is quite a good introduction, and is not mentioned in the manual. The manual is quite helpful about compiling, linking, and the libraries. It is not, however, very useful for the beginner since it contains no examples and no information on the basics of the language. The C implementation is pretty well complete and includes all of the standard commands used in the major C implementations. In addition, it has a couple of libraries (predefined sections of code) that cover maths, and a good many system access functions such as windowing and character definition plus all of the standard input/output. On the version I looked at, the windowing didn't work but, I am reliably informed that this has now been fixed and it is now possible to have eight windows on screen. A good example of the windowing appears in the editor APED which is a version of Protext. Here, it is possible to have nearly full access to the operating system, and the ability to flip between this and the editor at the touch of a button. Amor C comes on both sides of one disc and before any programming is done, needs to have various sections transferred to a working disc: basically, the editor, compiler, runtime system, the linker and the standard library. I found that the best method of using it was to make up a working disc and then transfer the whole thing to the Ramdisc. This makes the fairly slow compiler work at a reasonable pace and is fine until a fatal crash happens. To start up, the program APED is run which loads the editor and gives the a> prompt. The editor is in a window at the top half of the screen, and any code being worked on is in memory. Once a section has been written that can be tested, the Stop key (Amstrad PCW 8256) is pressed and the computer is placed in the pseudo operating system. It is pseudo because, although many of the CP/M commands are available, though not all, and it is a system that runs on top of CP/M imitating it (the prompt becomes a> instead of A>) but including I for load and s for save. There are a number of ways to compile the program and the easiest is to use AC (Auto Compile). This compiles, links and then runs the resulting object code, if there are no errors. The process is not amazingly fast, even from the Ramdisc, and for large programs, you may have to develop a little patience. After the program has run, if there are no really nasty fatal errors, a keypress returns the system to editor/system mode and your program code is still there in the editor waiting to be modified. Compilation can also be performed from the runtime system, RUNC, as can linking, joining and running programs. Compiling a program produces a link file and during compilation, lists each function as it is processed, *include is slightly different from the standard in that it is possible to look for included files on any drive by enclosing the name in < > or on the current drive with " ". Files that are included contain code to be compiled at the beginning such as headers for the libraries. There are a number of compiler options such as turning off the error messages, and creating global tables. The compiler also supports conditional compilation, and most of the other preprocessor commands - these instruct the compiler to treat the code in certain ways. Once compiled, the link file can be put together with other link files to produce an object file (extension 0) which can then be run under the runtime system. Using the runtime generator, object files are converted to com files that can be executed directly from CP/M. Linking can be performed automatically after compilation as in AC which, if you are writing a long program, is very useful and speeds up the programming process considerably. The linker can also be used to insert machine code programs into the main C program. The machine code should be written using Amor's Maxam assembler and follow the conventions set out in the manual. Not having the Maxam assembler, it was impossible to check this process out - indeed, the manual is a little hazy on how it is done. However, it seems to be possible to call machine code sections from C, and for machine code programs to call C functions. Link files can also be concatenated together with the joiner program to produce a single link file. This is handy for making library files since all that need be done is join together all of the functions into one file which can then be linked to different programs where necessary. Overall, Amor C is a fairly comprehensive package, although it does have a few drawbacks. Not all of the standard C functions are available - that is, they don't appear to be in the libraries. In general, this is not too bad and is more than made up for by the inclusion of a maths library and a number of Amstrad specific functions. The manual could have done with an index, and some examples of compilation, and even a short beginners' section. There is a full list of the available library functions, listed in alphabetical order but, again, no index. This makes finding particular functions fairly difficult since the names are not always what they should be. One thing that doesn't seem to be mentioned in the manual is that to get the\ symbol on the PCW8256 (pretty necessary for\n, etc) you need to press Extra and the @/half key. On the plus side, the editor is excellent and the runtime system of APED brings programming effort down quite a lot. The only moan is that after a program has been compiled, the screen is cleared before the editor can again be used. This wipes off all the error messages and so, if there are a few, they need to be written down. Amor C is a useful programming language and if you spend the extra tenner provides all the facilities necessary to write complete applications programs. The compiler is a bit slow but then so is the Amstrad. PCW |
| ![]() |
|