added macro to test flags, removed tmovecursor().