home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!waikato.ac.nz!comp.vuw.ac.nz!zl2tnm!toyunix!don
- Newsgroups: comp.os.vms
- Subject: Re: Question: Reading keys with command procedures.
- Message-ID: <463008@zl2tnm.gen.nz>
- From: don@zl2tnm.gen.nz (Don Stokes)
- Date: 9 Jan 93 06:22:52 GMT
- Sender: news@zl2tnm.gen.nz (GNEWS Version 2.0 news poster.)
- References: <9301081933.AA16969@uu3.psi.com>
- Distribution: world
- Organization: The Wolery
- Lines: 60
-
- leichter@lrw.com (Jerry Leichter) writes:
- > In theory, any undocumented language support routine is subject to change in
- > future versions of VMS. In practice, since the VMS group and the language
- > groups try quite hard to ensure upward compatibility, it's essentially
- > impossible for them to remove any such routines, or change the semantics of
- > calls generated by older compilers.
-
- Well, yes, but the implied support by not breaking existing code only
- goes as far as "normal" usage. The BASIC subroutine I derived my code
- from goes:
-
- sub fred
- x$ = inkey$(0%, wait)
- end sub
-
- and compiles to:
-
- FRED:: .word ^M<R2,R3,R4,R5,R6,R7,R8,R9.R10,R11,IV,DV>
- movab .-3,R2 ; \
- movab $PDATA+4,R0 ; | This is BASIC's init code
- movl R0,R1 ; |
- jsb BAS$INIT_R8 ; /
- 1$: movab 1$, -4(FP) ; This is for ERL handing
- pushl #0 ; \
- pushl #0 ; |
- pushl #0 ; | I lifted this for my code
- pushaq Z$(R11) ; |
- calls #4, BAS$INKEY ; /
- movab $PDATA+4,R0 ; \
- jsb BAS$END_R8 ; | This is BASIC's exit code
- movl #1, R0 ; /
- ret
-
- with data structures to match. It happens that BAS$INKEY *in* *this*
- *version* runs "standalone"; it's possible however that in the future, data
- structures may be set up for BAS$INKEY within BAS$INIT_R8. Code compiled
- with BASIC will be fine, because it contains calls to BAS$INIT_R8, but
- direct calls to BAS$INKEY from languages other than BASIC wouldn't.
-
- BASIC is a particularly nasty example, because of the truly awful code
- the compiler generates.... (Nice language, cruddy pessimising compiler
- backend.)
-
- > Mr. Stokes also says that "all bets are off on Alpha." For native Alpha
-
- <cringe> "Don", please. 8-)
-
- > code, that's certainly true, since there is no reason why a native Alpha
- > BASIC compiler should generate calls to the same RTL routines as a VAX
- > BASIC compiler. However, to the degree that Alpha VMS continues to support
- > the running of VAX images, it will necessarily be subject to the same
- > constrains as I pointed out above.
-
- ... and it's perhaps more likely that changes as outlined above may have
- been made.
-
- --
- Don Stokes, ZL2TNM (DS555) don@zl2tnm.gen.nz (home)
- Network Manager, Computing Services Centre don@vuw.ac.nz (work)
- Victoria University of Wellington, New Zealand +64-4-495-5052
-