# Test of the 8xC5x7 MDU

# MDU is mapped at sfr 0xe9 to 0xef
dump sfr 0xe9 0xef

# All cells should have hw operators attached
memory cell sfr 0xe9
memory cell sfr 0xea
memory cell sfr 0xeb
memory cell sfr 0xec
memory cell sfr 0xed
memory cell sfr 0xee
memory cell sfr 0xef

# 0x12345678 / 0x4321 = 0x456c r 0x1f8c
set mem sfr 0xe9 0x78 0x56 0x34 0x12
set mem sfr 0xed 0x21 0x43
# Quotient
dump sfr 0xe9 0xec
# Remainder
dump sfr 0xed 0xee

# 0x8765 / 0x1234 = 0x7 r 0x7f9
set mem sfr 0xe9 0x65 0x87
set mem sfr 0xed 0x34 0x12
# Quotient
dump sfr 0xe9 0xea
# Remainder
dump sfr 0xed 0xee

#  0xdead * 0xbeef
set mem sfr 0xe9 0xad
set mem sfr 0xed 0xef
set mem sfr 0xea 0xde
set mem sfr 0xee 0xbe
# Product
dump sfr 0xe9 0xec

# 0x87654321 << 1
set mem sfr 0xe9 0x21 0x43 0x65 0x87
set mem sfr 0xef 0x01
dump sfr 0xe9 0xec

# >> 1
set mem sfr 0xef 0x21
dump sfr 0xe9 0xec

# << 4
set mem sfr 0xef 0x04
dump sfr 0xe9 0xec

# << 8
set mem sfr 0xef 0x08
dump sfr 0xe9 0xec
