Data transfer test bench
From Zet
(Redirected from Data transfer (test bench))
Test bench for data transfer instructions, except mov which must work before this test; jmp must work too.
Instructions
This example tests these instructions:
- sahf 1
- lahf 2
- lds 3
- lea 4
- les 5
- pop 6 (reg,non-st), 7 (seg), 8 (mem)
- popf 9
- push 10 (reg), 11 (seg), 12 (mem)
- pushf 13
- xchg 14 (reg-reg), 15 (reg-mem), 16 (reg-acum), 17 (reg-reg,byte)
- xlat 18
- in 19 (byte,imm) 20 (byte,dx) 21 (word,imm) 22 (word,dx)
- out 23 (byte,imm) 24 (byte,dx) 25 (word,imm) 26 (word,dx)
Code
<embed_code>02_datatrnf.s</embed_code>
Results
Memory contents at the end should be:
0x00: 0xXXc7 0xa5c7 0x5678 0x1234 0x8cf1 0xabcd 0x8b2d 0x0cd3 0x10: 0x8cf1 0xabcd 0xffff 0x8cf1 0x8cf1 0xXXXX 0xXXXX 0xXXXX 0x20: 0x87c7 0xXXXX 0xXXXX 0xXXXX 0xXXXX 0xXXXX 0xXXXX 0xXXXX