Viewdata/VideoTex data transmission protocol -------------------------------------------- Characters are sent as a text stream. Character Action ------------------- 5 ENQ, client should respond with a string describing the client 8,9,10,11, Write to VDU, but 10 and 11 wrap and remain in the same column 12,13,30 and 8 and 9 wrap between the top-left and the bottom-right 17 Cursor on 20 Cursor off 27,char VDU char EOR &C0 As data is expected to be sent over a 7-bit channel, then teletext colour characters (128-159) need to be escaped. 32-255 Teletext display characters The bottom lines of double-height text are not sent, the receiver must duplicate a line received with CHR$141 in it to create the bottom line. The text sent is expected to be displayed as teletext characters, so for example, &23 should be displayed as a pound and not a hash. The BBC's VDU drivers translate hash, pound, and underline character codes to the teletext character codes, so for example &23 is displayed as a hash. The simplest way to display the VideoTex text stream as the expected display characters to do VDU char OR &80 for received characters 32-127. Code similar to the following will do this: char=FNreadbyte IF char=5 THEN PROCenq:ENDPROC IF (char>=8 AND char<=13) OR char=30 THEN VDU char:ENDPROC IF char=17 THEN VDU 23,1,1;0;0;0:ENDPROC IF char=20 THEN VDU 23,1,0;0;0;0:ENDPROC IF char=27 THEN VDU FNreadbyte EOR &C0:ENDPROC IF char>=32 THEN VDU char OR &80:ENDPROC ENDPROC