asmdb icon indicating copy to clipboard operation
asmdb copied to clipboard

Support for jmp, call, and ret [far] instructions

Open brightening-eyes opened this issue 8 years ago • 7 comments

hello, as this project effect's asmjit, i've created the issue here, not in asmjit, (because asmjit get's it's instruction sets from here) some of the instructions like hlt, iret, and some others are not implemented in the asmjit if these are implemented, asmjit can be like nasm, which is used to write operating systems look at this and it should be easy to add these

brightening-eyes avatar Oct 22 '16 20:10 brightening-eyes

(comment removed, contained only list of instructions not supported at the moment the issue was created)

kobalicek avatar Nov 19 '16 12:11 kobalicek

seems everything that i need are there as i've checked, but i will look at it more

brightening-eyes avatar Nov 19 '16 14:11 brightening-eyes

DB was updated, still some missing, but it's much more complete now.

kobalicek avatar Feb 21 '17 00:02 kobalicek

xlatb modified:

["xlatb"            , "x:<al>,R:<es:zbx>"                                         , "NONE"    , "D7"                               , "ANY              Volatile"],
["xlatb"            , "x:<al>,R:<rbx>"                                            , "NONE"    , "REX.W D7"                         , "ANY              Volatile"],

lyrachord avatar Nov 22 '17 06:11 lyrachord

After call and jmp now

    ["call"             , "rel32"                                       , "D"       , "E8 cd"                            , "ANY              Control=Call OF=U SF=U ZF=U AF=U PF=U CF=U"],
    ["call"             , "R:r32/m32"                                   , "M"       , "FF /2"                            , "X86              Control=Call OF=U SF=U ZF=U AF=U PF=U CF=U"],
    ["call"             , "R:r64/m64"                                   , "M"       , "FF /2"                            , "X64              Control=Call OF=U SF=U ZF=U AF=U PF=U CF=U"],

    ["jmp"              , "rel8"                                        , "D"       , "EB cb"                            , "ANY              Control=Jump"],
    ["jmp"              , "rel32"                                       , "D"       , "E9 cd"                            , "ANY              Control=Jump"],
    ["jmp"              , "R:r32/m32"                                   , "D"       , "FF /4"                            , "X86              Control=Jump"],
    ["jmp"              , "R:r64/m64"                                   , "D"       , "FF /4"                            , "X64              Control=Jump"],

add far version:

    ["call"             , "R:m16_16"                                    , "M"       , "FF /3"                            , "ANY              Control=Call OF=U SF=U ZF=U AF=U PF=U CF=U"],
    ["call"             , "R:m16_32"                                    , "M"       , "FF /3"                            , "ANY              Control=Call OF=U SF=U ZF=U AF=U PF=U CF=U"],
    ["call"             , "R:m16_64"                                    , "M"       , "REX.W FF /3"                      , "X64              Control=Call OF=U SF=U ZF=U AF=U PF=U CF=U"],
	
    ["jmp"              , "R:m16_16"                                    , "M"       , "FF /5"                            , "ANY              Control=Jump"],
    ["jmp"              , "R:m16_32"                                    , "M"       , "FF /5"                            , "ANY              Control=Jump"],
    ["jmp"              , "R:m16_64"                                    , "M"       , "REX.W FF /5"                      , "X64              Control=Jump"],

lyrachord avatar Nov 22 '17 08:11 lyrachord

I added support for jmp and call [far] instructions, still have commented out some others that I don't have support for atm, but this is fixable.

kobalicek avatar Nov 22 '17 22:11 kobalicek

Issue #8 now contains xlat instruction. Let's keep this one just for FAR instructions

kobalicek avatar Nov 22 '17 22:11 kobalicek