Skip to content

Commit

Permalink
Handle the special implicit operands for ROL instruction group
Browse files Browse the repository at this point in the history
  • Loading branch information
flysand7 committed Oct 11, 2024
1 parent 08b0f4e commit 5d03dc0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/disasm/disasm.odin
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ disasm_one :: proc(bytes: []u8) -> (res: Instruction, ok: bool) {
if opcode == 0xcb || opcode == 0xca {
flags += {.Far}
}
if opcode == 0xd0 {
eop = eop_imm(1, 1)
}
if opcode == 0xd2 {
rx = rx_op(.GPReg, 1, REG_CX)
}
}
res = Instruction {
mnemonic = mnemonic,
Expand Down
8 changes: 8 additions & 0 deletions test/asm/exceptions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ jmp 0x1100
jmp word [0x1101]
jmp far word [0x1103]
; retf ; (printed differently)

; ROL group
rcl byte [bp], 0x01
rcl byte [bp], cl
rcl byte [bp], 0xa0
rcr byte [bp], 0x01
rcr byte [bp], cl
rcr byte [bp], 0xa0

0 comments on commit 5d03dc0

Please sign in to comment.