From 116e7730d7bcc79cfbb76aa24de142955fb4f281 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 13 Oct 2018 23:18:31 -0700 Subject: 4692 - update online help for subx It now includes details for 8-bit registers. And we'll just use the classic names for the registers so that the relationships between 8- and 32-bit versions are more obvious. --- subx/030---operands.cc | 56 +++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 21 deletions(-) (limited to 'subx/030---operands.cc') diff --git a/subx/030---operands.cc b/subx/030---operands.cc index 196e8556..4015174b 100644 --- a/subx/030---operands.cc +++ b/subx/030---operands.cc @@ -72,9 +72,10 @@ void init_operand_type_help() { " Using it as an address gets more involved. For more details,\n" " try reading the help pages for 'base', 'index' and 'scale'.)\n" "\n" - "For complete details consult the IA-32 software developer's manual, table 2-2,\n" - "\"32-bit addressing forms with the ModR/M byte\".\n" - " https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf\n" + "For complete details, spend some time with two tables in the IA-32 software\n" + "developer's manual that are also included in this repo:\n" + " - modrm.pdf: volume 2, table 2-2, \"32-bit addressing with the ModR/M byte.\".\n" + " - sib.pdf: volume 2, table 2-3, \"32-bit addressing with the SIB byte.\".\n" ); put(Help, "subop", "Additional 3-bit operand for determining the instruction when the opcode is 81, 8f or ff.\n" @@ -84,34 +85,47 @@ void init_operand_type_help() { "3-bit operand specifying a register operand used directly, without any further addressing modes.\n" ); put(Help, "rm32", - "32-bit value in register or memory. The precise details of its construction depend on the eponymous 3-bit\n" - "'rm32' operand, the 'mod' operand, and also potentially the 'SIB' operands ('scale', 'index' and 'base')\n" - "and a displacement ('disp8' or 'disp32').\n" - "For complete details consult the IA-32 software developer's manual, table 2-2,\n" - "\"32-bit addressing forms with the ModR/M byte\".\n" - " https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf\n" + "32-bit value in register or memory. The precise details of its construction\n" + "depend on the eponymous 3-bit 'rm32' operand, the 'mod' operand, and also\n" + "potentially the 'SIB' operands ('scale', 'index' and 'base') and a displacement\n" + "('disp8' or 'disp32').\n" + "\n" + "For complete details, spend some time with two tables in the IA-32 software\n" + "developer's manual that are also included in this repo:\n" + " - modrm.pdf: volume 2, table 2-2, \"32-bit addressing with the ModR/M byte.\".\n" + " - sib.pdf: volume 2, table 2-3, \"32-bit addressing with the SIB byte.\".\n" ); put(Help, "base", - "Additional 3-bit operand (when 'rm32' is 4 unless 'mod' is 3) specifying the register containing an address to look up.\n" + "Additional 3-bit operand (when 'rm32' is 4, unless 'mod' is 3) specifying the\n" + "register containing an address to look up.\n" "This address may be further modified by 'index' and 'scale' operands.\n" " effective address = base + index*scale + displacement (disp8 or disp32)\n" - "For complete details consult the IA-32 software developer's manual, table 2-3,\n" - "\"32-bit addressing forms with the SIB byte\".\n" - " https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf\n" + "For complete details, spend some time with the IA-32 software developer's manual,\n" + "volume 2, table 2-3, \"32-bit addressing with the SIB byte\".\n" + "It is included in this repository as 'sib.pdf'.\n" ); put(Help, "index", - "Optional 3-bit operand (when 'rm32' is 4 unless 'mod' is 3) that can be added to the 'base' operand to compute the 'effective address' at which to look up memory.\n" + "Optional 3-bit operand (when 'rm32' is 4 unless 'mod' is 3) that can be added to\n" + "the 'base' operand to compute the 'effective address' at which to look up memory.\n" " effective address = base + index*scale + displacement (disp8 or disp32)\n" - "For complete details consult the IA-32 software developer's manual, table 2-3,\n" - "\"32-bit addressing forms with the SIB byte\".\n" - " https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf\n" + "For complete details, spend some time with the IA-32 software developer's manual,\n" + "volume 2, table 2-3, \"32-bit addressing with the SIB byte\".\n" + "It is included in this repository as 'sib.pdf'.\n" ); put(Help, "scale", - "Optional 2-bit operand (when 'rm32' is 4 unless 'mod' is 3) that can be multiplied to the 'index' operand before adding the result to the 'base' operand to compute the _effective address_ to operate on.\n" + "Optional 2-bit operand (when 'rm32' is 4 unless 'mod' is 3) that encodes a\n" + "power of 2 to be multiplied to the 'index' operand before adding the result to\n" + "the 'base' operand to compute the _effective address_ to operate on.\n" " effective address = base + index * scale + displacement (disp8 or disp32)\n" - "For complete details consult the IA-32 software developer's manual, table 2-3,\n" - "\"32-bit addressing forms with the SIB byte\".\n" - " https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf\n" + "\n" + "When scale is 0, use index unmodified.\n" + "When scale is 1, multiply index by 2.\n" + "When scale is 2, multiply index by 4.\n" + "When scale is 3, multiply index by 8.\n" + "\n" + "For complete details, spend some time with the IA-32 software developer's manual,\n" + "volume 2, table 2-3, \"32-bit addressing with the SIB byte\".\n" + "It is included in this repository as 'sib.pdf'.\n" ); put(Help, "disp8", "8-bit value to be added in many instructions.\n" -- cgit 1.4.1-2-gfad0