You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "invalid opcode" message may cut off the assembly code generation in mid-stream. A better way to handle it is how DEBUG.EXE originally handled it: which is to treat it as a byte constant, e.g. "db 0fh" for opcode 0f. So, "db" should be added as a pseudo-mnemonic and the table entries set to that, instead of to "nop".
There's no reason to treat the floating point escapes specially - their format is standard, essentially the same as opcodes 84h or 85h (to cite the two most typical cases). In octal, the opcode sequences is \33D \xrm [ExtraBytes], which is "escape D" with (nominal) "register" r=0,1,2,3,4,5,6,7 and (nominal) "address mode" (x,m) and "ExtraBytes" dictated by the values of the octal digits x=0,1,2,3 and m=0,1,2,3,4,5,6,7.
Similarly, "aam" and "aad" do not really need to be treated specially, but could be treated the same way as "int P" (opcode \315, i.e. 0cdh).
I translated what you have - without any of the above-mentioned changes - straight into C. I'll fork off of your version, add the C translation, and then do continual upgrade on it from there. You're welcome to copy back the C translation (or any of its upward revisions), when I put it up.
Edit: 2023-07-18: I forked and put it up on GitHub.
The text was updated successfully, but these errors were encountered:
The "invalid opcode" message may cut off the assembly code generation in mid-stream. A better way to handle it is how DEBUG.EXE originally handled it: which is to treat it as a byte constant, e.g. "db 0fh" for opcode 0f. So, "db" should be added as a pseudo-mnemonic and the table entries set to that, instead of to "nop".
There's no reason to treat the floating point escapes specially - their format is standard, essentially the same as opcodes 84h or 85h (to cite the two most typical cases). In octal, the opcode sequences is \33D \xrm [ExtraBytes], which is "escape D" with (nominal) "register" r=0,1,2,3,4,5,6,7 and (nominal) "address mode" (x,m) and "ExtraBytes" dictated by the values of the octal digits x=0,1,2,3 and m=0,1,2,3,4,5,6,7.
Similarly, "aam" and "aad" do not really need to be treated specially, but could be treated the same way as "int P" (opcode \315, i.e. 0cdh).
I translated what you have - without any of the above-mentioned changes - straight into C. I'll fork off of your version, add the C translation, and then do continual upgrade on it from there. You're welcome to copy back the C translation (or any of its upward revisions), when I put it up.
Edit: 2023-07-18: I forked and put it up on GitHub.
The text was updated successfully, but these errors were encountered: