Now compiles in VP

Changes were mostly to IFDEF out asm/inline/registers, but there were
some code fixes too (duplicate CASE for example)