Skip to content

Page 1

Program Description

Date: 88.07.29
Norsk Data A.S

Product Reg. no. Category
Name 2110371 STPR
PLANC for ND-110
compiling on ND-500/5000
Reason
x New version
x Error Correction
x Change/Addition
Documentation
Title Reg. no.
PLANC Reference Manual 60.117.5 EN
Purpose
Compile and execute PLANC programs
Prerequisites Computer Type Floating format Op. system Version
ND-500 all SIN III >= I
ND-5000 all SIN III >= I
Minimum permanent mass storage resources
User Userspace
SYSTEM 10 pages on
145 pages on
31 pages on

Reg. no. for Source
210370I

File Name Type Containing
DESCRIPTION-FILE DESC
SCRATCH-SEG-01 LINK
SCRATCH-SEG-01 DSEG
SCRATCH-SEG-01 PSEG
PLANC-100-I LINK PLANC-100 Compiler
PLANC-100-I DSEG PLANC-100 Compiler
PLANC-100-I PSEG PLANC-100 Compiler
PLANC-1BANK-I BRF Runtime System
PLANC-2BANK-I BRF Runtime System
PLANC-I HELP Version information
IN-PLANC-I PROG
IN-PLANC-I XCOM
IN-PLANC-I INIT

1 Note

\<rev> must be replaced by the current revision of the DIRECTORY or FILE. The revision level is found on the preceding "ND SOFTWARE LIBRARY DISKETTE" pages.

2 Errors Corrected

  • PLANC accepted expressions containing logical operators as actual parameters to routines only if given to the routine as the last parameter.
ooo  ND Norsk Data  ooo

Page 2

Norsk Data A.S Program Description

Date: 88.07.29
Page: 2 of 9

Product Name Reg. no. Category
PLANC for ND-110 2110371 STPR
compiling on ND-500/5000
  • PLANC did not give an error message when a label was declared twice within the same routine.
  • PLANC did not accept integer expressions as actual parameters to the Monitor_Call statement.
  • Output with AL-format, where the width given in the format descriptor was less than the length of the BYTES to be output, did not function properly.
  • Storing into equivalenced variables did not always work properly.
  • Error messages given while in the command processor were not always terminated by CR and LF.
  • When storing into variables of type enumeration, PLANC now checks that the enumeration value to be stored is of the same type as the variable to be stored into.
  • In error messages, PLANC sometimes indicated that the line number where the error occurred was zero (ERROR at MYROUT.O). This could happen if the error occurred inside a macro or inline routine, and there had been an $INCLUDE before the error.
  • The list file got an erroneous layout when the source file in the compile command was 1 (TERMINAL), unless the list file also was 1.
  • Named integer constants were treated differently from integer literals in relational expressions.
  • When a module was not terminated properly, the PLANC compiler did not exit even after $EOF/$EXIT was given the second time.
  • PLANC did not count the number of lines properly in files where $EOF/$EXIT was missing.
  • If a routine was declared to have an out-value, but no return statement was present, PLANC gave a warning, but it did not insert a dummy RETURN to avoid problems with the instruction sequence.
  • PLANC accepted expressions of the form Size(i,1), even if the Size standard routine only takes one parameter.
  • PLANC sometimes miscalculated the number of bits necessary to hold variables of type integer range (in packed records).
ooo ND Norsk Data ooo

Scanned by Jonny Oddene for Sintran Data © 2011


Page 3

Program Description

Date

Date: 88.07.29
Norsk Data A.S

Page: 3 of 9

Product

Product Name Reg. no. Category
PLANC for ND-110 compiling on ND-500/5000 211037I STPR

Error Messages and Issues

  • When an inline routine was invoked inside another inline routine, PLANC gave an error message (as it should), but then it crashed.
  • PLANC did not accept Ind(<INTEGER POINTER>) or an INTEGER parameter to ROUTINE STANDARD/REFERENCE as parameters to the Monitor_Call statement, even if an INTEGER parameter was expected.
  • PLANC gave no warning/error message when the following code was compiled, even if the INTEGER had not been given any name:
    MODULE xxx
    INTEGER:
    ENDMODULE
    $EOF
    
  • PLANC gave no error message for the code:
    TYPE x = x
    
  • PLANC did not allow you to initialize a record declared inside a routine, even if it was declared as READ only.
  • PLANC crashed if an INLINE ROUTINE was declared inside a macro.
  • PLANC did not handle INLINE ROUTINE properly if they were declared with the new routine header.
  • If a routine pointer was initialized with Addr(NoName), where NoName was not declared, PLANC gave a very misleading error message.
  • PLANC allowed type definitions before the first MODULE statement in a file, but not between ENDMODULE and the next module in the file.
  • PLANC did not evaluate constant expressions when the constants were of type ENUMERATION.
  • PLANC did not allow you to use the syntax
    5 =: Ind(rp)
    instead of
    5 Ind(rp)
    
    when rp was a pointer to a routine with invalue.
  • PLANC generated incorrect code for the following statement:
    'ABC'//Ind(<BYTES POINTER ARRAY>(<VARIABLE>))=:BYTES
    
  • PLANC did not give any warning/error message for an import statement outside the outermost module, even if it could not handle the imported variable/routine later on.
ooo  ND Norsk Data  ooo

Page 4

Norsk Data A.S Program Description

Date: 88.07.29
Page: 4 of 9

Product Name Reg. no. Category
PLANC for ND-110 compiling on ND-500/5000 211037I STPR
  • PLANC did not allow you to import the same overloaded routines to more than one module in the same compilation.
  • Local arrays in routines within records caused PLANC to make incorrect code on the ND-100.
  • PLANC gave no error message when trying to create a BYTES with negative lower bound on the ND-100, using the NEW standard routine.
  • The Size standard routine did not return the correct size of a packed array of BYTE/INTEGER1 in PLANC-100, if the array had an odd number of bytes.

3. Modifications, New Features

  • Routines as components in records:
    TYPE x = RECORD
      ROUTINE VOID,VOID: a
      % Inside the record, THISRECORD may be
      % used to refer to the record itself
      ENDROUTINE
    ENDRECORD
    
  • New syntax for routine heading:
    ROUTINE VOID,VOID(INTEGER: a,b,c; BOOLEAN: d): x
    ENDROUTINE
    
  • Matching after ENDROUTINE:

    ROUTINE VOID,VOID: a
    ENDROUTINE a
    

    This will compile without any warnings/errors, because the name after ENDROUTINE matches the routine name.

  • Unsigned integer variables, e.g. INTEGER1 UNSIGNED is equivalent to INTEGER RANGE(0:255).
  • Underscores in integer constants to improve readability, e.g. INTEGER2: Bit_Pattern := 2#1101_1001_0000_0110#
  • String constants, e.g. CONSTANT TheVeryBest = 'PLANC'.
  • Private/public variables in objects:

    In a record declaration, you may specify which components are to be accessible, by writing the word PUBLIC followed by the list of identifiers which are to be accessible, as the first statement inside the record declaration. If no PUBLIC-statement is present, all variables are public by default. Only public components may be initialized when variables of the record type are declared. Overloaded routines within a record will be either all private or all public.


Page 5

Norsk Data A.S Program Description

Product Information

Product Name Reg. no. Category
PLANC for ND-110 compiling on ND-500/5000 211037I STPR

Features

  • On/Off Commenting Style:
    • Outside string literals, comments may now be started with a left parenthesis followed by a percent character, i.e. (%.
    • This type of comment continues until PLANC finds a percent character followed by a right parenthesis, i.e. %).
    • Comments may continue over several lines, may be nested, or may be placed within statements.
  • No Warning 'Not Assigned Value':
    • For variables which are not referenced.
  • Hexadecimal Input/Output of Integers:
    • This is done by giving the format ‘H’ as parameter, e.g.
    • Output(1,'H',63) ⇒ 3F is output
  • Converting a Record to Bytes:
    • rec CONVERT BYTES =: str
    • Str is given the value of the components of rec, as a sequence of bytes, with the first byte of the record in the first byte of str.
  • Priority for Routines:

    • The user may specify routines to have a priority equal to one of the operators in PLANC, e.g.
    ROUTINE BOOLEAN, BOOLEAN(BOOLEAN): mypluss(b) PRIORITY +
    % Mypluss will have the same priority as %
    % + in expressions. %
    ENDROUTINE
    
  • $EOF Not Necessary on Include Files:
    • It is now possible to leave out the $EOF command at the end of include files. When PLANC reaches the end of the include file, it will react as if a $EOF command was present.
  • New Routine Modifier XARGs:
    • Allows calls with a variable number of parameters.
  • New Routine Modifier MAINSTART:
    • Allows UNIX parameters (argc, argv, envp) with types (integer, byte pointer pointer, byte pointer pointer pointer).
  • $CPU-EXTENSION Command:
    • Expects an argument which is an integer literal in the range 0:3. If you give any other argument, PLANC will now list the alternatives and their meaning.
  • $MESSAGE-TO-TERMINAL Command:
    • The message was always converted to uppercase. In PLANC-I, the message is output without converting the message to uppercase, unless the source file (in the compile command) is unit 1 (terminal).
ooo ND Norsk Data ooo

[Scanned by Jonny Oddene for Sintran Data © 2011]


Page 6

Norsk Data A.S Program Description

Product Name Reg. no. Category
PLANC for ND-110 211037I STPR
compiling on ND-500/5000
  • When passed as parameters to macros within macros/inline routines, string literals were converted to uppercase.
  • Special characters allowed before macro parameters in macro body:

    $MACRO Pluss5(n); 5+ "n"=:"n" $ENDMACRO
    

    In PLANC-H, you had to use spaces before macro parameters, thus:

    $MACRO Pluss5(n); 5+ "n"= : "n" $ENDMACRO
    

    to avoid +” being interpreted as one token. In PLANC-I, you can leave out the spaces, but as a consequence, routines whose names contain one or more quotes (such as +”) cannot be used inside macros.

  • When a statement continued on a new line, the ampersand character (&) and the percent character (%) were not allowed as the first character on the new line, except inside string literals.
  • A percent character (%) immediately followed by another percent character was not allowed, except inside string literals.
  • Space not necessary after commands in expressions, e.g.

    CONSTANT Exon500=(§Target-Machine=500)
    $DATE=:string
    
  • Optimizations, improvements, and various adjustments.
  • Improved error-diagnostic system.
  • Some new commands are implemented, and the action of some existing commands extended:

    Arguments on command line:

    @PLANC-100-I COMPILE MYSOURCE,MYLIST,MYCODE
    

    is equivalent to

    @PLANC-100-H *COMPILE MYSOURCE,MYLIST,MYCODE
    

    and

    @PLANC-100-I LIST ON;COMPILE MYSOURCE,MYLIST,MYCODE
    

    is equivalent to

    ooo  ND Norsk Data  ooo
    

Page 7

Program Description

Date Norsk Data A.S Page
88.07.29 PROGRAM DESCRIPTION 7 of 9
Product Name Reg. no. Category
PLANC for ND-110 2110371 STPR
compiling on ND-500/5000

@PLANC-100-H

  • *LIST ON
  • *COMPILE MYSOURCE,MYLIST,MYCODE

Unless your source file name is equal to (an abbreviation of) a compiler command, you can leave out the COMPILE command in the first example:

@PLANC-100-I MYSOURCE,MYLIST,MYCODE

<Command>, ++/--

You may now use ++ and -- as parameters to some commands, in addition to the parameters ON or OFF. ++ increments a level counter for the command, while -- decrements the counter. The command is switched ON when the level counter is >= 1. Use HELP <CR> to see which commands ++ and -- may be used with.

$GET-VALUE_<command>

May be used to get the current value of command, e.g.
$IF $GET-VALUE LIST $THEN % Listing is on.

In the command processor, the value is output to the terminal (ON/OFF or an integer value), while during compilation $GET-VALUE returns TRUE/FALSE or an integer value. $GET-VALUE may be used with the same commands as ++ and --, plus CPU-EXTENSION and TARGET-MACHINE. The last two commands return an integer value.

Extensions to $HELP_command

You may now give a parameter to the help command, which is an abbreviation of one or more commands. Help then lists only commands which may be abbreviated to the parameter given. $HELP now also lists the current value (if one exists) for a command. This applies to the commands listed under $GET-VALUE above.

$EXIT_abort

Will set the completion code to 4095 (= 7777B), i.e. FATAL ERROR DURING COMPILATION/LOADING before exiting.

$EXIT_warnings

Will set the completion code to 0 before exiting, unless there were errors during compilation. Thus warnings are ignored in the completion code, while errors will still give a completion code > 0. All errors/warnings will still be listed and included in the summary at the end of the compilation.

ooo ND Norsk Data ooo

Page 8

Norsk Data A.S PROGRAM DESCRIPTION

Date Page
88.07.29 8 of 9
Product Name Reg. no. Category
PLANC for ND-110 compiling on ND-500/5000 211037 I STPR

$EXPAND-MACROS_ON/OFF/++/--

Will give you the expanded version of a source line containing macro invocations on the listing. Macros within inline routines are not expanded. This command has lower priority than $EXIT, thus $EX still means $EXIT.

$VERSION-INFORMATION

Will tell you where you can find a file containing most of the information in this PROGRAM DESCRIPTION, i.e. new features, modifications, and errors corrected.

$GENERATE-IMPORTS_{file_name}

When this command is given prior to compiling a source file, the compiler will generate import statements for all the exported identifiers in the source file. Note that if you export user-defined types, then the type definitions will also be written to the import file. The default file type for the import file is :IMPT.

$LONG-NAMES_ON/OFF/++/--

May be used to set the length of identifier names to 16 characters. $LONG-NAMES OFF sets name-length back to the default 10 characters. When using library routines, you should not invoke these with names longer than 10 characters, to avoid undefined entries during loading.

  • Some new warning messages are introduced:

    'NOT IMPLEMENTED "STACKERROR"'
      No further explanation.
    
    'NOT IMPLEMENTED "RANGEERROR"'
      No further explanation.
    
    'String literal continues on new line'
      Strings which are neither terminated by an apostrophe (') nor an ampersand (&) on the current line.
    
    'Control identifier modified'
      In a FOR-loop if the control variable is explicitly modified.
    
    'Invalid argument'
      Bad command argument (in PLANC-H, the error message was '?').
    
    'Write Access Not Allowed'
      In assignment to variables without write access.
    

ooo ND Norsk Data ooo


Page 9

Program Description

Date 88.07.29 Norsk Data A.S Page 9 of 9
Product Name Reg. no. Category
PLANC for ND-110 PLANC for ND-110 compiling on ND-500/5000 211037I STPR

4. Installation Procedure

  • Enter the directory named 211037I-XX-01D and do as follows:
@CC Either
@CC - Using the installation program from user SYSTEM:
@{211037I<rev>-XX-01:FLOPPY-USER}IN-PLANC-I<rev>
@RELEASE-DIRECTORY_211037I<rev>
@CC or
@CC - Manually:
@CC Installation of the runtime system:
@COPY-FILE "PLANC-1BANK-I<rev>:BRF"
SOURCE FILE: {211037I<rev>-XX-01:FLOPPY-USER}PLANC-1BANK-I<rev>:BRF
@CC
@COPY-FILE "PLANC-2BANK-I<rev>:BRF"
SOURCE FILE: {211037I<rev>-XX-01:FLOPPY-USER}PLANC-2BANK-I<rev>:BRF
@CC
@CC Installation of the compiler domain:
@CC
@LINKAGE-LOADER
ND-Linkage-Loader - x
N11:ABORT-BATCH-ON_ERROR_OFF
N11:DELETE-DOMAIN_PLANC-100
N11:COPY-DOMAIN
SOURCE DOMAIN: {211037I<rev>-XX-01:FLOPPY-USER}PLANC-100-I<rev>
DESTINATION DOMAIN: "PLANC-100-I<rev>"
N11:EXIT
@CC Procedure for making the PLANC-100-I<rev> a standard domain:
@CC Now, you must be user SYSTEM!
@END
ND-500 MONITOR Version x
N500:DEFINE-STANDARD-DOMAIN_PLANC-100-I<rev>,PLANC-100-I<rev>
N500:EXIT
@CC Now, the PLANC compiler can be started as follows:
@PLANC-100-I
@CC or:
@ND_PLANC-100-I
@CC Installation of the version-information file:
@CC Now, you should be user SYSTEM!
@COPY-FILE "PLANC-I:HELP"
SOURCE FILE: {211037I<rev>-XX-01:FLOPPY-USER}PLANC-I:HELP
ooo ND Norsk Data ooo
Scanned by Jonny Oddene for Sintran Data © 2011

Page 10

ND Software Library Diskette

Containing

PLANC for ND-110
compiling on ND-500/5000

Directory

  • Page: 1
  • Directory Name: 211037101-XX-01D

User Information

  • User Name: FLOPPY-USER

File Details

No File name Type T Public Friend Own Pages Bytes
0 DESCRIPTION-FILE DESC I R R RWACD 9 22528
1 SCRATCH-SEG-01 LINK I RWACD RWACD RWACD 1 0
2 SCRATCH-SEG-01 DSEG I RWACD RWACD RWACD 2 1029
3 SCRATCH-SEG-01 PSEG I RWACD RWACD RWACD 2 5
4 PLANC-100-I01 LINK I RWACD RWACD RWACD 9 15233
5 PLANC-100-I01 DSEG I RWACD RWACD RWACD 51 885579
6 PLANC-100-I01 PSEG I RWACD RWACD RWACD 85 171434
7 PLANC-1BANK-I01 BRF I RWACD RWACD RWACD 15 28028
8 PLANC-2BANK-I01 BRF I RWACD RWACD RWACD 16 30236
9 PLANC-I HELP I RWACD RWACD RWACD 10 14892
10 IN-PLANC-I01 PROG I RWACD RWACD RWACD 66 191982
11 IN-PLANC-I01 XCOM I RWACD RWACD RWACD 15 27248
12 IN-PLANC-I01 INIT I RWACD RWACD RWACD 11 13099

13 files using 292 pages. 600 pages reserved out of 610 pages.


Scanned by Jonny Oddene for Sintran Data © 2011