PROGRAMMER's UTILITIES GUIDE for CONCURRENT™ DOS 86 EXPANDED MEMORY (XM) First Edition. November 1986 1065-2043-001
Total Page:16
File Type:pdf, Size:1020Kb
PROGRAMMER'S UTILITIES GUIDE FOR CONCURRENT™ DOS 86 EXPANDED MEMORY (XM) First Edition. November 1986 1065-2043-001 COPYRIGHT Copyrighl © 1986 Oogolal Research All roghlS reserved No part of I hos p11hloca11011 111.ty be reproduced. lransrn11ted. transcribed. stored 1n a 1ct11cval svstcnl. or lrJnsl(jrecf into any language or computer language, '" any fornl or by any means. elcc1ron11: mechanical, magnetic. optical. chemical manual. or otherw1su. w11hout the p11or wr1Uen pernussoon of Digital Research. 60 Garden Co11rt. Bo• DAI. Mon1c1ey. Calolornod 93!142 DISCLAIMER DIGITAL RESEARCH MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE CONTENTS HEREOF ANO SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE Further.. Oogital Research Inc: reserves the right lo revise tho,; puhlocaloon and to ma~e changes lro;n time to time in lhe c:onlenl hereof wolhout olJligaloon of Digital Research Inc: to notify any person of suc:h rev111on or changes NOTICE TO USER This manual should nol be conslruetl as any represenlalion .,,r wdrranty with respect to lhe sollware named herein Occasionally changes or variations exist on ihe software that are not reflected in the mdnual Generally. ii such changes or variations are •nown to exill end to effect the product s1yn1l1cantly, e release note or REAOME DOC lile accompanies lhe manual and dislrobutoon do5Usl In thal event be sure lo read the release nole or REAOME DOC file before using lhc product TRADEMARKS Digital Research. CP/M· 86. and the D1911al Research logo are registered trademarks of Digital Research Inc: Concurrenl. and Concurrenl DOS 86. LIB-86. LINK-86. MP/M· 86. Pl/1-86. RASM-86. SID· 286. and XREF-86 are lrademarks of Digital Research We Make Compulers Worl is a service mark of D1911ul Research Inc lnlel is a regoslered trademark of Intel Corporal ion MCS ·86 is a lratlemark of Intel Corporation Foreword The e!<;>gr_~mf!l~_(§ __ .Qtj!it_i~s_ Quide for Concurrent T~-_[~_QS 86 (cited as the Progra_~ITl-~(~J)jiliti~~ Guide) assumes that you are familiar with the Concurrent environment. It also assumes that you are familiar with the basic elements of 8086 and 80286 assembly language programming. The e_~Qf)_r~i:D_ryu~r's ___ Utilities Guicje describes the operation of the following Concurrent DOS 86 native mode (CMD files) and PC DOS mode (EXE files) utilities: RASM-86™ Assembler for 8086, 80186, and 80286 assembly language that produces relocatable code in the Intel® Object Module Format. XREF-86™ Utilhy used with RASM-86 to produce a cross reference listing of the symbols used in a program. LINK-86™ Linkage editor that combines relocatable object modules and libraries to create executable files. LIB-86™ Utility that creates and maintains libraries of object modules for use with LINK-86 SID-86™ Symbolic Instruction Debugger used to test ·and debug object module code. The operation of the native mode and PC DOS mode versions of each utility are nearly identical; any specific differences are clearly documented. Since Concurrent DOS 86 supports both its native mode operating system calls. and PC DOS system calls. it is imperative that you not intermix the two modes in an executable module. That is, a PC DOS program (.EXE file) should not contain any calls to Concurrent DOS 86 native mode system calls. Likewise, a program written for the native mode (.CMD file) should not contain any PC DOS system calls. iii Typographical Conventions This guide uses the following notation to describe commands command parameter [option] A command is any of the commands described in this guide. fl parameter can be a filename. an address location. or any specifier tha1 is particular to the command. Optional items, such as command options or additional filenames, appear inside square brackets. Words joined by an underscore (_) represent a single command item or field. Examples of specific usage of a command are preceded by an A> prompt, and the user's input appears in bold print. For example A>;rasrri86 test illustates a specific usage of the RASM86 command. Characters used to represent values or variables in a command or instruction syntax may also appear in bold print in the text in which they are described. iv Contents 1 The RASM-86 Assembler 1.1 Introduction . 1-1 1.2 RASM-86 Operation . 1-1 1.3 RASM-86 Command Syntax . 1-1 1.3.1 RASM-86 Run-Time Parameters . 1-2 1.3 2 RASM-86 Command Line Examples. 1-4 1.4 Stopping RASM-86. 1-6 2 Elements of RASM-86 Assembly Language 2.1 Introduction . 2-1 2.2 RASM-86 Character Set . 2-1 2.3 Tokens and Separators. 2-2 2.4 Delimiters. 2-2 2.5 Constants. 2-3 2.5.1 Numeric Constants . 2*"4 2.5.2 Character String Constants. 2-5 2.6 Identifiers. 2-6 2.6.1 Keyword Identifiers. 2-6 2.6.2 Symbol Identifiers. 2-8 2.6.3 Example Identifiers . 2- rn 2.7 Operators. 2-10 2.7.1 Arithmetic Operators. 2-12 2.7.2 Logical Operators . 2-14 2.7.3 Relational Operators . 2-14 2.7.4 Segment Override Operator. 2-15 2.7.5 Variable Manipulation Operators............... 2-16 276 Variable Creation Operators. 2-17 2.7.7 Operator Precedence 2-18 2.8 Expressions 2-20 v Contents 2.9 Statements. 2-21 2.9.1 Instruction Statements . 2-21 2.9.2 Directive Statements. 2-22 3 RASM-86 Directives 3.1 Introduction . ............... 3-1 3.2 Assembler Directive Syntax.' ..................... 3-1 3.3 Segment Control Directives ...................... 3-2 3.3.1 The 8086/80286 Segmented Architecture ....... 3-2 3.3.2 CSEG, DSEG. ESEG. and SSEG Directives ........ 3-3 3.3.3 GROUP Directive. ............ 3-8 3.4 Linkage Control Directives .. 3-8 3.4.1 END Directive ...... 3-9 3.4.2 NAME Directive 3-9 3.4.3 PUBLIC Directive ........ 3-9 3.4.4 EXTRN Directive 3-10 3.5 Conditional Assembly Directives .. 3-10 3.5.1 IF, ELSE. and ENDIF Directives. 3-1 1 3.6 Symbol Definition Directive . ........... 3-12 3.6.1 EOU Directive ............................ 3-12 3.7 Data and Memory Directives. 3-13 3.7.1 DBDirective............ ......... 3-13 3.7.2 OW Directive. 3-14 3.7.3 DD Directive . 3-14 3.7.4 RSDirective .............................. 3-15 3.7.5 RBDirective .............................. 3-15 3.7.6 RW Directive. 3-15 3.7.7 RD Directive . 3-16 3.8 Output Listing Control Directives 3-16 3.8.1 EJECT Directive ............. 3-16 3.8.2 NOIFLIST/IFLIST Directives 3-17 3 8.3 NOUST and LIST Directives. 3-17 3.8.4 PAGESIZE Directive ...... 3-17 3.8.5 PAGEWIDTH Directive 3-17 3.8.6 SIMFORM Directive . 3-17 3.j3] _lJTLE Directive 3-18 vi Contents 3.9 8087 Control Directives 3-18 3.9.1 HARD8087 Directive 3-18 3 9.2 AUT08087 Directive 3-18 3.10 Miscellaneous Directives. 3-19 3.10.1 INCLUDE Directive 3-19 3.10.2 ORG Directive . 3-20 I 4 RASM-86 Instruction Set 4.1 Introduction 4-1 4.2 RASM-86 Instruction Set Summary. 4-1 4.3 Instruction-definition Tables. 4-10 4.3.1 Symbol Conventions . 4-10 4.3.2 Flag Registers ....... 4-12 4.3.3 8086 Data Transfer Instructions. ...... 4-12 4.3.4 8086 Arithmetic. Logical, and Shift Instructions .. 4-15 4.3 5 8086 String Instructions ...... 4-24 4.3 6 8086 Control Transfer Instructions ....... 4-27 4 3 7 8086 Processor Control Instructions ....... 4-32 4.3 8 8087 Instruction Set . , ... 4-34 4.3.9 Additional 186 and 286 Instructions ....... 4-45 4.3.10 Additional 286 Instructions 4-46 5 RASM-86 Code-macro Facilities 5.1 Introduction 5-1 5.2 Invoking Code-macros . 5-1 5.3 Defining Code-macros ... 5-2 5 31 Formal Parameter List. 5-2 5.3 2 Code-macro Directives .. 5-4 5 3.3 Example Code-Macro Definitions .. 5-10 'Jlj Contents 6 XREF-86 Cross-Reference Utility 6.1 Introduction ....... 6-1 6.2 XREF-86 Command Syntax .. 6-1 1 LINK-86 Linkage Editor 7.1 Introduction . ............... 7-1 7.2 LINK-86 Operation . ............... 7-1 7.3 LINK-86 Command Syntax ........................ 7-2 7.4 Stopping -LINK-86 .............................. 7-3 7.5 LINK-86 Command Options ....................... 7-4 7.6 Command File Options .......................... 7-7 7.6.1 Command File Formats ..................... 7-7 7.6.2 FILL I NO FILL ............................. 7-10 7.6.3 HARD8087 ............................... 7-10 7.6.4 CODESHARED (Native-mode only) ............. 7-11 7.7 SYM File Options .............................. 7-11 7.7.1 LOCALS I NOLOCALS ...................... 7-11 7.7.2 LIBSYMS I NOLIBSYMS ..................... 7-11 7.8 MAP File Option ............................... 7-12 7.9 SEARCH Option. ............ 7-13 7.10 Input File Options ............................. 7-13 7. 11 1/0 Option. ...... 7-14 7.11.1 $C (Command) Option. ...... 7-15 7.11.2 $L (Library) Option. ..... 7-15 7.11.3 $M (Map) Option. ........... 7-16 7.11.4 $0 (Object) Option ............ 7-16 7.11.5 $S Symbol Option .... 7-16 7.12 The Link Process ..... 7-17 7.12.1 Phase 1 - Collection ... 7-18 7.12.2 Phase 2 - Create Command File 7-23 Viii Contents 8 LIB-86 Library Utility 8.1 Introduction . 8-1 8.2 LIB-86 Operation . 8-1 8.3 LIB-86 Command Syntax. 8-2 8.4 Stopping LIB-86 . 8-2 8.5 LIB-86 Command Options.