Jump instructions test bench 2

From Zet
Jump to: navigation, search

This example tests these instructions:

  • call 1 (direct same seg), 2 (indirect reg, same seg), 3 (indirect mem, same seg), 4 (direct diff seg), 5 (indirect mem, diff seg)
  • loop 6
  • loope/loopz 7
  • loopne/loopnz 8
  • ret 9 (same seg), 10 (same seg, value), 11 (diff seg), 12 (diff seg, value)
  • jcxz 13

Code

<embed_code>05_jump2.s</embed_code>

Results

Memory contents at the end should be:

0x00:  0x2ff0  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX