Getting Started with x86 » History » Version 1

Version 1/87 - Next ยป - Current version
Mikhail Chupilko, 04/06/2017 03:58 PM

Getting Started with MicroTESK: demo of x86


Install MicroTESK (for more information see

Overview of the x86 ISA

Specifications of x86 can be found into $MICROTESK_HOME/arch/demo/x86/model.

Each instruction is described by means of the following constructs (register move instruction is taken as an example)
  1. Its declaration
    op mov_r1616 (dst: GPR16, src: GPR16)
  2. Its assembly representation
    syntax = format("mov %s, %s", dst.syntax, src.syntax)
  3. Its binary coding
    image = format("1000101111%s%s", dst.image, src.image)
  4. Its semantics
      action = {
        dst = src;
        instr_size = instr_size + 2;

To run the model, use the following command:

$MICROTESK_HOME/bin/ x86.nml

For more information, see MicroTESK wiki:

Overview of x86 Test Templates

Test templates for the x86 model can be found into $MICROTESK_HOME/arch/demo/x86/templates.

As by now, it contains six demonstration templates:
  1. block.rb to show usage of the instruction blocks
  2. block_random.rb to show creation of the randomized instruction sequences using block constructs
  3. euclid.rb to show MicroTESK simulating the execution of a test program to predict the resulting state of the PE under test
  4. random.rb to show generation of the randomized test cases by using biased values, intervals, arrays and distributions
  5. random_immediate.rb to show generation of random immediate values
  6. random_registers.rb to show dependent instructions with random registers

To run template processing use the following command:

$MICROTESK_HOME/bin/ x86 block.rb --code-file-prefix block --code-file-extension -v

When the processing is finished, files with the resulting assembly code can be found in $MICROTESK_HOME

For more information, see MicroTESK wiki: