Broke out top+bottom ANSI margins in a function writeANSI_margin(6) handles writing the top and bottom margins for writeANSI