Asm::X86 - List of instructions and registers of x86-compatible processors, validating and converting instructions and memory references.
Version 0.62
This module provides the user with the ability to check whether a given string represents an x86 processor register or instruction. It also provides lists of registers and instructions and allows to check if a given expression is a valid addressing mode. Other subroutines include converting between AT&T and Intel syntaxes.
use Asm::X86 qw(@instr is_instr); print "YES" if is_instr ("MOV");
Nothing is exported by default. The following functions are exported on request: is_reg_intel is_reg8_intel is_reg16_intel is_reg32_intel is_reg64_intel is_reg_mm_intel is_segreg_intel is_reg_fpu_intel is_reg_opmask_intel is_addressable32_intel is_r32_in64_intel is_reg_att is_reg8_att is_reg16_att is_reg32_att is_reg64_att is_reg_mm_att is_segreg_att is_reg_fpu_att is_reg_opmask_att is_addressable32_att is_r32_in64_att is_reg is_reg8 is_reg16 is_reg32 is_reg64 is_reg_mm is_segreg is_reg_fpu is_reg_opmask is_addressable32 is_r32_in64 is_instr_intel is_instr_att is_instr is_valid_16bit_addr_intel is_valid_32bit_addr_intel is_valid_64bit_addr_intel is_valid_addr_intel is_valid_16bit_addr_att is_valid_32bit_addr_att is_valid_64bit_addr_att is_valid_addr_att is_valid_16bit_addr is_valid_32bit_addr is_valid_64bit_addr is_valid_addr conv_att_addr_to_intel conv_att_instr_to_intel conv_intel_addr_to_att conv_intel_instr_to_att is_att_suffixed_instr is_att_suffixed_instr_fpu add_att_suffix_instr These check if the given string parameter belongs to the specified class of registers or instructions or is a vaild addressing mode. The "convert*" functions can be used to convert the given instruction (including the operands)/addressing mode between AT&T and Intel syntaxes. The "_intel" and "_att" suffixes mean the Intel and AT&T syntaxes, respectively. No suffix means either Intel or AT&T. All subroutines work best given input after any pre-processing, i.e. after all macros, constants, etc. have been replaced by the real values. The following arrays are exported on request: @regs8_intel @regs16_intel @segregs_intel @regs32_intel @regs64_intel @regs_mm_intel @regs_fpu_intel @regs_opmask_intel @regs_intel @regs8_att @regs16_att @segregs_att @regs32_att @regs64_att @regs_mm_att @regs_fpu_att @regs_opmask_att @regs_att @instr_intel @instr_att @instr These contain all register and instruction mnemonic names as lower-case strings. The "_intel" and "_att" suffixes mean the Intel and AT&T syntaxes, respectively. No suffix means either Intel or AT&T.
A list of 8-bit registers (as strings) in Intel syntax.
A list of 8-bit registers (as strings) in AT&T syntax.
A list of segment registers (as strings) in Intel syntax.
A list of segment registers (as strings) in AT&T syntax.
A list of 16-bit registers (as strings), including the segment registers, in Intel syntax.
A list of 16-bit registers (as strings), including the segment registers, in AT&T syntax.
A list of 32-bit registers (as strings) in Intel syntax.
A list of 32-bit registers (as strings) in AT&T syntax.
A list of FPU registers (as strings) in Intel syntax.
A list of FPU registers (as strings) in AT&T syntax.
A list of 64-bit registers (as strings) in Intel syntax.
A list of 64-bit registers (as strings) in AT&T syntax.
A list of multimedia (MMX/3DNow!/SSEn) registers (as strings) in Intel syntax.
A list of multimedia (MMX/3DNow!/SSEn) registers (as strings) in AT&T syntax.
A list of opmask registers (as strings) in Intel syntax.
A list of opmask registers (as strings) in AT&T syntax.
A list of all x86 registers (as strings) in Intel syntax.
A list of all x86 registers (as strings) in AT&T syntax.
A list of all x86 instructions (as strings) in Intel syntax.
A list of all x86 instructions (as strings) in AT&T syntax.
A list of all x86 instructions (as strings) in Intel and AT&T syntax.
Checks if the given string parameter is a valid x86 register (any size) in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 register (any size) in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 register (any size). Returns 1 if yes.
Checks if the given string parameter is a valid x86 8-bit register in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 8-bit register in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 8-bit register. Returns 1 if yes.
Checks if the given string parameter is a valid x86 16-bit register in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 16-bit register in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 16-bit register. Returns 1 if yes.
Checks if the given string parameter is a valid x86 segment register in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 segment register in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 segment register. Returns 1 if yes.
Checks if the given string parameter is a valid x86 32-bit register in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 32-bit register in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 32-bit register. Returns 1 if yes.
Checks if the given string parameter is a valid x86 32-bit register which can be used for addressing in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 32-bit register which can be used for addressing in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 32-bit register which can be used for addressing. Returns 1 if yes.
Checks if the given string parameter is a valid x86 32-bit register which can only be used in 64-bit mode (that is, checks if the given string parameter is a 32-bit subregister of a 64-bit register). Returns 1 if yes.
Checks if the given string parameter is a valid x86 32-bit register in Intel syntax which can only be used in 64-bit mode (that is, checks if the given string parameter is a 32-bit subregister of a 64-bit register). Returns 1 if yes.
Checks if the given string parameter is a valid x86 32-bit register in AT&T syntax which can only be used in 64-bit mode (that is, checks if the given string parameter is a 32-bit subregister of a 64-bit register). Returns 1 if yes.
Checks if the given string parameter is a valid x86 64-bit register in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 64-bit register in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 64-bit register. Returns 1 if yes.
Checks if the given string parameter is a valid x86 multimedia (MMX/3DNow!/SSEn) register in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 multimedia (MMX/3DNow!/SSEn) register in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 multimedia (MMX/3DNow!/SSEn) register. Returns 1 if yes.
Checks if the given string parameter is a valid x86 FPU register in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 FPU register in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 FPU register. Returns 1 if yes.
Checks if the given string parameter is a valid x86 opmask register in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 opmask register in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 opmask register. Returns 1 if yes.
Checks if the given string parameter is a valid x86 instruction in Intel syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 instruction in AT&T syntax. Returns 1 if yes.
Checks if the given string parameter is a valid x86 instruction in any syntax. Returns 1 if yes.
Checks if the given string parameter (must contain the square braces) is a valid x86 16-bit addressing mode in Intel syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the parentheses) is a valid x86 16-bit addressing mode in AT&T syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the parentheses) is a valid x86 16-bit addressing mode in AT&T or Intel syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the square braces) is a valid x86 32-bit addressing mode in Intel syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the parentheses) is a valid x86 32-bit addressing mode in AT&T syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the parentheses) is a valid x86 32-bit addressing mode in AT&T or Intel syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the square braces) is a valid x86 64-bit addressing mode in Intel syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the parentheses) is a valid x86 64-bit addressing mode in AT&T syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the parentheses) is a valid x86 64-bit addressing mode in AT&T or Intel syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the square braces) is a valid x86 addressing mode in Intel syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the braces) is a valid x86 addressing mode in AT&T syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Checks if the given string parameter (must contain the square braces) is a valid x86 addressing mode (Intel or AT&T syntax). Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns 1 if yes.
Tells if the given instruction is suffixed in AT&T syntax. Returns 1 if yes.
Tells if the given FPU non-integer instruction is suffixed in AT&T syntax. Returns 1 if yes
Creates the AT&T syntax instruction array from the Intel-syntax array. Returns the new array.
Converts the given string representing a valid AT&T addressing mode to Intel syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns the resulting string.
Converts the given string representing a valid Intel addressing mode to AT&T syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns the resulting string.
Converts the given string representing a valid AT&T instruction to Intel syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns the resulting string.
Converts the given string representing a valid Intel instruction to AT&T syntax. Works best after any pre-processing of the input, i.e. after all macros, constants, etc. have been replaced by the real values. Returns the resulting string.
After installing, you can find documentation for this module with the perldoc command.
perldoc Asm::X86
You can also look for information at:
Search CPAN https://metacpan.org/release/Asm-X86 http://search.cpan.org/dist/Asm-X86 CPAN Request Tracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Asm-X86 http://rt.cpan.org/NoAuth/Bugs.html?Dist=Asm-X86 CPAN Ratings: https://cpanratings.perl.org/dist/Asm-X86 http://cpanratings.perl.org/d/Asm-X86
Bogdan Drozdowski, <bogdro at cpan.org>
<bogdro at cpan.org>
Copyright 2008-2021 Bogdan Drozdowski, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Asm::X86, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Asm::X86
CPAN shell
perl -MCPAN -e shell install Asm::X86
For more information on module installation, please visit the detailed CPAN module installation guide.