🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #4834

RE: beginner's stupid question

#4834
From: Ian Murphy
Date: Mon, 22 May 1989 13:42
50 lines
2693 bytes
>Ian, We use modula-2 here in Trinity and we too tried to find a way to clear
>the screen and return the cursor to the top of the
>screen. It apparently cannot be done. We use VT320 terminals and went to the
>comp. lab. to get the manuels for the terminals.
>Having got them we frantically searched through it to find some sort of
>escape sequence or ascii character to do it.
>The result is that it cannot be done!!!
>

There are esc sequences to do this, they are

cursor home : esc[f
cursor to (r,c): esc[Pr;Pcf
Clr Scr : esc[2J

BUT, if you just write out these characters it will not work!!!!!
VMS is doing work behind the scenes and the terminal drivers catch esc
sequences and some are altered, SO before running the program to write out
these sequences say

$ set term/passthru

once you're finished say

$ set term/nopassthru

this forces VMS to ignore everything that is written to the term. Alternativly
you could just put the sequences into a string and write it out using SYS$QIO,
though your version may not support the system services, with the passthru flag
set. This problem doesn't occur(i think) for the guy who first asked the
question as he's running ultrix, which is brain-dead anyway and does nothing at
all for you.

If you want to find out more of the esc sequences for the vt320 then the
easiest way, other than wading through the ref manual is to write a program in
pascal/fortran/c/whatever which uses the smg$ calls, set your terminal (in
setup) so it displays esc sequences rather than interpreting them, then run
your program which does something like smg$clear_screen (or whatever) and
simply read the esc sequence on the screen.

Not that this has anything to do with modula-2.


+-----------------------------------------------------------------------------+
|Ian Murphy (^v^)               | Internet   : IAN@VAX1.UCC.IE                |
|Dept. Computer Science         | ARPA       : IAN@IRUCCVAX.BITNET            |
|University College Cork,       | janet      : EARN%IRL.HEA.UCC.IRUCCVAX::IAN |
|Ireland.                       | Voice      : "IAN!!!"                       |
+-----------------------------------------------------------------------------+
Technical Details
Message-ID: <INFO-M2%89052208585106@UCF1VM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!IRUCCVAX.UCC.IE!CBWP8008

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!IRUCCVAX.UCC.IE!CBWP8008
From: CBWP8008@IRUCCVAX.UCC.IE (Ian Murphy)
Newsgroups: comp.lang.modula2
Subject: RE: beginner's stupid question
Message-ID: <INFO-M2%89052208585106@UCF1VM>
Date: 22 May 89 13:42:00 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: Modula2 List <INFO-M2%UCF1VM.bitnet@lilac.berkeley.edu>
Organization: The Internet
Lines: 50