VMS Help
PASCAL, Predeclared Routines, Privileged

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

  Privileged routines manipulate privileged hardware registers.

  1 - MFPR

  The MFPR function returns an unsigned value that is the value of
  a VAX internal processor register.

  Syntax:

     MFPR( ipr_register_expression )

  The  'ipr_register_expression'  parameter   is   an   expression
  compatible with the UNSIGNED type.

  The Compaq Pascal compiler  generates  user-mode  code.   Compaq
  Pascal  does not explicitly support the running of Compaq Pascal
  generated code in kernel mode.  However, if the following  rules
  are  observed,  then  the  generated  code  has a good chance of
  working as expected in elevated access modes:

   o  All code must be compiled with  the  /NOCHECK  qualifier  or
      [CHECK(NONE)]  attribute.   The Compaq Pascal on OpenVMS VAX
      run-time signaling method relies on trying  to  execute  the
      HALT  instruction.   In  user-mode, this causes an exception
      that is a signal to the Compaq Pascal run-time library.   In
      kernel-mode  on an OpenVMS VAX system, this simply HALTs the
      machine.

   o  Avoid  all  routine  calls  which  translate  into  Run-Time
      Library  calls.   These  include  all  I/O routines, several
      arithmetic routines, several string routines, etc.

  2 - MTPR

  The MTPR procedure assigns a value into a VAX internal processor
  register.

  Syntax:

     MTPR( ipr_register_expression, source_expression );

  The 'ipr_register_expression' and 'source_expression' parameters
  are  expressions  compatible  with  the  unsigned  type.  Compaq
  Pascal stores the value specified  by  'source-expression'  into
  the     internal     processor     register     specified     by
  'ipr-register-expression'.

  The Compaq Pascal compiler  generates  user-mode  code.   Compaq
  Pascal  does not explicitly support the running of Compaq Pascal
  generated code in kernel mode.  However, if the following  rules
  are  observed,  then  the  generated  code  has a good chance of
  working as expected in elevated access modes:

   o  All code must be compiled with  the  /NOCHECK  qualifier  or
      [CHECK(NONE)]  attribute.  The Compaq Pascal for OpenVMS VAX
      systems  run-time  signaling  method  relies  on  trying  to
      execute  the HALT instruction.  In user-mode, this causes an
      exception which is a signal to the  Compaq  Pascal  run-time
      library.   In  kernel-mode  on  an  OpenVMS VAX system, this
      simply HALTs the machine.

   o  Avoid  all  routine  calls  which  translate  into  Run-Time
      Library  calls.   These  include  all  I/O routines, several
      arithmetic routines, several string routines, etc.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.