Skip to content

Improve MC6800 support - #395

Open
zu2 wants to merge 167 commits into
davidgiven:defaultfrom
zu2:pr/e6800
Open

zu2 wants to merge 167 commits into
davidgiven:defaultfrom
zu2:pr/e6800

Conversation

@zu2

@zu2 zu2 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

This PR follows up on #355.

I fixed several bugs in the MC6800 backend from #354.
Set100 and SemaTest now pass.

I added the e6800 platform to test MC6800 programs on emu6800.
I ran 54 ACK tests on emu6800. All 54 passed.

zu2 added 30 commits December 5, 2025 10:24
- In `loc loe dvi`, pass the global divisor in `ARTH` and the
  constant dividend in AccAB.
- In `loe dvi`, load the global divisor by its absolute address.
- The `intdiv` test now passes on emu6800.
…tream

# Conflicts:
#	lang/cem/libcc.ansi/core/printf/doprnt.c
#	tests/plat/core/cii,e,.e
- EM sets are made of words. See doc/em/types.nr (Bit sets).
- To pick the right byte in a word, flip bit 0 of the byte offset before adding the set's base address.
- Inn used to flip bit 0 of the final address, which gave the wrong result at odd addresses.
- Add the missing Set routine so the Pascal set test can link.
- Replace LOC n followed by SET 2 with LOC (1 << n) for n from 0 to 15.
- Cmi2 reported 1 < 2 as false and 2 < 1 as true.
- This broke andbool, which uses the result of < as a value.
- SIG wrote the old trap handler address into the caller's stack
  frame. This made Pascal programs crash at startup.
- Return the old handler address in AccAB.
- RCK used to skip the range check.
- If a value is out of range, RCK raises a trap unless it is masked.
  The handler can use RTT to continue after the check.
- The code did not write the result to the stack.
- ZER 32 should push 32 zero bytes.
- The old code read the count from address 32 by mistake.
- For y * 0xFFFF, the old code read from address 0xFFFF by mistake.
- The old code used shifts (not rotate) by mistake.
- By mistake, CMS only worked with 2 or 4 bytes when the size was fixed.
- NestProc test failed to link.
- SDF did not add the offset to the pointer.
- add missing tsx
- e6800 has no gettimeofday().
- For *p1 = q, sil 10 wrote q to p1 by mistake.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant