Add support for latest instructions #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Not all instructions are implemented yet.
Working on this now.
I opened #2 for this.
I didn't make any changes for this issue, because I couldn't find an unimplemented instruction.
The code targets ICWS-88 (
lib/redcode.ml). Every ICWS-88 opcode now has a handler inMars.step(lib/mars.ml): DAT, MOV, ADD, SUB, JMP, JMZ, JMN, DJN, CMP, SLT and SPL. The latest commit on master, "Implement JMZ, JMN, DJN, CMP and SLT", added the last five, so "not all instructions are implemented" no longer seems to hold. EQU and END are assembler pseudo-instructions and are not meant to execute. I did not run the test suite.If you meant the newer ICWS-94 instructions, please say so. That would mean adding these:
.A/.B/.AB/.BA/.F/.X/.Imodifiers.$ @ < > * { }).That is a much larger change, so I'd like confirmation of the scope before starting it.
@Claude wrote in #1 (comment):
@Claude make sure you're looking at the right branch and fork
I rechecked the branch and remote, and my earlier finding still holds. I made no changes.
agent/issue-1is checked out. It sits at892bc40("Implement JMZ, JMN, DJN, CMP and SLT"), the same commit asorigin/master.origin,Levitating/corewars-test. There is no other fork or branch here for me to look at.lib/redcode.mldefines 11 opcodes: DAT, MOV, ADD, SUB, JMP, JMZ, JMN, CMP, SLT, DJN and SPL.Mars.stepinlib/mars.mlhandles all of them.So no ICWS-88 instruction is missing in this checkout. If you expected something else, it may be on a branch or fork I can't see. Please point me to it.
If you meant the ICWS-94 instructions, say so and I'll start. That means NOP, MUL, DIV, MOD, SEQ and SNE (and maybe STP/LDP), the
.A/.B/.AB/.BA/.F/.X/.Imodifiers, and the extra addressing modes. It is a large change that touches the parser and the MARS.I read "latest instructions" as the ICWS-94 opcodes and added NOP, MUL, DIV, MOD, SEQ and SNE (
lib/redcode.ml,lib/mars.ml). I couldn't build or test it, because there's no OCaml or dune in this environment, so it is unverified..A/.B/.AB/.BA/.F/.X/.Imodifiers, the extra addressing modes and STP/LDP. They are a bigger change, so say if you want them.I pushed this to #2.