improved x86-64 console implementation