Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!aplcen!haven!adm!news From: PETERSEN@ctrvx1.vanderbilt.edu (Ghost in the -Turing- Machine) Newsgroups: comp.lang.pascal Subject: Re: Porting Turbo Pascal programs to VMS Message-ID: <24335@adm.BRL.MIL> Date: 29 Aug 90 15:13:56 GMT Sender: news@adm.BRL.MIL Lines: 31 > From: IN%"lanmaint@nssdca.gsfc.nasa.gov" "Dave Yoest" 28-AUG-1990 19:13:20.14 > You requested gotoxy(x,y) for VMS, so I included it here since it's > small. This should work on any ansi terminal, because it uses the > ansi escape sequence for cursor position (CUP) > > procedure gotoxy(xpos,ypos : integer); > > begin > write(chr(27)+'['+(udec(ypos,2))+';'+(udec(xpos,2))+'H'); > end; You might also want to check out what seem to be VMS standard RTL calls (even though I can't find documentation on them) like LIB$SET_CURSOR(Row,Col) and LIB$ERASE_PAGE(Row,Col). If you define the function like this: [EXTERNAL(LIB$SET_CURSOR)] FUNCTION GotoXY(Row, Col : INTEGER) : INTEGER; you should be able to use it without any real problems. NOTE: I have not tested the definition above. I use the function without renaming it... These also seem to work only with terminals that VMS implicitly understands. -Chris +------------------+ \ Chris Petersen / +-----------------------+--------------+----------------------+ / Vanderbilt University Computer Center - Systems Development \ / petersen@ctrvax.Vanderbilt.EDU .AND. petersen@VUctrvx1.Bitnet \ +-------------------------------------------------------------------+ { "You're quoting me? I make it up as I go!" } +---------------------------------------------+