• Subject: Re: MATMATR 01DC
  • From: rjd@xxxxxxxxxx
  • Date: Thu, 12 Oct 2000 19:49:45 -0500
  • Importance: Normal

Option hex 01DC of MATMATR (materialize machine attributes) returns the
installed processor count for the physical machine.  A 10 byte
materialization template is needed.  The first 4 bytes is a signed binary
number that specifies the size of the template (an input value that should
be set to 10).  At offset 8, the instruction will return the installed
processor count in a UBIN(2).

Here is a sample C program that uses this option:

#include <mih/matmatr.h>
#include <stdio.h>

static const short attr = _MMTR_PROCESSOR_COUNT;

int main( void )
  _MMTR_Template_T template;

  template.Options.Template_Size = sizeof(_MMTR_Template_T);
  _MATMATR1( &template, &attr );
  printf( "Number of CPUs = %d\n",
          (int)template.Options.Data.InstProcCount.numProcessors );
  return 0;

Bob Donovan/Rochester/IBM,   Rochester, MN   (507) 253-4036

jamesl@hb.quik.com@midrange.com on 10/12/2000 04:48:38 PM

Please respond to MI400@midrange.com

Sent by:  owner-mi400@midrange.com

To:   MI400@midrange.com
cc:   jamesl@hb.quik.com
Subject:  MATMATR 01DC

Fellow Programmers:

I'm looking for a way to get the number of CPUs on a
system (to close a big
loophole in our customer license checking routines),
and I've been directed to
the MATMATR instruction (which I haven't yet had
to use in over six years of MI
programming!), function 01DC (which naturally
isn't documented in my V2R3 MI

Could somebody please give me a
hand with this function? It could be a while
before I can convince the boss
to spring for a more current MI manual.

James H. H. Lampert

| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.