lines: tweak calling convention

This puts some of the arguments in the right place for us, meaning there's
less juggling to do in the assembly code.
build: use 80186 instructions
asm: rework asm includes

Also, choose bit shift implementation based on the processor chosen by
asm/cpu.asm.  We choose the native version for processors implementing
the 80186 instruction set, otherwise we fall back to the handrolled
versions we used previously.