home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol134 / checks.doc < prev    next >
Encoding:
Text File  |  1984-04-29  |  19.1 KB  |  391 lines

  1.  
  2.  
  3.  
  4.  The CHECKS program was written for my personal use and is 
  5.  placed  in  the  public domain for anyone who wants  to  use  it.  
  6.  (No business use please) Since it is a 'freeby',  don't  complain 
  7.  about  the  organization  of  the  program,  but  if  you  should 
  8.  encounter any bugs,  please notify me by letter and I will try to 
  9.  fix  them.   Several restrictions are inherent in the program and 
  10.  you  must be able to live with them.   If you can't,  then  don't 
  11.  bother with the program.
  12.  
  13.  RESTRICTION #1
  14.  
  15.  The  maximum  value  which the math  package  can  handle 
  16.  without  overflowing  is $83886.07.   Amounts which  exceed  this 
  17.  value   will  be displayed as the amount in excess of  $83886.08. 
  18.  Overflow will occur if you have more than this amount of money in 
  19.  your account at any point in the year,  or if the total value  of 
  20.  the  checks  exceed this amount when listing out the  checks.  No 
  21.  error  message is printed out if overflow should occur.    If you 
  22.  exceed  this  amount,  you  can afford to  buy  something  better 
  23.  anyway.
  24.  
  25.  RESTRICTION # 2
  26.  
  27.  The  program will only allow 255 different check names in 
  28.  any  year's  file.   The  checks program was  translated  from  a 
  29.  program I had written for my 6500 system,  and made extensive use 
  30.  of  the indexed instruction.    I had a lot of check data that  I 
  31.  wanted  to continue using with the Z80 system,  so I  merely  re-
  32.  coded   the   assembly  language  program  and  used   the   same 
  33.  organization of the data in the files.
  34.  
  35.  RESTRICTION # 3
  36.  
  37.  The  program  requires the user to enter check  names  as 
  38.  three  character  mnemonics,  although it keeps in the  file  the 
  39.  entire check name for later listing.  For example, when I enter a 
  40.  check to Fidelity National Bank, I would use the mnemonic FNB for 
  41.  the check name.   You quickly learn how to choose a good mnemonic 
  42.  for  the  check name,  and can always get a listing of  mnemonics 
  43.  which you have used previously in case you should forget one.
  44.  
  45.  If  you  feel that you can live with these  restrictions, 
  46.  then give the program a try.   The features and operating ease of 
  47.  this program will quickly make you ignore these limitations.
  48.  
  49.  A little more about the program before we get down to the 
  50.  nitty-gritty.   Checks  will run on either CP/M 1.4 or  2.2.  The 
  51.  program  keeps track of two data files with the name  types  .CHK 
  52.  and .NAM.   The filename.CHK file has all the data for the actual 
  53.  checks.   Each check entry is packed into eight bytes of code and 
  54.  the  distribution  copy  allocates  8 kbytes of  memory  for  the 
  55.  checks.   This  gives you the ability to handle 1024 checks in  a 
  56.  given year.  The .NAM file contains the name mnemonics and a list 
  57.  of  the  corresponding full check names.   Full check  names  are 
  58.  limited  to  a 32 character string.
  59.  
  60.  
  61.  The  user may specify the disk on which the .CHK and .NAM 
  62.  files are located.   If no name is given for the .NAM  file,  the 
  63.  program  will  assign the same filename for the .NAM file as  was 
  64.  specified  for the .CHK file.   I use the filename 1981  for  the 
  65.  check  file  for  year  1981 which  automatically  assigns  files 
  66.  1981.CHK and 1981.NAM for use.   Other people who have used  this 
  67.  program  find that they normally write checks to the same  people 
  68.  year  after  year and do not overflow the 255  name  restriction.  
  69.  For  this reason,  you can save a lot of typing by using the same 
  70.  name  file  year after year.   To do this,  one might  type  1981 
  71.  (space) NAMES which would assign files 1981.CHK and NAMES.NAM  as 
  72.  the  files to be used.   Note that the user does not specify  the 
  73.  filename  extension because the program does it for you.   If you 
  74.  should try it, the program will issue an error message.
  75.  
  76.  Because  my  wife  and  I both share  the  same  checking 
  77.  account,  but  she  has her own checks which might  duplicate  my 
  78.  check numbers,  the program allows you to set a 'W' flag to  keep 
  79.  to two entries separate.  The program  also has other flags which 
  80.  the user can set upon entry,  and yes,  as you might expect,  you 
  81.  can get a listing of checks depending on the flag set.  The flags 
  82.  which can be set on the distribution copy,  and the meaning which 
  83.  I place on them are as follows:
  84.  
  85.  W  Wife's checks
  86.  R  Returned check
  87.  I  Income tax deductible
  88.  
  89.  All  three  of the above flags may co-exist in  the  same 
  90.  check entry plus one of the following:
  91.  
  92.  C  Car expenses
  93.  D  Doctor bills
  94.  E  Entertainment expenses
  95.  F  Food
  96.  G  Gasoline
  97.  H  Housing expenses
  98.  M  Medicine
  99.  P  Parts for computer
  100.  S  School expenses
  101.  U  Utility bills
  102.   
  103.  Five  spare flags are also available,  but have not  been 
  104.  defined  during the assembly.   The method of setting or changing 
  105.  these flags will be discussed later. A check might have the flags 
  106.  IWRS set,  which means an income tax deductible check, written by 
  107.  my wife which has returned from the bank for some school  related 
  108.  expense.
  109.  
  110.  
  111.  The  program  enables you to list all checks  written  to 
  112.  some mnemonic name,  to list a monthly balance sheet,  to compute 
  113.  the check balance,  to compute the bank balance at the end of the 
  114.  month  after  returned checks are entered,  to  list  outstanding 
  115.  checks,  to  list checks,  deposits,  and withdrawals  from  your 
  116.  account  for  any  month,  or for the year and to  fix  erroneous 
  117.  entries for a check,  deposit,  withdrawal,  or change a mnemonic 
  118.  name or a full check name.
  119.  
  120.  Thats  enough about what can be done,  now lets get  down 
  121.  how to do it.    Let's assume it is the start of the year, and we 
  122.  are opening up a new years record for say 1981.
  123.  
  124.  A>CHECKS 1981 [NAMES]  [optional entry]
  125.  
  126.  This  will load CHECKS from the A drive and try to read a  
  127.  file  for 1981 from the default drive.   Naturally  nothing  will 
  128.  exist,  and  the program will tell you that it could not load the 
  129.  check  file,  and will go to the command mode.   The program  has  
  130.  assigned  the  names for the .NAM and .CHK files should  data  be 
  131.  entered  and  saved.  All  commands begin  with  a  single  alpha 
  132.  character  and  will  immediately execute unless an  argument  is 
  133.  required.  In this case,  the program waits for the argument  and 
  134.  the  carriage return before execution.    If you type a ?  ,  the 
  135.  program will display all the command characters,  their  meaning, 
  136.  and print the number of names in the current name file.
  137.  
  138.  The  first thing to enter is the balance in your  account 
  139.  at the beginning of the year.   Enter this value as a deposit  by 
  140.  hitting the D key.  The program will display the prompts for your 
  141.  entry  and  show  you  that this is  deposit  #1.   Deposits  and 
  142.  Withdrawals  are  automatically numbered with  255  deposits  and 
  143.  withdrawals  permitted in a years record.   If you hit the  space 
  144.  bar,  the  cursor is automatically tabbed to the next entry.  The 
  145.  month  is  1-12,  the date 1-31,  the amount assumed  in  dollars 
  146.  unless a decimal point is entered. Do not specify $ in the amount 
  147.  entry.   Legal  check  ,  deposit ,  or withdrawal values are  as 
  148.  follows:
  149.  
  150.      10000
  151.      234.12
  152.      1
  153.      .23
  154.  
  155.      123.1   is not legal
  156.  
  157.  For the mnemonic, you might consider STB
  158.  
  159.  
  160.  When  you hit the carriage return,  the program  analyzes 
  161.  the entry, and looks up STB in the name file to see if it exists. 
  162.  Since it does not,  it will ask you if this is a new name.   Type 
  163.  'Y'  to  indicate that it is and fill in the full  name  STARTING 
  164.  BALANCE when it prompts you for the full name.   When you now hit 
  165.  the carriage return,  your first deposit will be entered, and the 
  166.  mnemonic  STB and the full name STARTING BALANCE will be  entered 
  167.  into the name file.
  168.  
  169.  Now  hit B.    The program computes the balance by adding 
  170.  all  deposits from the beginning of the file and subtracting  the 
  171.  value of all checks and withdrawals from the account. Yes you now 
  172.  have a balance of the value which you entered.  Now hit  V.  This 
  173.  command  is  similar to the balance command except only  returned 
  174.  checks  are  subtracted.   The result is the bank  balance  which 
  175.  should agree with your bank statement after entering all returned 
  176.  checks  at the end of the month.   A check is returned by  typing 
  177.  the command R and entering in the check number.  Since no  checks 
  178.  have been written,  the bank thinks you have the same amount.
  179.  
  180.  Suppose  your first check is for cash.   Hit C to enter a 
  181.  check.   The check prompt now appears.   Check numbers 1-9999 are 
  182.  valid  check numbers.   Fill in the data with the  mnemonic  CAS.  
  183.  Use the full name CASH when it comes time to do this.
  184.  
  185.  Now try the B and V commands again.  Yes, the new balance 
  186.  is  the difference between the check and the starting balance but 
  187.  the  V command still shows the starting balance.   As far as  the 
  188.  program  is concerned,  the check is still outstanding.  You  can 
  189.  verify  this by typing the command O,  which shows the  check  to 
  190.  still be outstanding.  
  191.  
  192.  Type  the command M and specify CAS when it asks for  the 
  193.  check  mnemonic.   The M command lists all checks which Match the 
  194.  mnemonic name written during the year.
  195.  
  196.  Now try to return the check by typing the command R. When 
  197.  it  asks  for  the check number,  enter the one  which  you  have 
  198.  entered.   Now re-try the B,  V, and O commands.  The check is no 
  199.  longer  outstanding  and the bank balance and check book  balance 
  200.  now agree.  You can still find the check using the M command.  
  201.  
  202.  When you are typing in any command and make a mistake,  a 
  203.  control  X will abort the command and return you to  the  command 
  204.  mode.  You  can use backspace (ctrl H) to correct mistakes on any 
  205.  entry.
  206.  
  207.  Since  returning  the check set the R flag,  you can  now 
  208.  find  the check using the interrogate command I.  If you  specify 
  209.  the R flag, you can now see that a listing of all returned checks 
  210.  is possible.   The I command will list all checks which have  the 
  211.  specified  flag set.   (a handy way to find income tax deductible 
  212.  checks)
  213.  
  214. Suppose
  215.  I  do,  then  you  can use the W flag in  the  flag  column  when 
  216.  entering  the check.   Another way is to precede the check number 
  217.  with the letter W.  Thus W123 is wife's check 123 while 123 is my 
  218.  check  123.   You can print all your wife's checks by  using  the 
  219.  interrogate  command  (I) and telling the program to  use  the  W 
  220.  flag.   All other flags may only be specified in the flag column.  
  221.  So  to flag all your utility bills for example set the U flag  in 
  222.  the flag column when entering the check.
  223.  
  224.  Withdrawals are amounts automatically deducted from  your 
  225.  checking  account  each  month for say a car  payment.    Do  not 
  226.  confuse withdrawals with the W flag which is the wife  flag.   To 
  227.  enter a withdrawal, hit the command W.  Unlike a check entry, the 
  228.  withdrawal  will automatically be deducted from the bank  balance 
  229.  at the same time it is  deducted from the check book balance. 
  230.  
  231.  The  A command begins auto-numbering of check entries and 
  232.  may  be auto-numbered either with and without the wife  flag.  To 
  233.  auto-number wife's checks, type W(check number) when prompted. Do 
  234.  not put a space between the W and the check number.   The control 
  235.  X command cancels the auto-number mode.
  236.  
  237.  The  L command is used to list out  checks,  withdrawals, 
  238.  deposits,  or  the  names which you have used.   In the  case  of 
  239.  checks,  withdrawals,  or  deposits,  the program will ask  which 
  240.  month to list.   You can enter a month 1-12 for a specific month, 
  241.  or enter a 0 to list the entire year's  activity.  
  242.  
  243.  The  T  command  lists  a monthly balance  sheet  on  the  
  244.  console.   The month also is entered as 1-12 or a 0 for a  yearly 
  245.  record
  246.  
  247.  The  P command toggles the output to the printer for  the 
  248.  next command.  Thus command P followed by T will list the balance 
  249.  sheet  on  the printer.   A command P followed by command M  will 
  250.  list on the printer all checks to a specific mnemonic name.   The 
  251.  print mode is toggled off at the completion of each command.
  252.  
  253.  The M command is one of the most valuable commands. In my 
  254.  case,  all  my  electric power bills are to AEP  for  Appalachian 
  255.  Electric Power.   Thus at the end of the year the command M  with 
  256.  the  mnemonic AEP will show the year's total for electric  bills.  
  257.  In  a similar fashion,  C&P shows telephone bills,  TEX my Texaco 
  258.  gasoline bills, etc. The I command with the G flag will print out 
  259.  all gasoline expenses to all companies during the year.
  260.  
  261.  
  262.  More  about the L command.   The L command will also  let 
  263.  you  list  the mnemonic names and the full names which  you  have 
  264.  used.   This is handy in case you forget one.  Type command L and 
  265.  specify N for names.  When it asks for the mnemonic name, you can 
  266.  hit  an  immediate carriage return to show all the names  in  the 
  267.  file.   If  you should just type A followed by a carriage return, 
  268.  it will show all mnemonic names starting with the letter A.  In a 
  269.  similar  fashion typing CA will show all mnemonics starting  with 
  270.  the two letters CA.   It is pretty easy to at least remember  the 
  271.  most  logical  first letter of the mnemonic which you might  have 
  272.  used for the name.
  273.  
  274.  
  275.  Now  it  is time to save the file away after  an  editing 
  276.  session.   You can type Q to go to CP/M or S to save the  current 
  277.  file  but stay in the checking routine.  The Q command will first 
  278.  ask you if you want to save the checks away before  exiting.   If 
  279.  you  have  made any changes,  you had better do it or  everything 
  280.  which you have added will be lost.   The old file on the disk was 
  281.  copied into memory at the beginning of the editing session and is 
  282.  still there on the disk.  If you type Y for yes, it will show you 
  283.  the  names under which it will be saved.   If you want to  change 
  284.  the  names  type N after it asks you if the file names  are  OK?.  
  285.  You can use anything like the following
  286.  
  287.  
  288.  B:1981  checks and names file on B drive
  289.  B:1981 A:NAMES  checks under name 1981 on B drive
  290.      names under NAMES on the A drive
  291.  
  292.  One word of warning.   Do not get the checks for one year 
  293.  mixed up with the name file for another year.  The program has no 
  294.  way  of telling that you have mixed things up and the names  will 
  295.  be  all  mixed  up on your check  file.   For  this  reason,  use 
  296.  1981.CHK  and  1981.NAM so no possibility exists for this  error.  
  297.  Nothing  disastrous  happens if you get them mixed up  until  you 
  298.  make a new entry in the file.   Check names are numbered as  they 
  299.  are  entered  and  the  check  data  file  only  has  the  number 
  300.  corresponding to the check name used.  
  301.  
  302.  The  S command saves the current check and name files  on 
  303.  the disk and stays in the checking routine.   This permits you to 
  304.  use  the  G  command  which gets a  different  years  record  for 
  305.  observation or modification.   You can use the G command to  look 
  306.  for  various  years  activities  without  modifying  any  of  the 
  307.  contents on the disk.
  308.  
  309.  To  keep the bank people honest,  at the end of the month 
  310.  when my checks return,  I return all the checks enclosed with  my 
  311.  statement and hit the V command.   The balance shown should agree 
  312.  with  the  bank  as long as no deposits have been made  into  the 
  313.  account which do not show in the bank statement.
  314.  
  315.  
  316.  Naturally  you  will make some  typing  mistake  sometime 
  317.  during  the  use  of the program.   The F command allows  you  to 
  318.  retrieve a check, deposit, or withdrawal from the records and fix 
  319.  it.  When  you  enter the number of the item  to  be  fixed,  the 
  320.  display will show the entry as it has been typed.   The entry may 
  321.  be  fixed up as shown on the console display using the control  H 
  322.  for backspace,  the control A will add a space at the cursor, and 
  323.  the control D will delete the character at the cursor.  A control 
  324.  B  will  set  the  cursor to the beginning  of  the  entry  being 
  325.  displayed for added convenience.  You may hit the carriage return 
  326.  with  the  cursor at any position in the display and  the  entire 
  327.  contents  of  the  display will be entered as  shown.  Using  the 
  328.  prompts,  you  may change a name mnemonic,  or the full name  for 
  329.  typing error.   Suppose you can't remember a mnemonic because you 
  330.  used a poor one the first time you entered it.   By changing  the 
  331.  mnemonic, all entries in the file will now show the new mnemonic.
  332.  
  333.  Yes, I can guarantee that sometime or other you will type 
  334.  the  same check number in twice for two different  entries.  When 
  335.  you try to find the check to return it, only the first entry will 
  336.  be  displayed  and the second check with the duplicate entry  can 
  337.  not be returned.   And as Mr.  Murphy would have it,  the  second 
  338.  entry  had the wrong check number.    The only way to fix this is 
  339.  to  fix the number on the first check to some fake  number  which 
  340.  has  not been used,  then fix the wrong check and then re-fix the 
  341.  first check back to the correct number.  Sorry,  but that is  the 
  342.  way it works.  The only way to find this kind of error is to list 
  343.  the checks and hunt for that duplicate check number.
  344.   
  345.   Modifications:
  346.  
  347.   The  size  of  the check and name files may be  enlarged  by 
  348.  changing  the  address   at the equate NFILE.    The  check  file 
  349.  starts  loading  at  the address set by the equate at  CFILE  and 
  350.  memory  space  is available up to the address  at  NFILE.   Names 
  351.  begin at NFILE and the rest of memory up to CCPBAS  is available.  
  352.  Each name entry requires 5 bytes of code,  three for the mnemonic 
  353.  and two bytes for a pointer to the full name.   Since the maximum 
  354.  name  entry is 32 bytes long,  the longest name file possible  is 
  355.  9435  bytes.   Be  sure you update CCPBAS to point to  the  first 
  356.  location  before  the  base  of your CCP to  insure  you  do  not 
  357.  overwrite the CCP.   CCPBAS has been arbitrarily defines as $8000 
  358.  in the distribution copy.
  359.  
  360.   Five  additional  flags may be defined by  replacing  the  % 
  361.  characters at the DEFB string at the label CAT:  with the desired 
  362.  flag character.  The flag characters N,W,I,R are reserved for use 
  363.  in the program and may not be doubly defined.  
  364.  
  365.  
  366.   Cursor  control  characters  which may vary  with  different 
  367.  video  displays  are  defined  at the  beginning  of  the  source 
  368.  listing.   The program may be warm started by jumping to 100H  in 
  369.  case  you should forget to save the data on the disk and returned 
  370.  to  CP/M.   You can do this by executing GO 100 if you are  using 
  371.  CCPZ  or by previously saving a zero length file using  the  CP/M 
  372.  save command with the name GO and typing GO when you are in CP/M.
  373.  
  374.   Checks is only a 9k program, and will run in systems with as 
  375.  little as 16k of memory. To be safe,  you should  re-assemble 
  376.  the  program after redefining CCPBAS to insure the name file does 
  377.  not  overflow  the CCP,  and redefine NFILE to 4500H  to  give  a 
  378.  little more space for the name file.  
  379.    
  380.  
  381.  Yes,  the program has its limitations but it works and it 
  382.  puts a lot of power at a few keystrokes once you learn how to use 
  383.  it.  I am willing to listen to all suggestions how to improve it. 
  384.  
  385.   Ralph Sherman
  386.   15 Hydaway drive
  387.   Forest, Va.
  388.   24551
  389.   (804)-525-3167
  390.  
  391.