DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦c002b5c19⟧ TextFile

    Length: 48384 (0xbd00)
    Types: TextFile
    Names: »corecodeman«

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦this⟧ »corecodeman« 
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦this⟧ »corecodeman« 

TextFile

\f





H. C. Ørsted Institute
Computer Department
Universitetsparken 5
DK-2100 København Ø






                      HCØ RC8000 algol8 library
                          core code system
                            "corecodeman"









                           Anders Lindgård
 



















                                               80-5 

                                               1980-11-20


                                               
\f


                                                                    1


Copyright 1980 Anders Lindgård.
For the time being this procedure set can be used freely for research
or other nonprofit purposes. Any other use demands written permission
from the author.



Core code system
------------------------

  In  some  applications it is essential to optimize the speed of the
code and at the same time keep the number  of  segment  transfers  as
low  as  possible.  External slang coded procedures are not practical
if the code fills mode than two segments  as  the  programmer  cannot
prevent  segment  transfers.  It  is however very convenient to write
most of a program in a high level language. This system  is  designed
to give a programmer a possibility for using rather large slang coded
parts in an algol program.


  On algol level the system consist of three parts:

          A  user  declared  array  holding  the  binary  code  to be
executed and addresses of variables, expressions etc.
          An algol procedure "initcode" which initializes  the  array
with the code taken from a backing store area and with addresses.
          An algol procedure "callcode" which makes jumps to the code
at specified relative addresses.

  In  this  way  an algol program is no longer self contained, but it
is possible to retranslate the slang code part without  retranslating
the algol program.
\f


                                                                    2


                                                           1980-11-20
                                                      Anders Lindgård




                     integer procedure initcode




  Loads  an  array  with the preassembled slang code from the backing
store. The addresses for all parameters and  some  information  about
the core code and the surroundings is stored in the array.

Call: initcode(A,name,sourcelist)
      initcode        (return value, integer).
                      The  number  of  bytes  in  the  array used for
                      addresses, constants and code.
      A               (call and return value, <any type> array).
                      The array whic hold  the  code  and  constants,
                      adresses etc. See below.
      name            (call value, string).
                      The name of file holding the preassembled code.
      sourcelist      (call value, list of <any type> of parameters).
                      The source parameters.



If  a  source  parameter  is  an expression the value is computed and
stored in A. An integer expression uses 2 halfwords. A relal or  long
expression  uses 4 halfwords. The procedure has no way of determining
whether the user needs a result of another type than the type of  the
expression,  so  all  type conversions must be done explicitly by the
user.
  A constant uses 2 or 4 halfwords according to its type
  In the algol system addresses of arrays are odd and points  to  the
first  halfword in the array. The procedure delivers all addresses as
even i.e. the last bit of an address is allways set to zero.

Error messages
--------------

***<name> <result>
   The file described by <name> could not be connected.
   The result of create area process is shown.
***claim 0
   The buffer claim was zero at entry to the code.



Language: SLANG
---------

Maintenance level: user
------------------
\f


                                                                    3


                                                           1980-11-20
                                                      Anders Lindgård




                     integer procedure callcode




  The procedure makes a jump to the code stored in the array A.

Call: callcode(A,relative)
      callcode        (return value, integer). The content of working
                      register w1 at exit from the code.
      A               (call and return value, <any type> array).
                      The  array  which  holds  the  core  code.  See
                      initcode.
      relative        (call value, integer).
                      The relative address for the first  instruction
                      to be executed. See below.



The  entry address in the array A is calculated in the following way:

entry address:=base+entry point code+relative
where
base:=appetite+10
entry point code is the last byte of  word  9  in  the  tail  of  the
catalog entry for the file holding the code
appetite:=the number halfwords used for addresses and constants

Language: SLANG
---------

Maintenance level: user
------------------
\f


                                                                    4


The system on slang level
-------------------------
  After a call of initcode the array A contains the following:

first address in A

+ 0 undefined                                   return address)
+ 2 address of first instruction                base+entry    )
+ 4 halfword occupied by addresses,
    constants and expressions                   appetite      ) head
+ 6 address of running system                   RS base       )
+ 8 address of file processor                   fp base       )
+10 address of 1. parameter (even)
+12 address of 2. parameter (even)
.
.
+10+appetite           last constant or last result of an expression
+12+appetite=base 
    + 0                address of first assembeld instruction
    +entry             address of entry point
    +entry+relative    (relative undefined at call of initcode)
                       first instruction executed by callcode



  When callcode is entered the following is done:
The  return  address  is  stored  in the first word of A. The working
registers are initialized.


w0   0
w1   address of first word in A.
w2   appetite
w3   return address
At exit w1 is delivered as result of callcode.
\f

▶EOF◀