Wednesday 3 July 2019

Assembler emulator

Here it is an assembler x86 emulator wrote in Livecode by Andre Garcia:
You can download from here:: http://tinyurl.com/p48nhwd
There are 4 registers: ax, bx, cx, dx.
These are the commands;
  • GET - ask a number
  • PUT - shows ax register
  • MOV - copy the target register
    • MOV <target>, <register>
    • MOV <target>, <number>
  • CMP - compare registers
  • JA - jump if greater than
  • JB - jump if less than
  • JAE - jump if greater or equal
  • JBE - jump if less or equal
  • JNA - jump if not greater
  • JNB -jump if not less
  • JE -jump if equal
  • JNE -jump if not equal
  • JMP - jump!
  • XCHG - exchange 2 registers
  • ADD - add
  • SUB - subtract
  • AND - bitwise and
  • OR - bitwise or
  • XOR - exclusive or
  • CALL - call a  subroutine
  • RET - return from a  subroutine
  • HALT - stop the software
  • SETE - set 1/0 if equal
  • SETNE - set 1/0 if not equal
  • SETLE - set 1/0 if lower or equal
  • SETL - set 1/0 if lower
  • SETG - set 1/0 if greater
  • SETGE - set 1/0 if greater or equal
  • SETNLE - set 1/0 if not lower or equal
  • SETNL - set 1/0 if not lower
  • SETNGE - set 1/0 if not greater or equal
  • SETNG - set 1/0 if not greater


No comments:

Post a Comment