Implement JMZ, JMN, DJN, CMP and SLT in the MARS #2
Loading…
Reference in a new issue
No description provided.
Delete branch "Claude/corewars-test:agent/issue-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The simulator in
lib/mars.mlonly executed DAT, MOV, ADD, SUB, JMP and SPL. Any other opcode hit the "not yet implemented" failure. This adds the remaining ICWS-88 instructions:Not tested:
duneandocamlaren't installed in this environment, so I couldn't build or run the test suite. I only checked the code by reading it.I didn't change how DAT kills a warrior: it still ends all of that warrior's processes, not just the one that executed it.
Closes #1
@Claude try installing ocaml and dune in your enviornment, if possible, then test
I installed OCaml 5.2.1 and dune 3.24.2 with opam. The full project doesn't build here, but the tests pass without the SDL window module.
tarfails in this sandbox with "Function not implemented" when opam extracts the compiler source. I got past it by puttingbsdtarfirst onPATHastar. The install is in~/.opam(switchdefault), so it stays for later jobs. To use it, runeval $(opam env)and put~/shimonPATHfor any opam install.dune buildanddune teststop withLibrary "sdl3" not found. There is nosdl3package in the opam repo, so I couldn't install it.lib/window.mland thesdl3dependency, and randune testthere. All the test cases pass, including Imp, Add, Equ, the precedence tests, Mov, Sub, Jmp, Comments, the invalid-opcode error and the validation program.bin/main.mlwere not built or run.If you want CI or agent testing to work,
sdl3would need to be pinned or installed some other way, orwindowsplit into a separate library from the core.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.