YaK:: spc476/ANS-Forth Debug Session (for 6809) [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   
[mega_changes]
[photos]

spc476/ANS-Forth Debug Session (for 6809)

https://github.com/spc476/ANS-Forth

Thu Nov 6 05:56:42 PST 2025

forth.asm is compiled with a09 with the origin at the default of 0x0000.

There's a little bit of code executed first, that was compiled with gcc, that set up the vectors and required variables starting at 0x0000 in RAM.

The getchar does reads from a magic port at 0xFF01.

Notice cycle #29951 (near the end of this trace) smashes the "bye" vectors at address 0x0000, using it as buffer for the input character "4" (I had typed "4 .\n").

cy w 0000 34 #29951

That shows a "cy"cle "w"riting 0x34 at 0x0000.

The next char (space, 0x20) would have gone at 0001, but I truncated the trace once it demonstrated the bug.

TRACE: spc476-ANS-Forth-with-a09-and-org-0-getchar-ff01.txt

LISTING: forth.bin.list

Other "cy" markers: "r" read. "w" write. "@" opcode. "&" continuation of opcode. "@@" First execution at this address of opcode. "#" cycle counter.

Non-valid memory cycles omitted from the trace.

This used an actual (not an emulator) Hitachi 6309 in 6809 compatibility mode, on this single-board computer: https://github.com/strickyak/tfr9/tree/main/tfr905h

(unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
(last modified 2025-11-06)       [Login]
(No back references.)