Here is the corrected version of your article with grammar and spelling fixes (changes in bold):
The original Macintosh only had 128K bytes of RAM (that's one eighth of a megabyte), so dealing with memory management was usually the hardest part of writing both the system and applications. We allocated around 16K bytes for system use and another 22K bytes for the 512-by-342 black-and-white screen, so applications were left with only about 90K bytes. The bigger ones, like MacWrite or MacPaint, seemed to be bursting at the seams.
By the fall of 1983, MacWrite and MacPaint were largely feature-complete but still needed a lot of testing, especially under low-memory conditions. MacPaint needed to allocate three off-screen buffers, each the size of the entire screen, so it was always on the edge of running out of memory, especially when you brought up a desk accessory. However, the specific sequences that led to crashes were difficult to reproduce.
Steve Capps had been working on a "journaling" feature for the "Guided Tour" tutorial disk, where the Macintosh could demo itself by replaying events recorded in a prior session. He realized that the so-called "journaling hooks" used to feed pre-recorded events to the system could also form the basis of a testing tool he called "The Monkey."
The Monkey was a small desk accessory that used the journaling hooks to feed random events to the current application, making the Macintosh seem as if it were operated by an incredibly fast, somewhat angry monkey banging away at the mouse and keyboard, generating clicks and drags at random positions with wild abandon. It had great potential as a testing tool, so Capps refined it to generate more semantically meaningful events—including a certain percentage of menu commands, window drags, and so on.
The Monkey proved to be an excellent testing tool and a great amusement as well. Its manic activity was somewhat hypnotic, and it was interesting to see what kind of MacPaint pictures the Monkey could draw or whether it would ever produce something intelligible in MacWrite. At first, it could crash the system fairly easily, but soon we fixed the more obvious bugs. We thought it would be a good test for an application to see if it could run the Monkey all night, but usually, it didn’t run for more than 20 minutes—even if it didn’t crash—because the Monkey would invariably select the Quit command.
Bill Atkinson came up with the idea of defining a system flag called "MonkeyLives" (pronounced with a short "i" but often mispronounced with a long one) to indicate when the Monkey was running. The flag allowed MacPaint and other applications to detect the presence of the Monkey and disable the Quit command while it was running, as well as avoid other areas they didn’t want the Monkey to trigger. This allowed the Monkey to run all night—or even longer—driving the application through every possible scenario.
We kept our system flags in an area of very low memory reserved for system globals, starting at address 256 ($100 in hexadecimal), since the first 256 bytes were used as a scratch area. The very first slot in the system globals area, address 256, had just been freed up, so that’s where we placed the MonkeyLives boolean. The Monkey itself eventually faded into relative obscurity as the 512K Macintosh eased the memory pressure, but its legacy lived on in the curious name of the very first value defined in the system globals area.
Key corrections:
- Spelling: accesory → accessory, demoing → demo, bytes consistency
- Grammar: "replaying back" → "replaying", "a certain percentage as" → "a certain percentage of"
- Hyphenation: 512-by-342, black-and-white, feature-complete
- Punctuation: Commas, em dashes, and sentence flow
- Word choice: "on the edge", "semantically meaningful", "legacy", "scenario"
- Capitalization: Quit command, disk, boolean (contextual)
- Clarity and flow improvements without altering meaning.