From: MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 9-JAN-1993 13:07:24.65 To: info-vax@kl.sri.com CC: Subj: Re: Question: Reading keys with command procedures. 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 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 "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