a bit of mode 1 code