Missed a few spots.
Chris Pressey
4 years ago
319 | 319 | |
320 | 320 | Right! So almost as soon as I finished writing the code for SITU-MON, I started entering it into the emulated Commodore 64, using the simulated front-panel switches. At first this was in dribs and drabs, a few bytes here, a few bytes there. |
321 | 321 | |
322 |  | |
322 |  | |
323 | 323 | |
324 | 324 | I won't bore you with thousands of screenshots; it all looked basically as described in _A better front-panel simulator_, above. (And for what it would look like in the physical world, watch the video on the _Loading the code_ post.) It’s not difficult, exactly, it’s just tedious and fatiguing. |
325 | 325 | |
331 | 331 | |
332 | 332 | So I lowered the top of BASIC memory, and started all over again. |
333 | 333 | |
334 |  | |
334 |  | |
335 | 335 | |
336 | 336 | The second time doing this, at least, I was able to enter the bits much more quickly; I had had practice, and had a block of time to myself that I could dedicate to it. And when I reset the address to review the code, it was, in fact, the code I entered. |
337 | 337 | |
351 | 351 | |
352 | 352 | The first routine the code calls is `WRITE_PROMPT`. In the front-panel simulator, I advanced to the `WRITE_PROMPT` routine and executed it. And I got this: |
353 | 353 | |
354 |  | |
354 |  | |
355 | 355 | |
356 | 356 | Yeah, no, that definitely wasn’t in the spec. |
357 | 357 | |
363 | 363 | |
364 | 364 | I converted the address of the `OUTPUTLN_TTY` routine to decimal (33153), dropped to BASIC, and `PEEK`’ed that address to see what byte was there. The first instruction of `OUTPUTLN_TTY` is `LDA #$00`, so I was expecting to see 169 ($A9), but... |
365 | 365 | |
366 |  | |
366 |  | |
367 | 367 | |
368 | 368 | Noticing that the byte just _before_ `OUTPUTLN_TTY` was $81, it occurred to me: maybe I made a mistake assigning addresses to labels. |
369 | 369 |