With an older version of Parchment and ZVM, I could center a line of text with the font off
and spaces
instructions but it seems that this is no longer possible with the recent version.
Code
Constant HDR_SCREENWCHARS $21;
Array Storage buffer 160;
[ ScreenWidth;
return (HDR_SCREENWCHARS->0);
];
[ StrLen str;
@output_stream 3 Storage;
print (string) str;
@output_stream -3;
return Storage-->0;
];
[ CenterLine str len width cx;
len = StrLen(str);
width = ScreenWidth();
cx = (width - len) / 2;
font off;
spaces cx;
print (string) str;
new_line;
font on;
];
[ main key;
CenterLine("* CENTERED TEXT *");
@read_char 1 ->key;
];