Neil
So clear screen (fairly universal): PRINT CHR$(12);
Move to XY: PRINT CHR$(31);CHR$(X);CHR$(Y);
and so on.
BBC Basic has a CLS command which does the equivalent of PRINT CHR$(12); and a MOVE x,y command which does the 31/x/y for you and a few others. Similar for the graphics commands - BASIC turns them into character sequences.
Also to define characters which is easier as the font is always 8x8, so send the code followed by the character then 8 bytes of font data.
VDU 23,240,153,189,219,126,36,60,36,36
then
VDU 240
or PRINT CHR$(240);
Prints the "invader" character.
This is one part of how Acorn separated the "language" from the "OS". So different language ROMs didn't have to worry about screen pokes, etc. As an old time user of the Beeb, I adopted it for my 6502/65816 and ARM SBC projects - my terminal is a smart terminal that run on my Linux desktop that interprets the Acorn codes and does the right thing. This enabled my to run BBC Basic over it using all it's internal text and graphics commands as well as my BCPL system when I needed to do screen stuff - like the editor and so on.
(The ARM port doesn't use Linux but still serialises the calls from the application to the screen but also provides direct calls which are faster as it's all running on the same CPU)
-Gordon