Am 06.12.25 um 22:31 schrieb Hill, Krista:
I see that I have some digging to do. I'm using the as6801 assembler and aslink linker from the ASxxxx tools and so far, so good.

So far I  see that uCsim will need some work to support the 6801 cpu and devices. It's one step at a time.

Having had a quick look at the architecture, I think SDCC is a good choice for a compiler targeting it. The instruction set, and adressing modes look ok, the 16-bit stack pointer and index register will be quite helpful. It is kind of a typical architecture for an SDCC target - not a great target for C, but not too bad either.

The main difficulty will likely be the lack of an efficient stackpointer-relative addressing mode, so stack accesses would have to use the index register - and there is only one index register, which also needs to be used for pointer accesses. Thus, you'll probably want local variables to not be on the stack by default (like for mos6502, pdk, mcs51, hc08).

IMO, the MC6800 and MC6801 are so similar, that it would make sense to create ports for both, which would then share register allocation and most of code generation (like e.g. the z80 port and the z180 port share code generation). This would also mean that we need assemblers and simulators for both. In principle, this could later even be extended to M68HC11 and M68HC12 support, but is probably not be worth the effort, since GCC already supports that one.

Philipp



_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to