move type definitions to their own file
Fix $[register] params in operations.

$Y and $Z refer to the values held in the corresponding general register.