swap rows & cols params for CUP
introduce DCS handler
make this ansi_writer a bit easier to understand