BLISS-36 User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
BLISS-36 User's Guide Order No. AA-H712D-TK February 1984 This document describes the BLlSS-36 compiler and its use, gives basic information about linking, executing, and debugging BLlSS-36 programs, and describes BLlSS-36 machine-specific functions, BLISS tools, and other topics relevant to BLlSS-36 programming. SUPERSESSION/UPDATE INFORMATION: BLlSS-36 V4(216) OPERATING SYSTEMS AND VERSIONS: TOPS-10 V7.01A TOPS-20 V5.1 (KL) TOPS-20 V4.1 (KS) SOFTWARE VERSION: BLlSS-36 V4(216) implementing BLISS language V4.0 digital equipment corporation · maynard, massachusetts First Printing, June 1979 Revised, September 1980 Revised, February 1982 Revised, February 1984 The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Cor~oration assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by Digital Equipment Corporation or its affiliated companies. Copyright 1979,1980, 1982, 1984 by Digital Equipment Corporation All Rights Reserved. Printed in U.S.A. The postpaid READER'S COMMENTS form on the last page of this document requests the user's critical evaluation to assist in preparing future documentation. The following are trademarks of Digital Equipment Corporation: DEC OIBOL RSTS DEC/CMS EduSystern RSX DEC/MMS lAS UNIBUS DECnet MASSBUS VAX DECsystem-lO MICRO/PDP-II VMS OECSYSTEM-20 Micro/RSX VT OECUS PDP DECwriter PDT ZK2260 HOW TO ORDER ADDITIONAL DOCUMENTATION In Continental USA and Puerto Rico call 800-258-1710 DIRECT MAIL ORDERS (CANADA) In New Hampshire, Alaska, and Hawaii call 603-884-6660 Digital Equipment of Canada Ltd. 940 Belfast Road In Canada call 613-234-7726 (Ottawa-Hull) Ottawa, Ontario K1G 4C2 800-267-6146 (all other Canadian) Attn: A&SG Business Manager DIRECT MAIL ORDERS (USA & PUERTO RICO)* DIRECT MAIL ORDERS (INTERNATIONAL) Digital Equipment Corporation Digital Equipment Corporation P.O. Box CS2008 A&SG Business Manager Nashua, New Hampshire 03061 c/o Digital's local subsidiary or approved distributor * Any prepaid order from Puerto Rico must be placed with the local Digital subsidiary (809-754-7575) Internal orders should be placed through the Software Distribution Center (SDC), Digital Equipment Corporation, Northboro, Massachusetts 01532 CONTENTS Page PREFACE v SUMMARY OF TECHNICAL CHANGES xv CHAPTER 1 TOPS-20 OPERATING PROCEDURES 1.1 COMPILING A BLISS PROGRAM ... 1-1 1.1.1 Command-Line Syntax · 1-3 1.1.2 Command-Line Semantics . · ........ 1-3 1.2 FILE SPECIFICATIONS . 1-4 1.3 COMMAND-LINE SWITCHES . · 1-5 1.3.1 Output Switches . 1-6 1.3.1.1 Syntax . .. ... · .... 1-7 1.3.1.2 Defaults . · 1-7 1.3.1.3 Semantics .. 1-7 1.3.2 General Switches . · .... 1-8 1.3.2.1 Syntax .. ... .. .. 1-9 1.3.2.2 Defaults ..... 1-9 1.3.2.3 Semantics . .. .. 1-9 1.3.3 Check Switch . · . 1-10 1.3.3.1 Syntax .. · . 1-10 1.3.3.2 Defaul ts . 1-10 1.3.3.3 Semantics 1-10 1.3.4 Terminal Switches · . 1-11 1.3.4.1 Syntax .... 1-11 1.3.4.2 Defaults . 1-11 1.3.4.3 Semantics 1-11 1.3.5 Optimization Switches 1-12 1.3.5.1 Syntax .... · . 1-12 1.3.5.2 Defaults . 1-12 1.3.5.3 Semantics . 1-13 1.3.6 Listing Switches . 1-14 1.3.6.1 Syntax . 1-14 1.3.6.2 Defaults .... 1-15 1.3.6.3 Semantics . 1-15 1.3.7 Reference Switches . · . 1-17 1.3.7.1 Syntax . 1-18 1.3.7.2 Defaults . 1-18 1.3.7.3 Semantics . 1-18 1.3.8 Environment Switches . 1-18 1.3.8.1 Syntax .. ... · . 1-19 1.3.8.2 Defaults . .. ... · . 1-19 1.3.8.3 Semantics . 1-19 1.3.9 Placement of Switches ..... 1-20 1.3.10 Switches and Default Module Switch Settings 1-20 1.3.11 positive and Negative Forms of Switches 1-22 1.3.12 Abbreviations of Switch and Value Names 1-22 1.4 SPECIAL FEATURES . 1-22 1.4.1 Indirect Files · . 1-22 1.4.2 EXEC Command . 1-23 CHAPTER 2 TOPS-I0 OPERATING PROCEDURES 2.1 COMPILING A BLISS PROGRAM · 2-1 2.1.1 Command-Line Syntax . · 2-3 2.1.2 Command-Line Semantics . · ........ 2-3 2.2 FILE SPECIFICATIONS · .... 2-3 2.2.1 Syntax . · 2-4 2.2.2 Semantics . w • • · 2-4 iii CONTENTS 2.2.3 Default Extension · ..... 2-4 2.3 OUTPUT SPECIFICATIONS 2-5 2.4 COMMAND-LINE SWITCHES . • . • . 2-6 2.4.1 Library Switches . · . 2-6 2.4.1.1 Syntax ..... · . 2-7 2.4.1.2 Defaults . • . · ..... 2-7 2.4.2 General SWitches . 2-7 2.4.2.1 Syntax .. · 2-8 2.4.2.2 Defau1 ts . .............. 2-8 2.4.2.3 Semantics · 2-8 2.4.3 Check SWi tch . · .... 2-8 2.4.3.1 Syntax ... .. 2-9 2.4.3.2 Defaults . .• 2-9 2.4.3.3 Semantics · 2-9 2.4.4 Terminal SWitches · 2-9 2.4.4.1 Syntax ... · . 2-10 2.4.4.2 Defaults . 2-10 2.4.4.3 Semantics . · . 2-10 2.4.5 Optimization SWitches .... · . 2-10 2.4.5.1 Syntax . ... · . • 2-11 2.4.5.2 Defaults . ... 2-11 2.4.5.3 Semantics · . 2-12 2.4.6 Listing SWitches ..... · . 2-12 2.4.6.1 Syntax . 2-13 2.4.6.2 Defaults .... 2-13 2.4.6.3 Semantics . · . 2-13 2.4.7 Reference SWitches . • . 2-15 2.4.7.1 Syntax ... 2-16 2.4.7.2 Defaults . · . 2-16 2.4.7.3 Semantics · . 2-17 2.4.8 Environment Switches 2-17 2.4.8.1 Syntax . .... · . 2-17 2.4.8.2 Defaults ............... 2-17 2.4.8.3 Semantics . · . 2-18 2.4.9 Placement of Switches 2-18 2.4.10 Switches and Default Settings . 2-18 2.4.11 positive and Negative Forms of Switches 2-20 2.4.12 Abbreviations 2-20 2.5 SPECIAL FEATURES . 2-20 2.5.1 Indirect Files . 2-20 2.5.2 Option File . 2-20 CHAPTER 3 COMPILER OUTPUT 3.1 TERMINAL OUTPUT · ..... 3-2 3.2 OUTPUT LISTING . · 3-3 3.2.1 Listing Header . · ..... 3-4 3.2.2 Source Listing . ... 3-5 3.2.3 Object Listing · 3-7 3.2.4 Source Part Options · . 3-10 3.2.4.1 Default Source Listing 3-11 3.2.4.2 Listing with LIBRARY/REQUIRE Information .. 3-11 3.2.4.3 Listing with Macro Expansions ... 3-11 3.2.4.4 Listing with Macro Tracing . .. 3-11 3.3 CROSS-REFERENCE LISTING . 3-16 3.3.1 Cross-Reference Header . · . 3-16 3.3.2 Cross-Reference Entries . 3-16 3.3.3 Output Listing with Cross-Reference Listing 3-20 3.4 COMPILATION SUMMARY . 3-22 3.5 ERROR MESSAGES . 3-22 CHAPTER 4 LINKING, EXECUTING, AND DEBUGGING 4.1 LINKING ........ 4-1 iv CONTENTS 4.1.1 Syntax . • . 4-2 4.1.2 Defaults . • 4-2 4.1.3 Semantics .. 4-3 4.2 EXECUTING .• 4-3 4.3 DEBUGGING · 4-3 4.3.1 Debug Example · 4-3 4.3.2 Other SIX12 Commands . · 4-4 CHAPTER 5 MACHINE-SPECIFIC FUNCTIONS 5.1 GENERAL CONVENTIONS 5-1 5.1.1 Machine Code Insertion Functions • 5-1 5.1.2 Logical Functions 5-3 5.1.3 Arithmetic Functions 5-3 5.1.4 System Interface Functions 5-3 5.2 ADDD (ADD DOUBLE OPERANDS) 5-3 5.3 ADDF (ADD FLOATING OPERANDS) 5-4 5.4 ADDG (ADD FLOAT-G OPERANDS) 5-4 5.5 ASH (ARITHMETIC SHIFT) 5-5 5.6 CMPD (COMPARE DOUBLE OPERANDS) 5-5 5.7 CMPF (COMPARE FLOATING OPERANDS) 5-5 5.8 CMPG (COMPARE FLOAT-G OPERANDS) 5-6 5.9 COPYII, COPYIN, COPYNI, AND COPYNN (COpy A BYTE) 5-6 5.10 CVTDF (CONVERT DOUBLE TO FLOATING) 5-6 5.11 CVTDI (CONVERT DOUBLE TO INTEGER) 5-7 5.12 CVTFD (CONVERT FLOATING TO DOUBLE) 5-7 5.13 CVTFG (CONVERT FLOATING TO FLOAT-G) 5-7 5.14 CVTFI (CONVERT FLOATING TO INTEGER) 5-8 5.15 CVTGF (CONVERT FLOAT-G TO FLOATING) 5-8 5.16 CVTGI (CONVERT FLOAT-G TO INTEGER) 5-8 5.17 CVTID (CONVERT INTEGER TO DOUBLE) 5-9 5.18 CVTIF (CONVERT INTEGER TO FLOATING) 5-9 5.19 CVTIG (CONVERT INTEGER TO FLOAT-G) 5-9 5.20 DIVD (DIVIDE DOUBLE OPERANDS) 5-10 5.21 DIVF (DIVIDE FLOATING OPERANDS) 5-10 5.22 DIVG (DIVIDE FLOAT-G OPERANDS) 5-10 5.23 FIRSTONE (FIND FIRST BIT) • '. 5-11 5.24 INCP (INCREMENT A BYTE POINTER) 5-11 5.25 JSYS (INVOKE A TOPS-20 SYSTEM SERVICE) 5-11 5.26 LSH (LOGICAL SHIFT) 5-13 5.27 MACHOP AND MACHSKIP (EMIT AN INSTRUCTION) 5-13 5.28 MULD (MULTIPLY DOUBLE OPERANDS) 5-14 5.29 MULF (MULTIPLY FLOATING OPERANDS) 5-14 5.30 MULG (MULTIPLY FLOAT-G OPERANDS) 5-14 5.31 POINT (BUILD A BYTE POINTER) 5-15 5.32 REPLACEI AND REPLACEN (STORE A BYTE) 5-15 5.33 ROT (ROTATE A VALUE) 5-15 5.34 SCANN AND SCANI (FETCH A BYTE) 5-16 5.35 SUBD (SUBTRACT DOUBLE OPERANDS) 5-16 5.36 SUBF (SUBTRACT FLOATING OPERANDS) 5-16 5.37 SUBG (SUBTRACT FLOAT-G OPERANDS) 5-17 5.38 UUO (INVOKE A TOPS-I0 SYSTEM SERVICE) 5-17 CHAPTER 6 PROGRAMMING CONSIDERATIONS 6.1 LIBRARY AND REQUIRE USAGE DIFFERENCES 6-1 6.2 FREQUENT BLISS CODING ERRORS 6-2 6.2.1 Missing Dots 6-3 6.2.2 Valued and Nonvalued Routines 6-3 6.2.3 Semicolons and Values of Blocks 6-3 6.2.4 Complex Expressions Using AND, OR, and NOT 6-4 6.2.5 Computed Routine Calls 6-4 6.2.6 Signed and Unsigned Fields 6-4 6.2.7 Complex Macros 6-5 v CONTENTS 6.2.8 Missing Code .