65C02 Emulator for esp32

Topics pertaining to the emulation or simulation of the 65xx microprocessors and their peripheral chips.
BruceRMcF
Posts: 388
Joined: 21 Aug 2019

Re: 65C02 Emulator for esp32

Post 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.
Post Reply