★ APPLICATIONS ★ PROGRAMMATION ★ RAMPAK ★ |
Rampak (The Amstrad User) | Applications Programmation |
A machine code sub-routine package for the Amstrad CPC range. No matter what the initial reason for buying your CPC, sooner or later you'll probably attempt writing your own programs. Most of us start with simple Basic programs. These are sufficient for a while until one day you ask yourself "Why can't I write programs that use all the snazzy effects achieved by most of the commercially written software?" Well, the answer is... you can! The newly released machine code subroutine package, RAMPAK, will enable beginner CPC programmers to create fast, compact and more impressive programs. In fact, many experienced programmers may find some of the routines in RAMPAK very useful too. "Just another collection of RSX commands loosely tied together with a few menus.. " I hear you say. On the contrary, RAMPAK is definitely not another RSX package - it's an integrated collection of very useful machine language sub-routines which may be easily incorporated into your own programs, either individually or as a whole unit. Advantages The routines are loaded into memory as binary files and activated by using Basic's CALL statement. There are two advantages of this method over RSX (Bar commands). The first is that the overall package is shorter since extra memory is required for the RSX name and jump address tables as well as that used up by the actual routines themselves. This leaves more room for your programs. The second and probably the most important advantage is that if you only want to use a few of the routines in RAMPAK, any number can be individually saved and added to your own programs. The package consists of nearly 50 subroutines which perform tasks that most Basic programmers would not have thought possible. For ease of explanation, I have broken the routines up into groups based on their area of influence. Screen The screen section is by far the largest and contains routines which allow you to:
Printer There are two printer routines, the first generates a text screen dump in any mode and the second allows text printed on the screen to be echoed to the printer. Keyboard In the keyboard section there are routines that:
Disc Drive There is only one routine which apples to disc operation. This allows any disc sector to be read from disc or any 512 byte block of memory to be written onto any disc sector. This type of routine is used extensively by all the commercial copying and formatting packages. An interesting tip for the more experienced programmers is that this routine can be used to format a specified track (write your own disc copy program perhaps? However, you need to be familiar with the AMSDOS BIOS commands as outlined in the CPC Firmware Guide (Soft 968). Cassette The cassette routines are somewhat more plentiful and include the following:
The final group of routines apply to the computer memory and consist of:
When the program is first loaded and run, a quick demonstration of some of the capabilities of RAMPAK are shown, after which the message "Rampak installed at address 39112" is displayed. At this point the Basic part of the program has erased itself from memory and the sub-routines are installed starting at memory address 39112 (&98C8). You can now select which routines you wish to use and either try them directly from the keyboard or save them to disc or tape for later use in your own programs. To save a sub-routine, use the information given on the last page of the manual. This is an alphabetical listing of all the routines available. Use this list to determine the starting address and length of the routine you wish to save. Once you have these, it's a simple matter to save the routine of your choice. Here is an example: SAVE "IMAGEV",B,39264, 50 It is important to note here that nearly half of the routines in RAMPAK are * relocatable and may be reloaded at any convenient location in the memory pool. To use the file saved above in your own program, simply include the following lines at the start (without the REMs): 5 MEMORY 39263 : REM One loss than the loading address 15 REM The rest of your program goes hare Now you can call the IMAGEV routine at any time from your own program using the command CALL 39264,A where A, in this example, is a variable which contains the ASCII code of the character you wish to print as a vertical mirror image. Australian Made Apart from the fact that RAMPAK is an excellent Australian product, its other main feature is that it Pills the gap for Basic programmers. Its unique approach will allow many to get the most out of their computers without getting too deeply into machine code. RAMPAK is available post free through The Amstrad User at a cost of $44.95 for the disc version or $37.95 for the tape. Enquiries from dealers are welcome.
|