Page 2 of 2

Re: 65C02 Emulator for esp32

Posted: Tue Apr 22, 2025 5:12 pm
by BruceRMcF
SamCoVT wrote:
... There are a few issues due to the fact that Arduino uses a C++ compiler (rather than straight C) so there are conflicts with some keywords like "and" (which I just learned is an alternative to && in the modern C++ standard) and also some Arduino keywords/functions like "bit". It looks like you already found them all and put and underscore at the end of their names. ...
Yes, Camel Forth for the Z80, which I am presently using as the baseline for my (mostly) Camel Forth for the 65C02, has similar issues for "SWAP", which is therefore called "SWOP", but doesn't have that issue with "AND" ... while the 65C02 doesn't have a SWAP operation but does have an AND operation, so I reverted SWOP as the label for the SWAP word to SWAP, and changed AND as the label for the AND word to ANDD.

I guess adding the underscore is cleaner, since whenever you see label with the trailing _ in the assembled compiled words, it's obvious what is going on.