Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!cbmvax!vu-vlsi!perry From: perry@vu-vlsi.UUCP Newsgroups: comp.sources.wanted,comp.sys.dec Subject: Re: VMS Pascal Terminal I/O help needed Message-ID: <638@vu-vlsi.UUCP> Date: Sun, 1-Mar-87 02:49:48 EST Article-I.D.: vu-vlsi.638 Posted: Sun Mar 1 02:49:48 1987 Date-Received: Mon, 2-Mar-87 06:01:48 EST References: <701@bgsuvax.UUCP> Reply-To: perry@vu-vlsi.UUCP (Rick Perry) Organization: Villanova Univ. EE Dept. Lines: 27 Xref: utgpu comp.sources.wanted:671 comp.sys.dec:82 In article <701@bgsuvax.UUCP> denbeste@bgsuvax.UUCP (William C. DenBesten) writes: >I am having difficulties writing what should be a simple program. I want to >read in a character at a time from the keyboard ... Here is a sample program doing single character input from VAX/VMS Pascal, see $help system and look at sys$library:starlet.pas for more info on the wierd $assign and $qiow bs. Unfortunately, I don't think there is any way to get the io$ symbols directly into Pascal, I copied the values from one of the FORSYSDEF modules... ...Rick ..{cbmvax,pyrnj,bpa}!vu-vlsi!perry perry@vuvaxcom.bitnet --- [inherit('sys$library:starlet')] program ascii(output); var c:char; chan: [word] 0..65535; code: integer := %x'3A' + %x'40'; { io$_ttyreadall + io$m_noecho } begin $assign('tt',chan); open(output,'tt:'); rewrite(output); writeln('Enter Q or q to quit.'); writeln('Start entering characters...'); repeat $qiow(,chan,code,,,,c,1); writeln('Character=',c,' ASCII code = ',ord(c):1) until (c='Q') or (c='q') end.