move mode print to function. add code to query for mode 0x81FF
don't wait for ENTER if stdout redirected.
more