*************************** * * * THE CRACKER * * Copyright (C) 1984-6 * * I.W.SEARLE * * All Rights Reserved * * Version 2.31 * * * *************************** WELCOME to the THE CRACKER All versions with Z80 processors ================================ INTRODUCTION This file contains information about improvements and updates to THE CRACKER made since the manual was printed. Many of these added features will make using THE CRACKER easier for you. Please print it out and read it in conjunction with the manual. If you have an AMSTRAD be sure and see the notes for your machine. ONLINE HELP Your can summon a help screen at any time, except when entering text or while actually editing a cell. Just use the '?' key. Press any key other than ESCape to return to the situation before calling the help screen. KEYBOARD NOTE If the single quote ' key is not directly available to you on your keyboard you can use the double quote " as an alternative. Similarly you can use a ';' semicolon instead of a '\' backslash. RUNNING THE SAMPLE WORKSHEETS PROVIDED On this disk you get THE CRACKER together with five example worksheets. These are the files with the extension .MEM You can look at SALES.MEM for example just by typing: A>CRACKER SALES SALES.MEM is a sample commission calculation showing the results bases on a stepping scale and a sliding scale. TAX.MEM mem is an example of a self employed tax calculation. This uses a function POS specially created for tax calculations. This makes no change if the argument is positive but gives a value of zero if the argument is negative. TBEAM.MEM shows how an engineer might work out the properties of a T-beam. With routines like this whole books of formulae and tabulated results can be dispensed with. IRR.MEM shows how to work out the internal rate of return. The program in this case actually searches for an answer as this is the only way this problem can be solved. This worksheet uses DO and WHILE and several other useful functions. You won't be able to prepare this type of worksheet until you are quite experienced but it does show the level of sophistication to which you can go. PLOT1.MEM and PLOT2.MEM are worksheets set up for graphics. See the TRACE command notes for details of how to use the graphics. Also included are the two programs needed to convert to and from DBASEII, these are MEMDBF.COM and DBFMEM.COM. DBF.DOC tells you how to use these programs. SAVING YOUR WORKSHEETS IT IS ESSENTIAL that you make very regular BACK-UPS of you work. Every half hour would be a good idea and so if the worst happens it will only take you half and hour to recover the situation. Keep asking yourself how you would feel if there was a sudden power failure, your equipment failed, or (heaven forbid) there was a bug in THE CRACKER that you happened to stumble accross. All you need to do is type CAFsave which means Copy All to Filename "save". The means the Return key, choose your own filename which can be a single letter. Dont underestimate the ability of machines and programs to destroy your work. IMPROVEMENTS AND ADDITIONS MACRO COMMAND CHANGES --------------------- A further way of using macro commands has be built in. As well as having your macros in cells A1...A9 you can also have them anywhere else on your worksheet. For these other macros just call them by typing a * in front of their cell reference. So a macro in B20 is called by giving the command *B20. EXTRA FUNCTIONS --------------- DATEAFTER(date,days) Gives the date that will be the number of days specified after the input date. The date must be in the form of a single number, for example 312.1985 - being the 3rd December 1985. Be careful to put months 1 to 9 as 01 to 09. DAYSAPART(date1,date2) Gives the number of days between any two specified dates. DAYOFWK(date) Returns the day of week as a number. Saturday has a value 0, Sunday 1, Monday 2 etc. DAYOFYR(date) Returns the number of days between January 1st and the present day. BLEEP Sets off a bleep. Use it as an audible signal. IN(port) Reads an 8 bit port given by the number or cell reference 'port'. OUT(port,value) Outputs a 'value' given by a number or cell reference to the 'port' given by a number or cell reference. SUMIF(crd1,crd2...crd3) This is a conditional adding up function. Only those items in the range crd2...crd3 will be included that correspond to a cell entry in the column specified by crd1 and are on the same line. A B 1 123.45 2 MARKER 23.45 3 245.56 4 MARKER 45.67 SUMIF(A1,B1...B4) gives 69.12 SUM(B1...B4) gives 438.13 NOTE crd1 can point to any cell in the column but must not point to cell with a text entry in it or you will get an error message. A special user area has been allocated for those with machine code knowledge only. Most users should skip this item: Given here is the source code for the user area: ; This user area is called with a function of the form ; USER(value.sent,value.received) ; The value sent can be a number, expression or cell reference. ; The value received will be the decimal equivalent of the word in ; register HL at the end of the user added code ; Look for USER AREA message in the code with the CRACKER.OVR file ; because of the size of this file you will have to write a ; utility to read records 7,8,9 and 10 in which the user area is ; to be found, you can then make you changes and feed it back. DB '>>> USER AREA >>>' USER: RET ; Replace with NOP LD A,'Y' LD (MUST.HAVE.CALC.NUMBER),A CALL FIRST.ARGUMENT RET Z LD HL,FNUM1 CALL TRANS.FIRST.NUMBER CALL DBLE.TO.WORD.CONVERT ; Output contents JP USER.END ; put this jump at end of ; your code ; first argument of user translated to byte in HL DB 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 DB 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 DB 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 DB 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 DB 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 DB 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 DB 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 DB 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 ; Value in HL converted for return as cell value USER.END: CALL U.WORD.TO.DOUBLE.CONVERT LD HL,FNUM1 CALL TRANS.RESULT RET DB '<<< END ' FUNCIONS CONTINUED The rest of these functions are only available on CP/M PLUS (3) systems. Note for your clock and calendar to be correct you must set them before starting THE CRACKER. Use the utility called DATE, just type DATE SET and answer the questions. YEAR Gives the current year. MONTH The month. DAY The day HOUR The hour MINUTE The minute SECOND The second DATE Returns the date in the form of a single number, for example 312.1985 - being the 3rd December 1985. ZEROTIME Resets the elapsed time counter. Probably best included in and IF,THEN,ELSE entry. TIMELAPSE Returns the elapsed time since the ZEROTIME function was last operative. This is in seconds. DELAY(n) Does nothing until n seconds have elapsed. It may be a cell reference or a value. For practical reasons make it a cell reference with a value 0 until you actually want to run you application. GRAPHICS IMPLEMENTATION ----------------------- TRACE GRAPH COMMAND T +--------------------------------+ | Screen, Printer | | Trace graph to | +----------------+---------------+ | +-------------+-----------------------+ | | S P +------------+ +------------------------------+ | | | Normal, High quality | | Screen | | Printer | +-----+------+ +--------------+---------------+ | | | +----------------------------------------+ | | Plotting press SPACE BAR when finished | | +----------------------------------------+ | +---------------+------+ N.B. only if your | | machine supports N H screen graphics. +------------------+ +----------------+ | | | | | normal quality | | high quality | +------------------+ +----------------+ | | +-----------+----------+ | +----------------------| | Printing please wait | +----------------------| The graphics addition to THE CRACKER has been designed to allow you to create a graph with the minimum of work. However the graph can't be done without some information about what you want plotted. This is done using special functions that tell the graph plotter just what you want. Note that where 'crd' is specified below you must put it in the form shown. If you don't the current values will not be properly passed to the plotting section of the program. You can't use numerical or expression equivalents except where stated. Here are the functions: TYPEPLOT(crd) The type of plot you want. Give a value between 1 and 6 in a cell reference to this value. MAINTITLE(crd) The cell coordinate is a pointer to where the main title is to be found. SUBTITLE(crd) The same idea for the subtitle. YTITLE(crd) The pointer to the title up the Y axis on the left hand side. XTITLE(crd) Where the X axis title is. This is the one at the bottom. XLABEL(crd...crd), or XLABLE(crd,crd,crd,etc.) This points to the X labels which are the legend box items on the right. Unlike the other functions in this list the range can also be a list of individual items each one pointing to one of the X labels. Please make an effort to get the number of X lables correct as the program counts them to see how many lines or groups of items there are. If you get it wrong you will be be informed there are Y values missing because it is expecting to have to draw further lines. TIMELABEL(crd...crd) These are the tagged items on the X or bottom axis. They are not always time labels. (Plot types 1...6 only) YVALUE(n,crd...crd) This function points to the actual Y values to be plotted. The 'n' refers the number of the line to which you are referring. There will be one of these functions for each line. YMAXIMUM(crd) The crd must be a value or a reference to a value that specifies the maximum value to be shown on the Y axis. Your choice will be rounded to a suitable nearby value to improve the presentation. YMINIMUM(crd) Similarly for a minimum value. Note that if the value you want to round to is the same as value to be plotted you will have to slightly increase the specified minimum value to get the minimum you want. XVALUE(n,crd...crd) This function points to the actual X values to be plotted. The 'n' refers the number of the line to which you are referring. There will be one of these functions for each line. (plot types 7...18 only, use TIMELABELS for 1...6) XMAXIMUM(crd) The crd may be a value or a reference to a value that specifies the maximum value to be shown on the X axis. Your choice will be rounded to a suitable nearby value to improve the presentation. (plot types 7...18) XMINIMUM(crd) Similarly for a minimum value. Note that if the value you want to round to is the same as value to be plotted you may have to slightly increase the specified minimum value to get the minimum you want. (plot types 7...18) PLOT TYPES Business: 1. Bar chart (histogram) 2. Stacked bar chart 3. line chart 4. Area chart 5. Hi-lo chart 6. Pie chart Statistical, engineering and scientific: 7. X:Y line joining points 8. LogX:Y line joining points 9. X:LogY line joining points 10. LogX:LogY line joining points 11. X:Y points only 12. LogX:Y points only 13. X:LogY points only 10. LogX:LogY points only 15. X:Y points and best fit line 16. LogX:Y points and best fit line 17. X:LogY points and best fit line 18. LogX:LogY points and best fit line The best fit lines of plot types 15...18 are obtained by the least squares method. If any errors are encountered while using the graphics an error message will be given and a return will be made to the spreadsheet. This is an early version of the graphics program and so if you find you can not return to the main program don't worry you work to date will be found on the file SECURITY.MEM (Z80 versions only, 16 bits versions are not overlaid) There is an example of a business plot spreadsheet on the file PLOT1.MEM and one for scientific work on PLOT2.MEM. Load these spreadsheet and use the Xchange rules/formulae command to the how the functions are used in practice. The HELP utility has a reminder about each of these functions and plot types. MAKING A GRAPH IN PRACTICE Prepare a sheet with the data you want plotted on it. The actual data values can be up and down columns or across lines. It is not critical how the other items are laid out. Set aside an area to put in the plotting instructions. Each of these instructions is a pointer to where the particular items are to be found. Start by putting in the TYPEPLOT function and then the pointers to the various titles, although these are optional. These are MAINTITLE, SUBTITLE, YTITLE and XTITLE. Next point the TIMELABELs, these are the months or years that go across the bottom of the page. They don't in fact have to relate to time but usually do. Lastly point to the YVALUEs, which are the actual sets of data. There will be one YVALUE entry for each set. If you wish to specify the maximum or minimum values you want plotted then use the YMAXIMUM and YMINIMUM functions. Normally don't use these functions as the program will work out all the maximums and minimums for you automatically. Similar instructions apply for plot types 7...18 scientific graphs. In these cases XVALUES replace TIMELABELs. Z80 The GRAPHICS utility is loaded by THE CRACKER and when ONLY.. it has finished it re-loads THE CRACKER. To make sure you end up at the point you started the THE CRACKER must be on the original disk unit and user area. You don't have to do anything but if you have changed disk units or user areas don't be surprised if you have been changed back again. When you call TRACE you must therefore have the original disk with THE CRACKER on it in the original drive. MEMORY If you have the EXPANDED M: disk don't worry about this DISK just copy all the CRACKER files onto to the M: disk and do ONLY your work there. Don't forget to copy any files you want to save back onto a floppy disk or you will lose them when the machine is switched off. If your memory disk has a size of of 112k then it has not been expanded and you should follow the instructions in the next section. To speed things up it is recommended you put a copy of the overlay file CRACKER.OVR onto the M: disk in user 0. THE CRACKER will look for it there first. This also allows you to take out the original disk and put in a data disk. But not if you want to use TRACE. If necessary you must put the original disk back in temporarily as described above. If you get it wrong don't worry you will be told what's happened and you will always be able to recover the situation. Alternatively AMSTRAD you must put a copy of CRACKER.OVR onto each data disk. This ONLY is only if you don't use the M: disk. 6128 users have no M: disk so this last comment applies mainly to them. Use PIP to transfer these files, or FILECOPY if you have a single disk 6128. SPECIAL INTRUCTIONS FOR PRINTED GRAPHS AMSTRAD Unless you have the expanded memory disk don't be ONLY tempted to put CRACKER.COM and CRACKER.OVR into the memory disk for plotting. The only sucessful way to do printed graphs is to have a copy of CRACKER.COM on your data disk and CRACKER.OVR on the memory disk. Keep THE CRACKER on one of the floppy disk drives. The reason is simply that THE CRACKER writes temporary files while printing plots and and there is not enough space on the memory disk. SOME STATISTICS max length MAINTITLE 24 chars SUBTITLE 35 YTITLE 25 XTITLE 25 TIMELABEL 16 XLABEL 24 no of TIMELABELs 32 XLABELs 9 (no of lines) YVALUEs 9 XVALUEs 9 If you use lengths longer than specified above they will be truncated or ignored. PLEASE NOTE If you do any EDITING of the plotting instructions or make any changes that do not force a recalculation, you may end up with an error message or values that does not seem to be true. An example may be YMAXIMUM(20000) and a case where it would not occur would be YMAXIMUM(B7) The surest way to handle plotting funtions that do not contain cell references is to overwrite them rather than edit them. The instructions for plotting are transferred when a recalculation is done so the latest instructions may not have been passed. If you get such an error message just use the ! FORCE RECALCULATION COMMAND and try the plot again. ********************************************************** * The rest of these notes refer to AMSTRAD machines only * ********************************************************** USING THE CRACKER ON YOUR AMSTRAD --------------------------------- It is important to realise that just because the price of computers has been reduced it does not mean they are easier to use. You have enormous power at your fingertips but you are going to have to work your way into things. Firstly CP/M which is the program that has overall control of your machine, secondly THE CRACKER. What seems unfamiliar complicated and frightening now will seem trivial in a few days as you get used to things. If you can follow these few instructions to get you running THE CRACKER you will be over the first hurdle. Once THE CRACKER is going it will protect from almost everything that you can do wrong. Hold your nose, don't worry what it all means at the moment, and jump in! 8256 Amstrad have renamed a couple of keys on the PCW8256. ONLY... The control CTRL key is now called ALT and the escape ESC key is now called EXIT. Note this when you read any of the manuals. Some of the keys you will require are apparently not available. These are obtained using the extra key together with a normal key. The particular combinations are to be found in the section I.2 page 105 of the CP/M operating system section. The best way to start to use THE CRACKER is with the CAPS LOCK on. This is got by pushing the ALT and ENTER keys simultaneously. Do it a second time stop the CAPS LOCK. GETTING GOING. While the machine is OFF, put in the distribution CP/M PLUS disk with 2 on the top left hand corner. Switch on the machine and you will be in CP/M. Note do not start up with the LOCO SCRIPT disk. Take two new disks, one for a copy of your supplied disk and the other for a blank work area (data) disk. Start by formatting (preparing for use) a data disk. Type DISCKIT followed by RETURN. Follow the instructions for 'format'. When this is done press the key to 'copy'. Follow the instructions again this time put in THE CRACKER master disk when you are asked for the disk to copy from. When finished put THE CRACKER master disk in a safe place and don't use it. It is for emergencies only. The best way to run THE CRACKER is to use PIP (copy) to transfer the file called CRACKER.OVR and CRACKER.HLP to the M: disk, this is the memory disk which is very fast and gives you more space to work with on your floppy disks. To do this put in your CP/M PLUS disk (marked 2) and type PIP followed by RETURN, you will see A>PIP CP/M 3 PIP VERSION 3.0 * Now take out your CP/M PLUS disk and put in THE CRACKER disk. Type M:=A:*.OVR followed by a return. You will see *M:=A:*.OVR COPYING - CRACKER.OVR * If you want built in help messages you will also need to transfer the HELP file. However don't do this if you want use the graphics as you will not have enough M: disk space. It doesn't matter if you leave it out. Don't use the graphics until you are familiar with THE CRACKER and CP/M PLUS. Now type M:=A:*.HLP, like this *M:=A:*.HLP COPYING - CRACKER.HLP * Finish off by pressing the STOP key. You now have a copy of the overlay and help files on the memory disk which means you will have no delays when they are used. Put in your CRACKER disk and type CRACKER A>CRACKER When this has got going on the screen you can take out THE CRACKER disk and put in your blank (work area) disk. This means you will have plenty of space to write your work out to. SPECIAL INTRUCTIONS FOR PRINTED GRAPHS Unless you have the expanded memory disk don't be tempted to put CRACKER.COM and CRACKER.OVR into the memory disk for plotting. The only sucessful way to do printed graphs is to have a copy of CRACKER.COM on your data disk and CRACKER.OVR on the memory disk. Keep THE CRACKER on one of the floppy disk drives. The reason is simply that THE CRACKER writes temporary files while printing plots and and there is not enough space on the memory disk. You are now set up to follow the tutorial in the manual. Please do this as it is designed to get you familiar with THE CRACKER as quickly as possible. The best way approach is to browse right the from cover to cover through the manual. Don't try and learn anything just get a feel for things. When you later have a problem the chances are you will remember you saw something about it somewhere in the manual. It is surprising how many features are missed by people because they never spotted it in the manual. When are more familiar have a more detailed read of it. 6128 In order to use a data disk with the 6128 machine you ONLY.. will have to first format a disk with the DISCKIT3 utility and the use FILECOPY take a copy of CRACKER.OVR from THE CRACKER master disk and put it on your data disk. If you want online help as well you will also have to copy CRACKER.HLP onto your data disk. This is not essential if you want more workspace. To get going put the disk with CRACKER.COM on it into the drive and type CRACKER A>CRACKER You can now take out the disk and put in your data disk with CRACKER.OVR on it. If you want to use graphics you will have to have CRACKER.COM and CRACKER.OVR on your data disk. Please don't use the write protect facility on the disks. If you try to write to a write protected disk it won't be possible and you may get an odd error message such as 'disk full' or 'file not there'. SPECIAL PRINTER EFFECTS You can have condensed or expanded print when printing out your work. You can either give the commands to the printer directly using the out command or your can build the commands into text entries. Using the OUT COMMAND Condensed print, type: ALT-O then RETURN (that is you hold down the ALT key and type an O, must be capital) Normal pica print, type: ALT-R then RETURN Enlarged text, type: ALT-N then RETURN Cancel enlarge, type: ALT-T then RETURN These four ALT keystokes may also be put in text entries. You can't EDIT them in, but you can enter them as you would a normal text entry. They will be be displayed as if they are blank spaces but the space won't appear on the printer. There are other printer commands you can give and these are on pages 131 and 132 of the 8256 manual. Where they say ESC you just type the EXIT key. For example, you can get Elite text using the OUT COMMAND by pressing the EXIT key followed by a capital M and finishing off the command with a RETURN. You can't backspace to correct using the OUT COMMAND. If you make a mistake press RETURN and do the operation again.