Closed hangingman closed 1 year ago
ref #73
[BITS 32]
ref https://web.archive.org/web/20230616085837/https://faculty.kfupm.edu.sa/COE/aimane/assembly/pagegen-64.aspx.htm
Direct. MemoryAddr ::= "[" Factor "]" ; BasedOrIndexed. MemoryAddr ::= "[" Ident "+" Integer "]" ; Indexed. MemoryAddr ::= "[" IndexExp "+" Integer "]" ; BasedIndexed. MemoryAddr ::= "[" Ident "+" Ident "]" ; BasedIndexedDisp. MemoryAddr ::= "[" Ident "+" Ident "+" Integer "]" ; BasedIndexedDispScale. MemoryAddr ::= "[" Ident "+" IndexExp "+" Integer "]" ; IndexScaleExp. IndexExp ::= Ident "*" Integer ;
[displacement]
[BX] , [SI] , [DI] , [BP]
[BP + displacement] , [BX + displacement]
[SI + displacement] , [DI + displacement]
[BX + SI] , [BX + DI] , [BP + SI] , [BP + DI]
[BX + SI + displacement] , [BX + DI + displacement] , [BP + SI + displacement] , [BP + DI + displacement]
[base]
[base + displacement]
[Index*scale + displacement]
[base + index + displacement]
[base + index*scale + displacement]
ref #73
対応内容
[BITS 32]
の記法に対応BNFの内容
ref https://web.archive.org/web/20230616085837/https://faculty.kfupm.edu.sa/COE/aimane/assembly/pagegen-64.aspx.htm
TODO
16ビットメモリアドレッシングモード
[displacement]
[BX] , [SI] , [DI] , [BP]
[BP + displacement] , [BX + displacement]
[SI + displacement] , [DI + displacement]
[BX + SI] , [BX + DI] , [BP + SI] , [BP + DI]
[BX + SI + displacement] , [BX + DI + displacement] , [BP + SI + displacement] , [BP + DI + displacement]
32ビットメモリアドレッシングモード
[displacement]
[base]
[base + displacement]
[Index*scale + displacement]
[base + index + displacement]
[base + index*scale + displacement]