NAME=arj x86 16 bits
FILE=malloc://0x100
EXPECT=<<EOF
{"ip":0,"ax":0,"bx":0,"cx":0,"dx":0,"sp":0,"bp":0,"si":0,"di":0,"flags":0}
EOF
CMDS=<<EOF
e asm.arch = x86
e anal.arch = x86
e asm.bits=16
arj
EOF
RUN

NAME=lcall offset (#12284)
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=16
wx 9a34002001
?v $j
EOF
EXPECT=0x1234
RUN

NAME=ljmp offset (#12284)
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=16
wx ea34002001
?v $j
EOF
EXPECT=0x1234
RUN

NAME=aoj pushf
FILE=-
EXPECT=<<EOF
[
  {
    "opcode": "pushf",
    "disasm": "pushf",
    "pseudo": "pushf ",
    "description": "push flags register onto the stack",
    "mnemonic": "pushf",
    "mask": "ff",
    "esil": "2,sp,-=,eflags,sp,=[2]",
    "sign": false,
    "prefix": 0,
    "id": 591,
    "opex": {
      "operands": [
        {
          "size": 2,
          "rw": 1,
          "type": "reg",
          "value": "flags"
        }
      ]
    },
    "addr": 0,
    "bytes": "9c",
    "size": 1,
    "type": "upush",
    "scale": 0,
    "refptr": 0,
    "cycles": 2,
    "failcycles": 0,
    "delay": 0,
    "stack": "inc",
    "stackptr": 2,
    "family": "cpu"
  }
]
EOF
CMDS=<<EOF
e asm.arch=x86
e asm.bits=16
wx 9c
aoj~{}
EOF
RUN
