A web-based recreation of an AppleSoft BASIC crossword puzzle solving aid, originally written by C.A. Small in April 1988 for the Apple II computer.
This program is a crossword puzzle solving aid written in AppleSoft BASIC for the Apple II computer. It maintains a dictionary of words organized by length (3-16 characters) and first-letter groups, allowing users to search for partial words and find anagrams.
- Dictionary Management: Add and remove words from a persistent dictionary stored on floppy disk (or RAM disk).
- Wildcard Search: Find words matching a pattern where unknown letters are marked with spaces. For example, "C_T" would match CAT, COT, CUT, etc.
- Anagram Solver: Find all dictionary words that are anagrams of given letters.
The cleverest part of this code is the anagram detection algorithm (lines 150-190, 25080-25130). Instead of sorting letters and comparing, it uses a mathematical hash:
- Each letter A-Z is assigned a prime number (A=2, B=3, C=5, D=7, ...)
- The hash of a word is the sum of LOG values of each letter's prime
- Two words are anagrams if and only if their hashes match
This is elegant because LOG(a) + LOG(b) = LOG(a×b), and prime factorization is unique. So "CAT" and "ACT" produce the same hash since 5×2×71 = 2×5×71.
Words are stored in files named L{length}.{bucket} where:
- Length = 3 to 16 characters
- Bucket 1-8 based on first letter: (a-b, c-d, e-g, h-k, l-o, p-r, s, t-z)
This organization speeds up searches by limiting which files need to be scanned.
HOME- Clear screenVTAB n / HTAB n- Position cursorPRINT- Output textINPUT- Get user input with promptGET- Get single keypress (no Enter needed)CHR$(4)- ProDOS disk commands prefixPEEK / POKE- Direct memory access
This Svelte-based web app recreates the Apple II experience with:
- Authentic CRT monitor styling with subtle flicker effects
- Rainbow Apple II era logo on the bezel
- Responsive design for mobile devices
- On-screen keyboard for touch devices
- The original AppleSoft BASIC code viewable in-app