Subtraction instructions test bench
From Zet
This example tests these instructions:
- sub
- sbb
- dec
Code
<embed_code>15_sub.s</embed_code>
Results
Memory contents at the end should be:
0x00: 0xffff 0x0002 0x0000 0xffff 0x0001 0xfffe 0x7fff 0x8001 0x10: 0xef45 0x295f 0xe8cf 0xffff 0xfe00 0x807f 0x81fe 0x80ff 0x20: 0xbc00 0x01d2 0x0000 0x0000 0xff00 0x01ff 0xfe00 0xffff 0x30: 0x017f 0x7a80 0x8b70 0x90c4 0xfefd 0xffff 0x7ffd 0xfe80 0x40: 0x7e81 0x0080 0x1ab9 0xffff 0x7fff 0x7411 0x7fff 0xXXb4 0x50: 0xXXXX 0xXXXX 0xXXXX 0xXXXX 0xXXXX 0xXXXX 0x0086 0x0812 0x60: 0x0096 0x0006 0x0816 0x0096 0x0012 0x0006 0x0887 0x0082 0x70: 0x0097 0x0093 0x0087 0x0086 0x0013 0x0093 0x0816 0x0082 0x80: 0x0046 0x0046 0x0087 0x0887 0x0887 0x0082 0x0046 0x0097 0x90: 0x0096 0x0016 0x0893 0x0093 0x0816 0x0082 0x0046 0x0097