--- title: "Checkbook Manager" id: 51867 type: "computer_media" slug: "checkbook-manager-2" url: "http://localhost/computer_media/checkbook-manager-2/" markdown_url: "http://localhost/computer_media/checkbook-manager-2.md" published_at: "2023-08-16T01:42:19+00:00" modified_at: "2026-04-03T07:59:14+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2019/02/20230809-041332.jpg" excerpt: "A full checkbook ledger program that tracks checks, deposits, balances, and fees, with date and alphabetical payee scanning across up to 250 transactions." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "Timex Computer Corporation" slug: "timex-computer-corporation" taxonomy: "post_tag" url: "http://localhost/tag/timex-computer-corporation/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Finance" slug: "finance" taxonomy: "genre" url: "http://localhost/type/finance/" media_type: "Cassette" download_url: "https://archive.org/download/timex-sinclair-software-archive/Checkbook Manager (1982)(Timex)(US)(TS1000)(Cassette).zip" mediadate: "1982" producer_company: - id: 11401 title: "Timex Computer Corporation" type: "company" url: "http://localhost/company/timex-computer-corporation/" related_products: - id: 14285 title: "Checkbook Manager" type: "product" url: "http://localhost/product/checkbook-manager-3/" media_type_tags: "Finance" --- Checkbook Manager is a personal finance tracking program that records checks and deposits in parallel arrays, maintaining a running account balance after each transaction. It allocates five arrays of 250 elements each — date (D), check number (C), payee/source name (N$), amount (A), and post-transaction balance (B) — along with a per-check charge/fee (CC) entered at startup. The transaction display routine at line 3500 uses inverse-video digit characters (CHR$ with offsets of 156) to render transaction numbers visually. Scanning functions allow the user to browse transactions either by date (line 4000) or alphabetically by payee name (line 5000), with the name-scan using a string-comparison loop to find the next alphabetical match. An overdraft warning prompts the user to void the most recent transaction if the balance falls below zero. *** ## Program Analysis ### Program Structure The program is organized into functional blocks separated by line number ranges: - Lines 1–108: Initialization — prompts for a per-transaction charge/check fee (`CC`), dimensions five arrays, and zeroes the balance (`BA`) and transaction counter (`LT`). - Lines 200–350: Main menu — displays balance, fee, and five options; polls `INKEY$` in a tight loop. - Lines 1000–2460: Transaction entry — shared routine for checks (type `T=1`) and deposits (`T=2`), with overdraft detection and correction. - Lines 3000–3650: Transaction display — shows up to eight recent (or selected) entries in a formatted ledger; subroutine entry at line 3500 (body starts at 3501). - Lines 4000–4130: Date-range scan — finds the first transaction on or after an entered date and pages forward. - Lines 5000–5250: Name scan — iterates all transactions alphabetically by payee, displaying matches eight at a time. ### Array Layout | Array | Size | Purpose | | --- | --- | --- | | `D(250)` | 250 | Date stored as MMDD integer (e.g., 1225 = Dec 25) | | `C(250)` | 250 | Check number; 0 indicates a deposit | | `N$(250,17)` | 250 × 17 chars | Payee name or deposit source | | `A(250)` | 250 | Transaction amount | | `B(250)` | 250 | Running balance after each transaction | ### Key BASIC Idioms The main menu (lines 300–350) uses consecutive `IF INKEY$="n" THEN GOTO` tests with a fall-through `GOTO 300`, forming a polling loop without `PAUSE`. This is a standard busy-wait approach for single-keypress menus. Date parsing at lines 2130–2160 splits a four-digit MMDD integer by integer division: `H=INT(D(LT)/100)` gives the month and `L=D(LT)-H*100` gives the day. The same split is repeated in the display subroutine at lines 3550–3560. The display subroutine is entered via `GOSUB 3500`, but because a `RETURN` statement at 3650 terminates the routine and line 3500 does not exist, execution falls through to line 3501 automatically — a common technique to position a subroutine’s first executable statement one line past its nominal entry point. ### Inverse-Video Transaction Numbers Lines 3570–3585 render transaction sequence numbers using inverse-video digit characters. The variable `I$` is set to `STR$ Z`, and individual digit characters are extracted with `VAL I$(n)`, then offset by 156 and passed to `CHR$`. This produces the inverse-video versions of the digits 0–9, which reside at character codes 156–165, giving the transaction number a visually distinct appearance in the ledger. ### Name-Scan Algorithm The name-scan routine (lines 5000–5250) performs an alphabetical traversal of the payee name array without sorting. On each pass it scans all `LT` entries and finds matches equal to the current search key `Q$`, displaying each as a ledger row. Simultaneously it tracks the lexicographically smallest name greater than `Q$` in `R$`. After displaying eight matches (`P=8`) or exhausting the array, it advances `Q$` to `R$` and repeats. The sentinel value `R$=""""` (a literal quote character) is used as an initial “infinity” string, since the quote character has a high ASCII value relative to typical name strings. ### Balance and Fee Calculation At line 2380, when recording a check, the balance is reduced by both the check amount and the per-transaction fee: `BA=BA-A(LT)-CC`. Deposits (line 2390) add only the amount with no fee deduction. This models a checking account with a per-item service charge entered at program start. ### Bugs and Anomalies - The date-scan loop at lines 4020–4030 increments `J` and tests `D(J)