Digital PDFs
Documents
Guest
Register
Log In
AA-H531A-TE
May 1979
94 pages
Original
2.7MB
view
download
OCR Version
2.4MB
view
download
Document:
MICRO2 UsersGuide Jun79
Order Number:
AA-H531A-TE
Revision:
0
Pages:
94
Original Filename:
AA-H531A-TE_MICRO2_UsersGuide_Jun79.pdf
OCR Text
MICRO2 USER'S REFERENCE GUIDE MANUAL AA-H531A-TE June digital 1979 equipment corporation - maynard, massachusetts First The information and should Corporation. for any The software and this construed Digital Equipment that may described be document be errors may in not used is subject as a Corporation in in document this to change commitment appear this or copied only in is assumed for the Printing, by assumes June 1979 without Digital no notice Equipment responsibility document. is furnished accordance with under the a license terms of such license. No responsibility equipment that is not Copyright The postage requests preparing future The (C) prepaid document following are supplied use or DIGITAL 1979 by Digital READER'S the by CIOMMENTS wuser's reliability or its Equipment form on <critical the last evaluation page to trademarks of Digital Equipment Corporation: DECsystem-10 MASSBUS DECtape OMN I BUS PDP DIBOL 0s/8 DECUS EDUSYSTEM PHA UNIBUS FLIP CHIP RSTS FOCAL RSX INDAC TYPESET-8 DDT LAB-8 TYPESET-10 DECCOMM DECsystem-20 TYPESET-11 ASSIST-11 RTS-8 ITPS-10 TMS-11 LABS of assist documentation. DEC COMTEX software or Corporation DIGITAL COMPUTER of affiliated companies. this us in CONTENTS ¢ ¢ ¢ ¢ ¢« ¢ o o o & @ . . . . . ¢« « ¢« ¢« « + . PROGRAM STRUCTURE . . . . « e e e e e e o e e e e e IDENTIFYING THE RADIX . . . « . « « .+ MEMORIES . . « . e s s o o o » o e s Single Memory Program e e s e e e e e e Multiple-Memories « + & . . . . . « « « ¢« Mixing Memories . . . . . . . IDENTIFICATION PROVIDING A TITLE FOR YOUR PAGING W & ADDING A TABLE *» ADDING A VERSION NUMBER YOUR OF O\N [] COMMENTS DEFINING . . NN — . . NAMES . Spaces Upper . Length . . . . . . . . . . . . . . . . . s e o s e o . . ¢ ¢ ¢ e o o o e o o o« v ¢ o o o o @ . AND VALUES FOR ¢ i Lower . . . . . . . « . i FIELDS e e e e e e e e e e e e . . . . . . ¢ ¢ e ¢ ¢ o o o . . . . . . . . « .« . Case Limitation . . . . . . . . . . « . . Uniqueness of Names . . . . . . . . . « . . e e s s e s e e e . e e e s e e e e e s e o o o s e o o . o e The ol s . et ot o L] LUV N . . . . .2 .3 . . . . cxample . . . . . Case 1: Simple Default Case 2: Defaults The .ADDRESS The .FLOATOPARITY The . .DEFAULT Qualnfuer Ar VALUE —t . in Names and QUALIFIERS L & . . . MICROWORD NIDTH . FIELDS DEFINING NAMES . PROGRAM . CONTENTS PROGRAM SPECIFYING THE . and and & .VALIDITY Qualifier Counter . Values . Fnelds Qualifiers . .FLOATEPARITY qualifiers NAMES . 0verlapp|ng .NEXTADDRESS . . . . . . . « . . . . ¢« ¢ ¢ ¢ v o o v o . . . . . . ¢ ¢ . o« o « o« & . s . — PROVIDINC st . . N —— L] BIT NUHBERING |I T R R R I | UVVOInesssEWwWwNhD -~ . SPECIFYING THE NN — —d ot oot road et ot ot ot . NN DNDNDDNON —t ¢ w CHAPTER . ADDRESS SELECTION 2 WWWwUWULWwWwiwwwwwilwwwiwww . . . s o o o o e o o o CHAPTER TRANSLATION TO MICRO2 — et e\ D ONNNNORNNVEESTWN INTRODUCTION WWWWwWwwwwwiwwwwuwwww 1 oo\ EWN —~ CHAPTER A a . . . v | L] . . e e . e e e e e e e e e e . Ao WO — L] i . ol ol L] e . Expression . . . expressaon . . . . . . . . . . a Macro Multiple . Use Parameter . . . . . . . . . . Of . . Parameter Designators Macro-Calls Too Many or . Defunlt on Definitions MACRO-CALL Parameters . . as . . . e o . . o . . Desugnator . VM EswwwiNhnNn . MACRO-BODY Field-Values . . onUn MACRO-NAME \n\n\{\\n\n\n\n MACROS Nested Macro W N — c Value-Name Continuing & e Validity THit or e U \un . Names . THE THE . Indicators Field a . * . .. i . . ~ — N . . . « A Validity - * . N o DEFINING CHAPTER . EXPRESSIONS W th 0 . . . ~J Vo NN & With WW NN - . . Symbol Associating CHAPTER . . N ¢« Examples Associating o e [] Calls Contents VALIDITY ¢ « e L] Predefined WA . .« * e & o Field . . Expression- Names Value-names W . ¥l i | L . * . . . CHECKING £ | . Numbers o i o S EXPRESSIONS Function o i . ~N O EWwWN —~ i ol i ot oot et cod ol d EXPRESSIONS AND VALIDITY £ ! CHAPTER L Too few Parameters MICROINSTRUCTIONS THE . . . . e a Hucronnstructaon . Allocating a Microinstruction THE CHAPTER MICROINSTRUCTION Continuing 4 e e . . . . . ¢« ¢« ¢ ¢« v .« . . . . . . METHOD OF ALLOCATION Allocation . . e . can be 0 or l MICROWORD . . . . . . . . Indicating The size of . . . . . a bit . that . the address Constraints Within MIXING . Constraint Address Boundaries ALLOCATION MODES . .« o set . Constraints Terminating a Space . . . — oW OOV Constraints I I OO~ Ld Random Allocation SPACE WW Sequential ADDRESS sOSISI SIS SIS NI N L] . v ¢« = o o e NN - . SPECIFYING THE e DEFINING THE ] W INNNMMOMMOMNOMMOMDNONN -~ ALLOCATION BHAPTER 8 COMMUN ICATION COMMUNICATION PROGRAM COMMUNICATION . . . . . . . MICROPROGRAM DATA PATH . . . . . . « ¢ « « . . . . . . . . . Excerpt . . . . . . . . DEFINITIONS . . . . . . . . Excerpt . . . . . . . . DEFINITIONS . . . . . . . . . . . . . . . . . . . . . . . . . Program Diagram . . . . . . . e e e e e e c e e e e e e « . . . . e e e Program Diagram . . . . . . . . . . Program . . . . . . . . . . KEYWORDS IDENTIFICATION Program FIELD Program MACRO Program A . . \D\D\D\D\D\D\'D\D\D\D\D\D\D OO WN S WWNN — THE Excerpt SUBROUTINE Program . Excerpt ANOTHER SUBROUTINE Excerpt CONDITIONAL CHAPTER CHAPTER SAMPLE . . WAW 00O~~~ OO A CHAPTER . & W w — MEMORY ASSEMBLY 10. 1 THE . . 10-1 10. 2 CONDITIONAL ASSEMBLY BLOCKS CONDITIONAL . . . . . 10-2 10 -3 AN EXAMPLE . ASSEMBLY . . . . . . . . « o . . 10-2 10. A ANOTHER EXAMPLE . . . . . . . . . . . 10-3 10. 5 SETTING AND n MICRO2 11. 1 ASSEMBLER CHANGING EXPRESSION-NAMES LISTING AND INPUT CONTROLS . . . . . . . . . 11-1 . . . . . . . . 1-1 Formatting The Microprogram 11-2 Preparing The 11. 1. 2 . 10-4 Input 11. 1. 1 . LIST . . . . . 11. 1. 2. 1 The General . . . . . 11-2 ll 1. 2. 2 Microinstruction Format . . . . 11-2 .2 THE Format OUTPUT LISTING . . . . . . . . . . 11-2 Contents . . . . . . . 11-3 . . . . . . . . 11-3 . . . . . . . . 11-4 informaticn . . . . . 11-4 . e e e . 11-5 Llstnng e e e .2. 1 The Table Of .2. 2 Line Numbers . . . .2. 3 Page Headings . . . .2. L The Microword .2. 5 Error Messages . . .2. 6 The .2. 7 The Map Listing . . . . . . . . . . 11-6 The 11-7 ll 2. 8 Cross Reference . . . . . ¢« + ¢« « o o« @ FILE . . . . . . « ¢ « « . . 11-7 11 .3.1 The Header . . . . . . ¢ ¢ « o « & 1-7 11.3.2 The Code Section . . . .« . . 11-7 11.3.3 Field and Defunutnons . o . . 1 -3 1 b 11.4.1 THE Summary 11-5 ULD Address LIST CONTROLS The List . . Control . . e e e . . 11-8 11-8 Counters e e e e . 11-9 CHAPTER 12 USING MICRO2 12.1 VAX/VMS 12.2 DEC 10 File 12.2.1 12.3 20 . . 12-2 12-4 12-4 . INTERFACE MICRO2 LANGUAGE MICRO2 SYNTACTIC d 12-1 INTERFACE Specifications APPENDIX A SYNTACTIC SUMMARY SUMMARY W N - Restrictions Examples po—) Examples . A-3 . A-k Part . . A=k . . A-5 . A-5 . A-6 . A-8 . - A-9 . . A-9 Microinstructions . . A-10 . A-10 . A-10 - Examples . - . ELEMENTS Keywords . . Qualifiers . . . . . . . . . . . Separators INPUT INPUT THE OUTPUT ULD OUTPUT LISTING A-12 . A-12 LISTINGS . LISTING C SAMPLE APPENDIX D ERROR MESSAGES FILE ERROR MESSAGES . . WARNING MESSAGES FATAL A-11 . ERROR MESSAGES | THE B.2 AND . DN ——t . . Examples B.1 (= I = B - . Macro Definitions SAMPLE W N - A-3 . . - Expressions A-3 . . . Definition APPENDIX INDEX - . (o Bl o B o o . - Examples N = . . Restrictions The . [] NN B Defaults -l VWM EEWWNNN — — - — wnd The Program MICRO2 W N — & ot od s o & e e e ot ot ol o 35 2B _Jb _Jb _Jb BB _Jb B & b e ot ocnd ot vt @ BB _Bb e I APPENDIX [] p 2 B . NN s o _Jb 2 d o d b o . LINE g DEC INTERFACE COMMAND PREFACE Manual This Objectives manual introduces appendixes examples provides the contain of a MICR0O2 the a tutorial language reference input for and the gives section and output MICR02 examples for files, and the a assembler. of its use. MICRO2 It The language, listing of the error messages produced by MICRO2. intended Audience This manual is intended engineers. The reader and the characteristics microprograms are Structure of this This manual he fields process assembly, of language programmers and to be the hardware familiar with microprogramming architecture for which the MICRO2. The Document the language constructs are and macros is of output assembly assumed to be written. introduces identification efining for is allocation listings, and constructs presented discussed. is first. Then considered. the use of MICRO2 of Then the process of microinstructions rinally, and conditional is described. CHAPTER INTRODUCTION The MICRO2 language allows you names in The assembler to to define specifying MICR02 address converts absolute assembler In appropriate set of validity checking. you lay out 1.1 TRANSLATION branches To construct an objec: written appropriate bits are For field-name ALU bits, two and macros logical language the defined to bits identify 22 the following through then use these and the microprogram. translation and a microinstruction to assembler the valuable syntax the assembler helps interprets and uses program. a sequence of 19 source MICRO2 an effective manner. that defines the microwords of its of performs in in language functions: names within the assembler microprogram, example, by source to be performed by allocate storage in a in written The In assigning addresses, and microprogram field-names, fields translating the microword. for performs and the code. the actions selection. TO MICRO2 microprograms object names 1 are a names Names, source to bits within associated set called the with the or all field-definition: ALU/=<22:19> Names, of called value-names, the possible foilowing a connected SUB, field AND, field by OR, ALU, as the and SuB=1 AND=2 OR=3 A=l are for then defined the definition by a character '"s='", field. series For A are associated with foilows: ALU/=<22:19> ADD=0 values of to represent Value-names name example, and some are specified value pairs, the value-names the specified values for ADD, the INTRODUCTION TO MICRO2 Page 1-2 ’hen the following field-setting sets bits 22 through 19 to the wvalue L ALU/A in addition to this basic symbolically, macros functions of the given. For POP setting 1.2 and fields and thaz specific their notation values in which the field-settings, are it two lets types you microinstruction shown in is equivalent the macro definition, but is to more selection of of allocation, either SEQUENTIAL or RANDOM. select an address algorithm, set a CLKT1/YES" SELECTION llocation a to produce a ALU/A, within fields he address among refer to readable. performs Further, not "MEMFNC/STKRD, three ADDRESS MICRO2 microword, macro-call the convenient to example: STACK The above ability can be defined to for a microinstruction or leave assembler. |If you are wusing a RANDOM the you addresses can make assertions and M!CR0O2 will about select an the relationships appropriate set of addresses. 1.3 PROGRAM STRUCTURE The MICRO2 sequence a assembler of listing input file MICRO2 accepts In and line-oriented an object continuation Expressions Macro-bodies (o) Microinstructions each case input ogram radix the line to MICRO2 one describe the to be in processor, MICR02 source which accepts language and a produces module. lines in three cases: continued must have a '"," as its last character. ontain Then a written o (o) nonblank The is lines the or is more a source program. memories. apply to the entire way in which fundamental The A MICR02 program. The the direction and program unit, source program bit-numbering direction the memory, following radix it and can the sections are extablished. considered. INTRODUCTION TO MIiCRO2 Page 1.4 SPECIFYING THE BIT NUMBERING The .LTOR and keywords .RTOL numbered, define microword are whether to count form of the bit-numbering keyword from so the the way that when you left end or the line is in which define right the a 1-3 the bits of your field MICR0O2 knows the word. The end of keyword itself, namely: .LTOR .RTOL The .LTOR keyword directs MICRO2 numbered consider from left the bits to to right. numbered from consider The right .RTOL to the bits of keyword the microword directs For example, suppose you have a 16 bit word and you refer 12 through 15 |If you the bits numbered to right And MICRO2 considers bits the word. However, if are numbered And MICRO2 are of from that from right considers word. left 12 to bits through you left 12 as specify 15 specify M!CR02 to left. as as the the .LTOR to the bits keyword, then follows: the rightmost four bits .RTOL keyword, then the bits of follows: through 15 as leftmost four bits .LTOR assumed. of the word. If no bit-numbering MICRO2 uses direction the in keyword first which bit-numbering keywords is given, then .LTOR or .RTOL keyword it the bits are numbered and in the program. is finds to establish ignores any the subsequent INTRODLLTION TO }.5 In MICRO2 Page 1-4 tc the IDENTIFYING THE RADIX a source program, program radix MICRO2 considers and a which number an a number is The radix are identified simply radix The that in the is a of itself, point depends to to be to be an on the according always point interpreted following by numbers numbers decimal are set form the keyword with a decimal values some other interpreted appears. keywords. interprets considers without integer The program MICRO2 and a be decimal. decimal number integer. context The way in which it in according to the program chapters. either the .0OCTAL as follows: the and .0CTAL or .HEXADECIMAL .HEXADECIMAL keyword-line is .OCTAL .HEXADECIMAL If you include interpreted the I'f you as hexadecimal. The 1.6 any keyword, to any value in the program radix .HEXADECIMAL keyword, such can be radix set line subsequent only it once finds program in a the is values lines are program. to establish radix program interpreted in the the that as s octal. interpreted MICRO2 uses the program radix and program. MEMORIES program can be divided memories. be the program .gnores A include program radix first .0OCTAL according Except specified considered only to address-space, for into the as many as bit-numbering and seven once in a program, all belong to a memory. Each word-width, field- and sub-programs, program radix, other which constructs memory has its macro-definitions or can are own and microinstructions. 1.6.1 If Single Memory Program a program contains only one sub-program program and memory can be (memory) indistinguishable. then the notion of INTRODUCTION 1.6.2 TO MICRO2 1-5 Multiple-Memories If a is associated with program contains separate The Page a more than one particuliar sub-program, memory. You can of memory then each have as many sub-program as seven sub-programs. beginning of a memory-indicator section keyword. The the is memory-indicator specified by a keywords are as follows: .UCoDt .DCODE .ECODE . 1CODE .0CODE .CCODE .MCODE The identification, memory-indicator memory-indicator 1.6.2.1 definitions, and are up to associated with Mixing Memories - You memories in Yyour program. instruction decode memory (1) . the You symbolically can in either the can For (D) and write and instructions end of the switch an I I | 1 + .DCODE : (identification) ! (definitions) | ! | | + . 1CODE (identification) (definitions) ! ! | i | 1 | 1 i 1 or that another back and suppose you forth have a amor.g special instruction interpretation memory program two following diagram: + following program specified memory. example, the the in pieces as shown INTRODUCTION TO MICRO2 'r you can instruction group as the Page decode represented in .DLODE (identification) (definitions) .1CODE (identification) (definitions) .DCODE .DCODE . 1CODE the and interpretation following diagram: parts for 1-6 each CHAPTER PROVIDING MICRO2 includes access and directives Using title and subtitle for create table of contents, the a number of bits 2.1 PROVIDING The .TITLE the heading string as .TITLE title the has the microprogram, program inciude you a the paging and add comments for MICR0O2 FOR YOUR the a title 1listing. keyword at first line following easy to provide a the number, program, to the define program. PROGRAM supplies .TITLE of can version specify output of resulting directives, MICRO2 the top of of the to use as reproduces each page heading. part of the quoted of The your .TITLE form: "title-string" example, listing the part .TITLE The of the these the microword, keyword-line keyword-line For your A TITLE following listing in IDENTIFICATION that make understand. 2 supppose you give the following .TITLE line: "XYZ Machine' that appears as part of the heading on each page of your uses the text discards any is: XYZ Machine A title can given in subsequent be the specified only first .TITLE once .TITLE keyword-lines in a memory. keyword-line in it the memory. MICRO2 finds and PROVIDING IDENTIFICATION Page 2-2 ’.2 ADDING A VERSION NUMBER The .VERSION as part keyword-line of keyword-line the has supplies heading the of following a version the number output for MICRO2 listing. The to use .VERSION form: .VERSION/'""version-no" MICRO2 can prints be interprets output For the version-no as any MICRO2 it or subtitie part the |f version-no is radix prints program line as suppose you of number. according to the listing example, name a decimal give the subtitle. and The a version-no number, it MICRO2 on the the version number '8" numbar. following .VERSION line: .VERSION/"10" If the program radix in the 2.3 ADDING The .TOC Eable A TABLE OF supplies contents. MICRO2 ollowing the of .TOC keyword as the output Suppose you add .TITLE the "XYZ a following Machine reproduces listing to .TOC keyword-line - Version that the create an attractive .TOC lines the of You can sample add blank keywords you add the .TOC text a on following .TOC "Field the the table of next line to the in quotes of to your page of to have a .TOC .TOC the page program: your contents format null .ToC "' .TOC '*Macro Definitions" by for the indenting topics listing is: as at the listing. the text front of You can on the shown in the output contents by including in Appendix B. your table of string as keywords Dafinitions" keyword-lines contents subordinate "introductory Remarks" oc e second entry given 1B" program given lines that from table of indicate listing the an text Remarks provide to adds the of appears MICRO2 and part the subtitl~ subtitle listing. Remarks' your includes reproduces .TOC"Introductory Introductory .TOC MICR0O2 CONTENTS keyword-line of heading Then is octal, subtitle. to your text. For program: example, suppose PROVIDING IDENTIFICATION The table of null strings contents as in your output listing Page 2-3 by the is double spaced follows: ; TABLE OF CONTENTS | Iintroductory Remarks ;6 37 Field Definitions Macro Definitions ;24 12b The number number that appears assigned this line where the by number, in you referenced can PAGING YOUR PROGRAM The .PAGE keyword-line a To simply any text table of indicate string, to quickly a contents line in locate the a new listing entry and a new page, line the output is the listing. place in the page and, line Using listing appears. indicates contents as table of that information 2.4 provides each MICR0O2 you optionally, subtitle. include the .PAGE keyword without follows: .PAGE MICRO2 starts keyword on To start you .PAGE and A a You add starts a can a new the the output of add a text that listing page subtitle, and following and make string to using the text the table page, string a that the .PAGE an places the the .PAGE heading. in the table of keyword-line, entry as follows: in string of text-string is text followed string given as the subtitle contents. operationally by a equivalent .PAGE to a keyword without string. use as many that easy initially read is .PAGE microprogram to in line text keyword with keyword with text page '"text-string" includes .PAGE .TOC new first a new page, contents, MICRO2 a the paged and keywords so that in the each convenient to program topic as appears reference at you wish. A on a new page is a later time. PROVIDING IDENTIFICATION Page 2-U4 '.5 SPECIFYING THE MICROWORD WIDTH The .WIDTH keyword-line specifies the number of bits in the microword. A .WIDTH keyword-line consists of the keyword .WIDTH, followed by a slash and the number of bits in the word, as follows: WIDTH/number-of-bits The number given for number-of-bits a decimal bits, you number. Thus to is always interpreted by MICR02 as define a microword that consists of 64 include the following line in your microprogram: .WIDTH/6L The maximum value that can be given for number-of-bits MICR02 uses the first .WIDTH keyword-line it width of the microword for the memory and WIDTH keyword-lines If you don't specify field definitions. in 2.6 finds to establish the it rejects any subsequent the memory. the width, MICR0O2 deduces the word width from the It assumes the width of the word to be the value crmed by adding one to the f is 128. largest bit position specified in the set field-definitions. COMMENTS Comments can be included anywhere in the program. A with a ":" character and ends at the end of the line. comment begins You can enter full line comments by starting the line with a ";" character. You can add comments to lines by following the last character on the line by some spaces and the ";'" character. For examples of comments, see the sample program in Chapter 9. CHAPTER DEFINING The set can be of bits within can be defined value-names The that can simplest add that of a field AND to set VALUES that make name. semantic meaning be defined form FIELDS the microword associated with 3 the up a Further, to the particular a set of field and a for field qualifiers a set of field as field. field-definition defines name a follows: ALPHA/=<6:0> The above definition though 0 of The addition of as associates the field name ALPHA with bits 6 the microword. referenced value-definitions symbolically. For permits the field to be set as well example: ALPHA/=<6:0> Al=] A2=2 A3=3 The above dafinitions associate with and make 2, and A3 with 3 the value-name the following Al with the value field-setting 1, A2 possible: ALPHA/A2 The above field-setting microword to The addition of and the like. field-names sets the value A2 qualifiers The the field A (bits 6 through O0) of the (2). permit default following and value-names. sections settings, describe the parity adjustment, process of defining DEFINING FIELDS AND VALUES Page 3-2 ..1 DEFINING NAMES FOR FIELDS A field-definition consists followed by the with the field name form is: names are left-bit and beginning followed by by a list of left-bit:right-bit > and any valid MICRO2 given in the separator the word to one or { qualifier 3.2. are decimal right-bit end bits of specitfied right-to-left bit than left-to-right to the Qualifiers or bit the be '/=' associated more qualifiers. numbering, to the then the The ... The } rules for that identify numbers field numbering, equal , name. Section greater equal name ’ The field-name can be The the the biits within foliowed field-name /= < MICRO2 of position of forming in the microword. then the left-bit right-bit. left-bit must If you be less the |f you must be specified than or right-bit. are described in Section 3.3. 'onsider the following field-definitions: .RTOL .0CTAL A/=<] : 4> 3/-(3:0) C/=<T:3> D/=<2> E/=<1:0> These definitions identify the fields of the microword as shown in the following diagram: e -+ | A 2 B ! B it TETE PP R+ l c dommmmcm e As you see, you knows, for <ach bit of status (unset or set). gtate of v D B can define cverlapning a bit more the microworc. e -+ fields, both MICRO2 warns you than once. if like A and its value (0 or you to try C. 1) MICRO2 and define its the DEFINING FIELDS AND VALUES 3.2 Page 3-3 NAMES MICRO2 allows a name to be made up of characters from the following B C ...Z b C ... 2 Upper case 1 2 ... 9 Numbers Lower letters case letters AR VA~ Exclamation mark Hash mark Right % =00 >» set: Asterisk Ampersand Left parenthesis Left parenthesis angle + plus I Right minus bracket angle bracket sign sign ) period questior mark Underscore Space and MICRO2 considers all tab the following to be valid names: A12 1t 2+3%6 BxC? A name can program vertion names begin with confusing of MICRO2 might use reserved. You your version MICRO2. name of can it example, with a character, programmer the name you cannot program would begin distinguish For period another are therefore, A the for number not but to chose use a function if it all valid such read. as a names make Further, a keyword. keyword as correctly contains a under the future Keyword name and, the new characters within it to radix is from a number. the following are names if the program octal: 12Q3 b2 51F However, names but if the program radix the third is is hexadecimal, a hexadecimal number. the first two are valid DEF'NING FIELDS AND VALUES '.2.1 Spaces in Names In addition or to the tabs within a a concept MICRO2 above characters, name. rather than considers the in each case is However, symbol the which does not a particular following a <=- PC + this name is a names the sequence of to be is not space within it. the permits use of use of snaces space within a microword the the same spaces in sample program giv-n as characters. Thus, although space same different character the effective from T1 <, as MICRO2 considers a shown above have following macro 'he MICR02 made up of As an example of If Page 3-4 the sequence. as the names, in chapter symbol AB, consider the 9. | entered, MICRO2 still by mistake, recognizes with it as two the spaces between same macro. the |1 and is, the Thus, the That ollowing are the same: Tl < Tl -- PC + < == 1 PC + and ] 3.2.2 \Upper Lower MICRO2 interprets upper and following symbols are (Case all lower treated case as letters as the same the same. symbol. ABC ABc abc 3.2.3 Length Limitation RICRO2 imposes a limit of Further, because MICRO2 with the other necessary 128 characters on is a the length line-oriented processor, information, on a line. a of a name must name. fit, DEFINING FIELDS AND VALUES 3.2.4 Uniqueness of Names MICR02 names are Page classified as 3-5 follows: field-names value-names macro-names expression-names Field-names, respect macro-names, to all Value-names, names of for value other however, the same names is and exp: ession-names names in the same need be unique class only with field definition. Ffor must for a be unique given memory. respect example, to other the with value following set valid: A/=<]: 4> A=0 B=1] C=2 B/=<3:0> A=2 B=l C=6 Since you must field-name, MICRO2 A interprets label Only thus always MICRO2 can A/B as is a value-name one all field labels qualify a value easily distinguish | and for B/B the as name by its associated the value-names. That field designated as the address in a memory can be designated as an address in a is, k. field. field and given memory must be unique. Communication between memories can be accomplished by value names. A discussion in of Section 8.1. more than value The rule is that one memory, any memory are field field and to have known in then all the same name names in different memories if the same field name the value-names defined Thus, in several separate memories, in those memories must be unique labels in the separate memories. with you define respect given defined that memories. labels if is for is to field the in address then all all in the other DEFINING ’.3 FIELDS AND VALUES Page 3-6 QUAL I F 1ERS Qualifiers are used the field as one that can contain used for parity bit, and to the condition are a given in to establish of the other a default for label, associate fields following a within a field, to to designate a identify field to be field with the setting of a the microword. The qualifiers list: .DEFAULT = default-expression .ADDRESS -NEXTADDRESS .FLOATEPARITY +FLOATOPARITY .VALIDITY The following 3.3.1 The The = validity-expression sections .DEFAULT consider each of these qualifiers. Qualifier .DEFAULT qualifier field when you do not specifies explicity a value that set the MICRO2 can use for a field. .s you will see in Chapter 6, '"Microinstructions,"” MICRC2 forms a microword by starting with zero and a status of in microinstruction the processes changes bit if, then you does do not a field set bits it the bits It each and the MICR02 uses the default for a is set as that a result field not of is do the bits default-value field. status of one field and The bits 2ero or is explicitly given When MICR0O2 to a field and status the a value of the fields. changes for ail of has field-settings it that the each of which transliates s=t a set and of the field if, and set. an overlapping field being MICRO2 not applied. indicate a default, then continue to have the value zero unset. is an expression. expression are expression is a number. given defaul t-values. the to the field the default not Then, bit each to set. no bit of a bit of set, if field-setting, the value of from unset only < a a word of unset. sample program in 33ection The rules k.1, The following Chapter 9. for forming simplest examples use only The us2 of expressions in The in defaults is a MICRO2 form of an numbers for illustrated in DEFINING FIELDS 3.3.1.1 An suppose we AND VALUES Example add - To Page illustrate some defaults to the use of the fields the 3-7 .DEFAULT qualifier, defined in Section 3.1 as field in Then it follows: .RTOL .0CTAL A/=<]:4>, .DEFAULT=1 B/=<2:0>, .DEFAULT=2 C/=<7:3>, .DEFAULT=3 D/=<2> E/=<1:0> Now consider 3.3.1.2 the cases Case 1: given in the following sections. - Suppose we set only Simple Default the microinstruction, as the A foliows: A/2 MICRO2 first sets the bits in considers the defaults in for field A, field for field B since since that field the order the status is of A to the specified. explicitly every bit value It set. in that 2. ignores the default It uses the default field is unset. 76543210 10010001 0} R -+ After MICR0O2 uses set and MICRO2 3.3.1.3 Case 2: default can be default in the default does to set the not consider any ‘“urther Defaults ied specified first in defaults. Suppose we in field defaults. and Overlapping Fields to a sequence of bits, B, all bits are |f more than MICRO2 chooses one the the microprogram. the example given above, have bits the fields set only A the D and C overlap and both field, as fields follows: e/1 RICRO2 sets default in through 4. the bit the in field D microprogram, to 1. MICRO2 then applies the default value for MICR02 does not use the default for that field is set (bit 2) or the default k are set by the default value for A. for C B A, the to set because a because bits 7 first bits bit 7 in through DEFINING FIELDS AND VALUES Page 3-8 ‘.3.2 The .ADDRESS and .NEXTADDRESS Qualifiers MICRO2 requires .ADDRESS or or that the jump field .NEXTADDRESS qualifier. .NEXTADDRESS qualifier can be be A set identified by field defined with to the value of any either the an .ADDRESS label in the field, the program. In addition to designating .NEXTADDRESS qualifier value of address in the Since the that associated with the .NEXTADDRESS a field, field as you must .NEXTADDRESS qualifier an address field by the use of To illustrate the for fields X and the field as the default the next a jump for the field is microinstruction the given not use a serves field .DEFAULT the dual and supplying qualifier in purpose the default combination either in a memory the .ADDRESS can be designated as or .NEXTADDRESS qualifier, J to the .DEFAULT qualifier, field as the .NEXTADDRESS suppose we definitions given add for follows: .OCTAL DEFAULT=] B/=<3:0>, .DEFAULT=2 C/=<7:3>, .DEFAULT=3 D/=<2> E/=<1:0> X/=<15:8> J/=<23:16>, .NEXTADDRESS The definitions describe 2 with 2 the the jump qualifier. definitions the discussion .RTOL A/=<]:4>, of for field. One field and only one field ,f that program. identifying a the associated specifies following microword: 1 3210987654L32109876543210 DEFINING FIELDS Suppose the AND VALUES following sequence of microinstructions are given Page 3-9 for the above definitions: 0201: L1: A/1,B/1,J/L2 0203: L2: 020i: A/2,B/1 L3: A/3,B/3 Lh: A/4,B/L 0206: The in field the value J, which has 0203. MICRO2 In the other provides the microinstruction. .NEXTADDRESS value 0204. J to 0206 is set fields X however, label L1 the value is label setting Similarly, in J of the microinstruction J each contain can only allocated 0212, qualifier, the microinstructions, qualifier, field, to is L2, is the set which not set address labelled explicitly is L2, J the microinstruction the octal and of thus the is next set to labelled L3, having the (octal). and .NEXTADDRESS (L1) default In the octal The the first microinstruction as can be to eight be set bits. set to to field J, the value of a a value. the value 0212. The label; the X For example, suppose the We can set both X and J to follows: X/212,J4/L1 Or we can write: X/212,4/212 But we cannot 3.3.3 The set the field .FLOATOPARITY X and to the .FLOATEPARITY The parity qualifiers, .FLOATEPARITY field for search bit. When examines MICRO2 you add the uses from to left it is to odd is the and find qualifier right, all to .FLOATEPARITY, not already parity. to the to even; Even adjust MICRO2 if qualifiers are the parity adjusts that parity means designate unset bit to use as a a field definition, finds you specify parity means Odd it L1. .FLOATOPARITY, an values the first unset bit an even number. number . this field after applied and specify to label the set and in that to the cefaults field, even or parity are searching odd. to even a parity MICR02 I|f parity you if .FLOATOPARITY, MICRO2 adjusts number of 1's in the word the that the number of 1's is an odd DEFINING FIELDS AND VALUES Page 3-10 luppose we add the following field definition to the set we have been developing: P/=<23:0>, .FLOATOPARITY The microword now 2 looks as follows: 2 1 3210987654 32109876543210 et T D TSP i+ | <==e-e- D | | <==== : D LAB3 LAB2: J field in : ====> E e | <--om | to X mooo> X to | R, + B e : C the octal value a microinstruction as AP A : it 1, TP Dy E | + 202, and J to the follows: E/1,X/202,J/LAB3 Assuming LAB3 shown the in -——rmmmmrrrrcrrrrr e e> et Suppose we set value of P et is the octal value following diagram 2 213, before 2 the microword contains the parity adjusted: is the bits 1 321098765432109876543210 Rt T RS + ' | | Lo | I i b '170001011'110000010!000 1! e in the field set above microword, A is either T fields set by default. explicitly or associated with the within that field unset bit if is bit 3 and MICRO2 to odd parity. J, That by X, and is, all default. is sets to starting from bit the parity of that the word bit to is ! are to PR + set explicitly bits except bits The field P causes MICRO2 (that E S S '01! not 3 and .FLOATOPARITY search from 23) to odd. The turn the parity to right the first of zare qualifier left find and 2 first unset the bit word DEFINING FIELDS AND VALUES Suppose we do not LAB2: set X. Page That is, 3-11 we write: E/1,J/LAB3 The microword before 2 parity is: 2 1 321098765432109876543210 e T T T P .+ ! I ! S : | | A 11000101 1! 000 1! 01! bbbttt T+ When MICR0O2 bit the it parity 3.3.4 The searches finds to The odd which a field is not produces .VALIDITY subject, P from Therefore, left VALUE tit the 15 first to 1 unset to adjust lets you make assertions be legally satisfied set. with when a the about The field. field the conditions .VALIDITY If is set qualifier the in wvalidity a microword, a warning message. is and described use of in the detail validity in expressions Chapter is a deep 4. NAMES particular is a name asscciated with a particular value of a field. A value-name is definition. A value-definition consists the separator the defined 's' two separate used to set is can a field. expression. used value-definition the value to set specify ore or counters, the by followed by name value-definition .VALIDITY right, sets can expression qualifier which A value-name when to MICR02 parity. a validity expression MICRO2 field 15. .VALIDITY Qualifier associates 3.4 the bit .VALIDITY qualifier under The is .TIME]l and of following the value-name to be equated with the field. two values, .TIME2, when the form In which the The value-definition can Thus, the that is: value-name=value,tl-value,t2-value, .VALIDITY=exp name addition, are added field value also field followed by have name its a into is own DEFINING FIELDS AND VALUES Page 3-12 'he ti-value, t2-value, and .VALIDITY expression are all optional. the simplest case, as a value name is associated with a value for a In field follows: A/=<7:4>, .DEFAULT=] AO=0 Al=1 AL=4 In the above namely AO, to set A as than value-names are defined These names can be used for field A, in a microinstruction A/A1 field-names the excerpt three and Ak. follows: LAB: Normally example, Al, ones from and field-value names given above. sample program given the For have more mnemonic example, in consider chapter the content following 9: SETCC/=<15>, .defaul t=0 3.4.1 If NOP = 0 ;Do nothing with SET =1 ;Set condition codes according ;to IR value and the counter t2-value, of then .TIMEl Chapter Fcr status of ALU. Counter Values the value-definition into condition codes Al into .TIME2. .TIME2 can then be used the use of associate as a that value The both a added a values expressions. in validity expressions. ti-value with and is includes resulting in validity these counters the value-name B1, value-name AL, then field-value-definition added suppose we with tl-value, the is and example, a If that value 4 describes t2-value includes .TIME]l. t]1 the value-name and Al, t2-value with a the follows: = <7:L4>, .DEFAULT=1 AO = O Al = 1,3 Ab = 4,2,6 B = <3.:0>, .DEFAULT=2 BO = O Bl = 1,,8 If we use is the value-name increased by hen .TIME]l is for AL4) and counters Al in a microinstruction, the associated tl-value, increased by 2 (for 8 (for in validity BI1). AL) Chapter expressions. 3. and L4 the counter .TIME] If we use both AL and .TIME2 is describes increased the use of by B1, 6 these CHAPTER & EXPRESSIONS Validity expressions definition invalid When a a allow language to use field a or by the expression the value value message. is of |n the 1 addition indicating particular microinstruction, AND VALIDITY name has an associated evaluates (true), then MICRO2 expression is practice, any vaiue sections consider semantic meaning under which to a it is value name. MICRO2 the of the conditions field or that CHECKING validity the expression. O that takes no action. (false), MICR0O2 is is not |f 1 is used in the value of However, if issues a warning considered to be a false value. The following ways in which value nara. L.1 An can a validity general and be associated with angle brackets. An can in then a the field or EXPRESSIONS expression be A any of in MICRO2 the is enclosed in expression following: number An expression A function call A field value name A field contents A predefined An expression name can occupy more of example a continued of following indicator symbol character The expressions expression each line sections than to be expression, consider one continued line is a see Section each of these zs cooma 1long as the character. L4L.1.7. cases in detail. last For an EXPRESSIONS AND VALIDITY CHECKING '.l.l Page 4-2 Numbers MICR02 recognizes interpreted integers according to or point is always interpreted as radix by either adding program. |If you do Some special cases the not decimal numbers. the program radix. a decimal .0CTAL give a or number. the An A number You set .HEXADECIMAL program radix, integer with is a2 decimal the program keyword then an octal to your radix is integers, as assumed. occur in the interpretation of fol lows: o) If the program radix a 9 digit, then is octal and an the number is integer contains an 8 or intergreted as a decimal number. o MICRO2 interprets letter as and the write first the character Thus, digit in integer interpreted L.1.2 a a name. as 2 if a number with name. sequence the program is a an initial For example: F12 interpreted as a OF12 interpreted as an beginning radix letter, zero is with a hexadecimal then you must to prevent its being as follows: SWITCHI. You name integer Expression-Names ! . expression-name is defined by the .SET keyword .SET/expression-name = <expression> For example: LSET/SWITCH1 MICR02 can use associates the = <1> the value expression-name 1 with in the expression-name subsequent expressions. For example: .SET/SWITCH2 = <SWITCH1> The .SET keyword-line conditional is described assembly capability in in detail Section 10.2. in connection with EXPRESSIONS AND VALIDITY L.1.3 Function Calls MICRO2 provides operations. functions Also, and select a The functions CHECKING case for MICR0O2 from a are given comparison, provides set of in Page 4-3 the arithmetic, and Boolean to detect parity, shift, functions choices. folliowing Function table: Value Comparison .EQL[opl,0p2,...] .NEQ[op1l,0p2,...] .GTR[op1,0p2,...] .GEQ[Lopl,0p2,...] .LSS[op1,0p2,.. .] .LEQ[op1l,0p2,.. -] if opl=op2=... if opl<>op2 if opl>op2>... if opl>=op2>=... if opl<op2<... if opl<=op2<=... and op2<>o0p3 and ... Arithmetic .MAX[opl,0p2,...] .MIN[opl,0p2,...] .SUM[op1,0p2,...] .PROD[op1,0p2,...] .DIFF[opl,0p2] .QUOT [op1, 0p2] .M0D[op1,0p2] Value of largest operand Value of smallest operand opl+op2+... opl*op2*... cpl-op2 opl/op2 (truncated) remainder of opl/op2 Boolean .NOT [op] .AND[op1,...] .OR[op1,...] .XOR[op1,...] .NAND[op1,...] .NOR[op1,...] .EQV[op,...] Boolean Boolean Bc :an Boolean Boolean Boolean Boolean complement of op 'and' of operands 'or' of operands 'xor' or operands complement of the complement of the complement of the 'and' ‘or' 'xor' Miscellaneous .PARITY[opl,0p2,...] | f operands contain an even .SHIFT[opl,o0p2] If op2 number left .CASE [op1]OF [op2, ...] opl The op2 operands construct given of very a function complex in Section 4.'.7. then places (opl-th + 1) is, used. The 1's, right op2 That .SELECT[{op1,0p2,}...] of is positive, if Up else 0 else shift places opl to 1 then shift opl 32 operand of the list. is O, the choices first op2 is can be given. The first op2 for which opl is can be expressions. true expressions. Some examples Thus, of you expressions can are Page L-L EXPRESSIONS AND VALIDITY CHECKING ’.l.h Value-names Value-names are the names that you associate with a value for a field, as described in Section 3.k. given Since a value-name is only derined for a specific field, it must be qualified by the field-name when you use it in an expression as follows: field-name/value-name For example, suppose we define the following field- and value-names: 4> A/=<]: AO=0 Al=] Aly=L the value-names can be used Then, in an expression as fol lows: <.EQL[<A/A1>,<Xx>]> The above expression is equivalent to: <.EQL[1,<Xx>]> In the above expressions, 4.1.5 Field Contents X is an expression name. Indicators giving The contents of a fiela can be designated in an expression by if the out find to example, For slash. a by field-name followed the current contents of field B contains the -ralue &, you write the foliowing expression: .EQL[<B/>,<k>] For some uses of field contents indicators, see Section .VALIDITY qualifier." 4.2 on '"The EXPRESSIONS AND VALIDITY CHECKING L.1.6 Names Predefined Symbol Three symbols are predefined Page L-5 in MICRO2, Symbol as follows: Meaning . The address of the current microinstruction .TIMED The value of with .TIME2 The value of with The .TIMEY the counter and .TIME2 in connection with As an example of predefined symbols these the counter associated t2-values. the definition of the use of associated tl-values. are described in section 3.k value-names. symbols, consider the following example: A/=<7:4>, DEFAULT =2 AO=0,10,10 Al=1,10 Ab=4 10 B/=<3:0>, .DEFAULT =2 80=0,5,8 Bi=1,2,12 X/=<15:8>_ ADDRESS, .VALIDITY=< LSS[.TIME),1L]> The definition of AD microinstruction adds counter; .TIME2 Now specifies 10 the definition of counter; the A/AO0,B/B0,X/L2 LAB2: B/Bi1,X/L3 all the fields the counter contains the value for the field X, and thus the .TIME1l wuse Al specifies to counter that its set and field 10 to use adds A the 10 in a .TIME2 to the following microinstructions: LABl1: LAB1, its the and so on. suppose we have After that to are set .TIME]l 18. it in the contains first microinstruction, the value 15 and When MICR02 evaluates the validity finds expression that the value of is false. set in MICRO2, .TINE]l labelled the counter is greater therefore, .TIME2 expression than reports 1k an error. After all contains and the fields 2 no error are and .TIME2 is reported. the contains 12. second microinstruction, The validity expression .TIME) is true EXPRESSIONS AND VALIDITY CHECKING ’.1.7 Now Page L-6 Examplies let's produce field consider some examples true if a B both result equal 1. the That of expressions. contents is, if the of Suppose we field A following and is the want contents to of true: <A/>=<B/>=]) We use the .EQL function a follows: EQL[<A/>,<B/>,1] To find out if contents of field C and functions .AND the contents and as of field field A D do not and field B equal 1, we equal use | the and .EQL, the .NEQ, fol lows: -AND[<.EQL[<A/>,<B/>,1])>,<.NEQ[<C/1>,1,<D/>]>] To perform the computation: <A/>4+<B/>+2%<C /> We use the .ADD and .PROD functions as follows: .ADD[<A/>,<B/>,<.PROD[2,<C/>]>] .o choose a value based on the value of the predefined name .TIME], we use the .CASE function as follows: .CASE[<.TIMnEV>]OF[10,2,6,21] If the value of value of the value of If the .TIMREl _.TIRE]l .TIME)! length of expression will several for is is 1, is O, then then the grcater the function value function value than 3, an error the expression exceeds aid its readability, a is is line or is 2. 10. And If the so on. |If formatting the reported. if we can continue the expression on lines. example, we can write: OPCODE/=<15:8>, .VALIDITY=<CASE [VAL]OF [ADD, sus, DIV]) h.2 he VALIDITY EXPRESSIONS .VALIDITY qualifier lue-name. The .VALIDITY form of associates an the = expression expression .VALIDITY qualifier with is: a field- or EXPRESSIONS AND VALIDITY CHECKING Page L-7 MICRO2 evaluates validity expressions after all given and after any defaults true then in the microinstruction have been set applied. If takes action. (0), no the value of However, if is the value of (1), explicitly that expression are MICRO2 is false then MICRO2 prints a warning message. hk.2.1 Associating A Validity Expression With A Field Suppose we assign a set that expression the fields of .VALIDITY qualifier field definitions, as to field A, in the following follows: .RTOL .OCTAL A/=<7:k>, DEFAULT=1, .VALIDITY=<_EQL[<B/>, 3]> B/=<3:0>, .DEFAULT=2 The validity field A field A is to is expression a value in is set when field reported. Let's the above legal only B contains consider some example if asserts the value of any other vaiue, B setting is 3. |If an error message cases: Microinstruction Microword Comment A/1,8/3 00010011 B is explicitly thus A/ that field 00010010 B setting is set thus and A to 2 setting set to 3, is valid. by default A is invalid a warning message is reported. A/1,B/2 00010010 B is explicitly thus setting and A set is to 2, invalid a warning message is reported. B/1 00010001 A is not explicitly set, thus is k.2.2 the validity expression not evaluated. Associating a Validity expression with a Value-Name A value-name definition can contain a validity add a validity expression to the set of A/=<];4>, .DEFAULT =2 A0=0,10,10 Al=1,0,10,.VALIDITY=<.EQL[B/,0]> Ab=h, 12 B/=<3:0>, .DEFAULT =2 80=0,5,8 Bi=1,2,12 field expression. Suppose we definitions giver above. X/=<15:8>.ADDRESS, .VALIDITY=< LSS[.TIMEY, 14]> EXPRESSIONS AND VALIDITY CHECKING Page 4-8 ’hen consider the following cases: Microinstruction Result A/A1,B/BO Validity expression associated with value-name field A/A1 Al is true because B contains O. Validity expression associated with 8 A/AO,X/2 Al is faise because field contains the default value 2. Validity expression associated with field because which A/AL,B/BO name X .TIME! is less is true contains than 10, 14. Validity expression associated with X is .TIME! false because contains 17. As another example, suppose we add a validity expression field definition and a value name definition as follows: to both a A/=<7;4>, .DEFAULT =2, .VALIDITY=<.LSS[.TIMEY,.TIME2]> AO=0, 10,10 Al=1,0,10,.VALIDITY=<.EQL[B/,0]> Ab=bk, 10 B/=<3:0>, .DEFAULT =2 80=0,5,8 Bi=1,2,12 B2=2,20 X/=<15:8>.ADDR .VALIDITY=< LSS[.TIMEY, ESS, 14]> Now consider the following cases: Microinstruction LABS: A/A1,B/BO Result .TIME) contains Thus both LAB6: LAB7: A/A1,B/BI A/Al,B/B2 5 validity and .TIME2 checks are contains The validity expression associated field value false; error is name Al is 18. satisfied with therefore, the an reported Nei ther therefore, validity two errors check are is reported satisfied; CHAPTER 5 The macro capability representation field-value set of define string can Once that higher the fields set For the a definition level your microword fields When replaces a macro definitior are followed you use the name is than one by of a the basic defined, appropriately macro-name the macro-body. then MICRO2 case of of groups of you write contains any parameters. a for certain a quoted by the macro-name in a the macro-body. that does not contain example: “A/AO,B/BO" Writing the pair field settings. name M1 in M The following sections macros. the at a macro, The simplest L1: permits specified. microinstruction, of MICRO2 microprogram be that M1 MACROS of a pairs. macros operations To for DEF INING a microinstruction That Ll: is, is equivalent the following to writing the are equivaient: A/A0,B/BO describe the process of defining and using DEFINING MACROS Page 5-2 .. 1 THE MACRO-~NAME Macro-names are 3.2. In bracket pairs and formed addition and position of using to one set of in macro-names the macro parameters. For characters characters, commas A macro with one parameter macro-name. the these as each of in Section recognizes indicators contains an empty example, given MICR02 of square the square bracket iwumber pair the following macro-names in a requires parameter. ABC[] A[]sC [1aBcC A macro with or a cooma two parameters within a single contains either square bracket two square bracket pair, as follows: parameters in a macro-name pairs asc10] aB[Jc[] [Jasc[] aBc[,] A[,]BC [,]asC The only length limitation on of the one line. The number part of line. and the position of name. different macros. ABC[,] and so on. 5.2 THE the The macro-body with parameters Thus the in all its is, the macro consists of any separated by commas. given ABC[J[] is the arguments must fit on a macro-name macro-names That microinstruction, MICRO2 associated with that program chapter 9: in Pop Stack riting of is are an above not integral all the define same as MACRO-BODY macro-calls Writing number The macro-call the replaces name. "MEMFNC/STKRD, the macro-call three combination Pop When the Stack field settingcs in field-settings macro macro-name Consider ALU/A, of a by is used the a macro defined in and in a macro-body the sample CLKT1/YES" a given microword in is equivalent the macro-body. In to Chapter '. we will see how the definition of a macro language facilitates the process of writing and understanding a microprogram. DEF INING MACROS 5.2.1 Page 5-3 Continuing a Macro Macro definitions can non-blank character character, MICRO2 For as example, be Definition continued of a assumes the above to line that macro the in the next could next line. the macro-body line is a If is a the "," last (comma) continuation have been defined using line. three lines of macro follows: Pop Stack '"MEMFNC/STKRD, ALU/A, CLKT1/YES" 5.2.2 Nested Since Macro Definitions a macro-body languages can be can contain constructed, start with a primitive set of primitive definitions, add macros, 5.3 and THE a macro-call, one upon macro any another. number You definitions. another, more can, Then for example, using sophisticated, these level of so on. MACRO-CALL The macro-call parameter is the macro-name with actuals filling the indicated positions. The macro-call for itself. macro-call The a macro actuals within the MICRO2 replaces first without for square a brackets a of contains macro-calls, continues in way until by MICRO2 the with is the parameters macro-name includes the the macro name. macro-call macro-body this parameters macro the macro-body. replaces those microinstruction If calls. contains the MICRO2 only field-settings. To illustrate define the the way following in which MICRO2 M1 "A/AO,M2,B/BO" M2 '"C/Co,mM3" Then we use the macro-name Ml L1: MICRO2 as macro-calls, suppose we in a microinstruction: X/L2,M) first replaces the macro-name M1 follows: L1: replaces three macros: X/L2,A/A0,M2,8/BO by its associated macro-body, DEFINING MACROS Page 5-4 'hen MICRO2 replaces M2 by its associated macro-body: Li: X/L2,A/A0,C/CO,M3,B/BO Then MICRO2 L1: replaces M3: X/L2,A/A0,C/CO,D/DO,B/BO The above microinstruction consists of only further 5.3.1 replacement and commas character followed '"@" indicates the character pair position of decimal position, f settings and so no Parameters Square brackets The field can occur. is called integer numbering you use only one in from indicate parameters by a decimal the in integer parameter in the macro-name. in the the The macro-body macro-body. This refers the a parameter-designator. the left parameter-designator to right, parameter, of the parameter then you designate in to the name. it by '@1' in the designate the leftmost right of that as acro-body. Suppose we define M4[] Then we use it in the C/CO,MLTBO] L2: mMu(B1] expands followihg the macro call L1: C/CO,A/AO0,B/BO L2: A/A0,B/B] you use parameter '@2', "A/AO,B/@1" L1: MICR0O2 If the following macro: and several in microinstructions: as parameters, the macro-name as follows: then '@1', you the one so on. Suppose we define a macro with four parameters: ms(,Jas[]c[] "a/@1,8/@2,C/@3,D/@b to the DEFINING MACROS Then we use L1: MICRO2 it Page 5-5 as M5[A1,B1]JAB[C23CLN3] replaces L1: 5.3.2 the macro by Mul* _..e can use a For example, associated macro-body: Use Of Parameter parameter to specify a macro SET ABC[] to its A/A1,B/B),C/C2,D/D3 You Then fol lowr: set Designator designator more set the fields A, B, that has that value than once and as a C to in the a same macro value, body. you can parameter: "a/@1,B/@1,C/@1" all the fields to zero. you write: SET ABC[O] 5.3.3 Parameter Uesignators Parameter-designators field-values or field then or a macro For value, can be the must example, be |f within the corresponding by a or the Macro-Calls macro-body parameter-designator parameter Similariy, filled consider Field-Values used macro-calls. field-value-name. c2ll as a as is that as a value used as must be either parameter-designator parameter is either used a a a macro-call. the following macro-definition: ms5[,] "a/@1,@2" When the above macro field-value-name have the following and is called, the the first parameter second parameter additional must macro-definitions: M6 "B/B1" m70J+0] “c/er,p/@2" The following Call calls on M5 produce the indicated Expansion M5[1,M6] A/A1,8/B] ms[1,mM7[c1]+[D2]] A/A1,C/C1,R/D) be a macro-call. results: a value or Suppose we DEF INING '.3.h As MACROS Page 5-6 Too Many or Too Few Parameters described number of or too few you have in Section 5.1, the parameters arguments defined in MICR0O2 as part considers of the a macro-call, another macro the name. MICRO2 that, by |If position you detects and supply the error, coincidence, the too many unless the macro-call satisfies. Suppose you define the following macro: m2{,] Then, if "A/@1,B/82,0/1" you call the valid M2[A1,B1] However, as it with replacement, as the proper is replaced by suppose number of arguments (2), you get follows: you mistakenly A/A1,B/B1,D/1 call the macro with three parameters, follows: M2[A1,B1,1] 'ICROZ does not recognize the above as a valid call and produces an error message. However, suppose that have: you m2(,,] ''A/@1,D/82,E/@3" the calls you following three parameters, so are valid: Call Expansion M2[A1,B1] M2[A1,1,2] A/t1,B/B1,D/1 A/ 1,D/1,E/2 When you macro with '""A/@1,B/@2,D/1" M2[,] Ther,, you define another use names lose the therefore, not that error are the checking recommended. same except for performed by the number MICR0O2. Such of macros, naming is, CHAPTER 6 MICROINSTRUCTIONS The microinstructions microprogram. field For each The fcllowing to be performed expressed ir. by terms of the the of sections bits MICRO2 and consider translates creates the names into the associated microword. the microirstruction and the formation the microword. 6.1 THE MICROINSTRUCTION The microinstruction bits of Both the address and contains labels, or label both. field-settings That the information MICR0O2 needs to set the the microword. can be omitted. A microinstruction begins with more of are defined. microinstruction, sequence the processi®ig microinstructions and macro-names appropriate of describe These is, the and/or form of an Following absolute address this macro-calls optional is given the microinstruction assignment, information, separated bhv a one or sequence commas. is: address: { label: } { field-setting } { macro-call } A microinstruction constructs because is it ,... different can occupy from several all lines. other MICRO2 language MICROINSTRUCTIONS '.l.l If Page 6-2 Continuing a Microinstruction a microinstruction occupies character ',' must except last line. line the is assumed comment, of a or to the actual line means When MICRO2 it continues line. the finds a as more the purposes be either end of one of this discussion, the ';' character, Thus the last non-blank before the ';' comma as the last non-blank microinstruction using finds a the line, li:.... line that does the microinstruction and Suppose we write than following the separator last non-blank character of For last the When MICRO2 concludes be the non-blank or end of character with lines end of which the begins a character line of information not end produces the all a on a line, the next comma, it the microword. portion of a microprogram: a microinstruction ~/AO,B/B1, c/c2, J/L1 MiCRO2 interprets fields A, However, B, C, the and suppose we above as single that sets J. omit the terminating commas: A/AO,B/B? c/C2 J/L1 MICRO2 interprets microword 6.1.2 The for the above as three microinstructions and produces a each. Allocating a Microinstruction following microinstruction Q0 0O ee o0 ON labels contains an address (612) and two word 612, and (R and Q): 12: A/A1,B/B1 MICRO2 produces the microword and, associates and Q. the specified allocates absolute octal it to value 612 with the labels R MICROINSTRUCTIONS Both Page 6-3 the address and label are optional. Suppose you write: the microword R: A/A1,B/B1 For this case, allocation When MICRO2 assigns these 6.2 produces the word processes activities and same associates that to an address. The but chooses address with the microinstruction, that microword two it creates following the the label a microword sections R. and consider in detail. THE MICROWORD MICRO2 creates 1. a microword MICRO2 2. clears word of the of zero and a MICRO2 3. the a in then in the counters specified status fills following way: of in all .TIMEl length and .TIME2 in which Then, MICR02 that L. Then, 5. Finally, begins with has value bit a are explicitly unset. the fields that look at sets any contain only MICRO2 fields that unset bits. have an associated set default evaluates any VALIDITY expressions. MICR02 performs the creation of any parity a microword. adjustment First, indicated. consider program: .TITLE and each the microinstruction. and Let's MICR02 for "TEST" .OCTAL -RTOL WICTH/24L .REGION/0200,0277 A/=<7:4>, .DEFAULT =2 A0=0, 10,10 Al=1,10, .VALIDITY=<.EQL[<.TIME1>,<.TIME2>]> Ak=4,10 B/=<3:0>, .DEFAULT =2 B0=0,5,8 Bl=1,2,12 X/=<15:8>.ADDRESS, .VALIDITY=<_ LSS[<.TIME>, 14]> the source MICROINSTRUCT I ONS Page 6-4 J/=<23:16>, .NEXTADDRESS P/=<23:0>, .FLOATEPARITY MI[] "ai/@r M2(J+[3 "a/e1,8/@2" .TOC A: Now, "MICROCODE" m1[A1]) consider labelled 1. MICRO2 with 2. the creation of the microword for the microinstruction A. MICRO2 of initializes a3 word expands fieid the counters consisting of all settings macros until and then the microinstruction following field MICRO2 A1(1). and (zero) the .TIME2 and begins bits. source consists of sets those Expanding A: .TIME]l 24 unset a set A above produces the fields. labelled setting: A/A1 then sets the field A (bits 7 through 4) to the The microword now contains the following values: 2222111113V 1 11 value v1 3210987653210 9876514 3210 R e I -+ [] ] ] 1 1 ' 10 0 0 1 ] § | i e 1 ] 1 1; : ] 1 ] [} T . -+ /i \ ] ] A In the setting field counter .TIME]l .TIREl and to .TIME2. contains contains O. A value:c the value designated associated After the value with setting 10 and Al field by Al, MICR02 adds into the counters Al, the the counter counter .TIME2 still M1 CROINSTRUCT I ONS 3. Page 6-5 Next MICRO2 Field A applies defaults. is explicitly MICRO2 sets field B to The field, J, explicitly so MICRO2 associate X. A address the value of next microinstruction now contains the following bits: set, so is not the next address not set in this message is MICRO2 a'just: at this to bit, which even parity. is The microword value the parity fo: point right bit the FLOATEPARITY. adjusted left and 15. «=ven n... cdd in the HICR02 now contains and not the the validity satisfied .TIME2 in any Field field so not evaluated. because of 10 FLOATOPARITY or from produced is is Finally, to be X the value-name Al is Al microinstruction, expression associated with for The definitions expressions with value-name .TIMEl The word to is (2). next it defaults. B the of field the sets B have field Suppose is warning as and of evaluates validity expressions. expressions value as MICRO2 validity Field X validity A no bit (octal). The microword Next, Fields but its default value designated set, microinstruction. is 0212 set, is is the O. fields P since designated designated as a parity. parity, field P sets that the so to MICR02 find bit to the 1 searches first unset to adjust to foilowing bits: 2222111111111 3210987654L321098765L4L3210 i Rt —+ [} | ] ] 1000101 | 0! : ] ! ! ] i i '0001!0010! ! : | e e -+ Bits 14 through 8 contain the value 0 unset. and have the status CHAPTER 7 ALLOCATION The address keyword space and for the the microprogram method of is established allocation by the by the .RA' DOM and .REGION .SEQUENTIAL keywords. 7.1 The is DEFINING THE .REGION ADDRESS SPACE keyword determines followed by one or the address-space. more pairs of address The limits, .REGION keyword as follows: -REGION/low-bound, high-bound. .. Low-bound and according For to example, address high-bound radix. if your microprogram you want space address are expressions whose values the program 0277, that you begins specify with to be the address the following are interpreted allocated 0200 and in ends with the the region. .REGION/0200,0277 If you want consists limits your of for a microprogram set of each to be disjoint range. For allocated address in ranges, an you address specify space that the address example: .REGION/0302,0320/0400,0461/0200,0207 You can specify any microinstructions number (or the end of memory) If you do not assumes highest that give a the available of following .REGION a keywords. .REGION up to MICRO2 the next allocates the .REGION keyword memory, MICRO2 in the specified address space. .REGION address address for at the beginning space the begins at of 0 your and ends given architecture. at MAXPC, the ALLOCATION Consider Page 7-2 the following program fragment: e ettt ' ; LTITLE .. ! . | b} . S e e ! [ -+ L L v} L ! 1} b} E } 8 bl . 1 | L -+ .REGION/0200,0277 . E S e et L DL T -+ ! .REGION/O400,0500 | . ! e e } y 3 L T -+ The microprogram above has point-of-view: } ] I . i ! Part A three resides logical in B resides in the range 0200-0277; If MICRO2 uses all this Now case use any consider T parts the address part C in the available addresses addresses left in a microprogram that has the from the allocation range 0000-MAXPC; part the range 0L00-0500. in OLO0O-0500, it can not in range 0200-0277. a3 single REGION keyword: T -+ LLTITLE . ] 1 ] ] . ' i T TP R -+ | \REGION/0200,0277/0400,0500 | 1 ] v '} range part C. B -+ This microprogram O0000-MAXPC 0200-0277. } g LT 0LO0-0500. OLO0-0500 A } : ) o range } has and two logical Part B parts. resides Part A in address resides range in address 0200-0277 and MICRO2 does not begin allocating in the address range wuntil it has used all the available addresses in the range In the previous OLOO-0500 when it example, finds MICRO2 starts the REGION keyword allocating in that begins logical the ALLOCATION Page 7-3 ’ICR02 considers each range specified individually, ranges may be adjacent or define the following address overlapping. For even example, though two suppose you space: .REGION/0100,0177/0200,0277 MICRO2 treats of sepacrate two 7.2 the random 7.-2.1 In specifying METHOD OF specified address sequential address of MICRO2 begins by that consists ALLOCATION space, you MICRO2 allocates allocating with the .REGION can select either range. When reaches an the When MICRO2 uses first the last uses word allocated the Suppose we use sequential the last and as .REGION/0202,0207/0312,0316 L3: Mi1[3] Ls5: Mi1[5] Lh: MIT4] the sequential an by taking address space incrementing until or the that for it end of the address for the incrementation. address-range, address-range last the 1. in the uses issues legal .OCTAL Lt1: MiI[A1] L2: Mi[B2) 0206: in allocation and single absolute assignment .SEQUENTIAL MICR02 next MICRO2 uses the address 0000 following address the new base instruction in After adding assignment absolute address, address microinstruction. first address associated microinstruction and as it a microinstruction keyword and continues an absolute address with a space Allccation mode, eaches either range, address the previous microinstruction and 'efined the an allocation. Sequential it as ranges. SPECIFYING THE Within or the above address it chooses for the in the an error message for next last each allocation. specify follows: the address space The addresses are allocated (0202) and starting at the beginning continuing sequentially until of the region the absolute assignment, as follows: 0202 L1 0203 L2 0204 0205 0206 0207 (unused) (unused) L3 LL 0312 L5 0313 (unused) 0314k (unused) 0315 0316 (unused) (unused) Observe that Addresses 0204 and 0205 will force the 7.2.2 In allocator random mode, order bit not be allocated unless we an absolute assignment. you A can specify constraint configuration. selects absolute a Constraints set of address assignments addresses based on are dcscribed in detail and the low in the section. MICRO2 then with Random Allocation constraints. next back first allocates allocates the all unallocated address in sequentially through the Suppose we use preceding example random as absolute assignments remaining the first allocation follows: .REGION/0202,0207/0312,0316 .RANDOM L3: mMmi[3] L5: Mi[5] Lh: MI[L] instead of of constraints starting address-range unallocated addresses .OCTAL Li: Mmi[a1] L2: Mi1[B2] 0206: and microinstructions at and the and first continuing the address space. sequential for the ALLOCATION Page 7-5 ‘ICROZ allocates the absolute address assignment first and then begins at the space first address to produce 7.-2.2.1 the in 0202 L1 0203 L2 0204 L 0205 L5 0206 L3 0207 (unused) 0312 0313 0314 (unused) (unused) (unused) 0315 (unused) 0316 (unused) Constraints conditional the address following constraint the ORing some logic next microinstruction capability conditional increments through - Many microprogrammable microprocessors branching by bit position of space and the allocation: for function into address. generating a the perform low order MICR0O2 provides set of addresses a for branching. . constraint consists of an "=' character followed by a constraint string A composed of constraint consiraint low order bit is the MICRO2 then formed by For specifies bit address bits secuence of string, an those a a set MICR0O2 always and of a specified ordered 1 characters. addresses. chooses configuration are 0 from In base address by the right response that constraint. to left. So to a satisfies the The bits cf the low order right-most bit. assigns the ~ext systematically designated example, suppose n microinstructions increasing as O's in the constraint the constraint to the base address string the addresses counting only in string. is: =0101 And suppose MICRO2 representation of chooses this the aduress base address 0225 (octal). The binary is: 1098726543210 000010010101 The low order the constraint bit configuration of (0101). the chosen address (0225) satisfies ALLOCATION Page MICRO2 systematically and to 3, increases the produce a set of 0101 (base address) base address addresses endirg in by counting the following 7-6 in bits | bits: 0111 1101 1111 Since we are assuming then the following that NICRO2 addresses are chose 0225 for the base address, the address space that uses the assigned: 0225 0227 0235 0237 MICR0O2 the can available MICRO2 address formed that by the in examplie, use that the for which constraint that the MICR02 completely. the base possibilities can be 0 or character that position it for constraint 0101 configuration must specifies the that in constraint. the constraint address oring informs MICRO2 al the has first That address with is, and the the base available. can character address by satisfies first |Indicating a bit you aOor available specified the are all 7.2.2.2 1's, bit audress wuses addresses For choose any low order be O low order or bit '*' can select the base 1 - In addition in a constraint an address to O's string. that has and This either address. specifies that 1, the whereas 1low order bit constraint the string 0%0] configuration can be either 0101 or 0001. 7.2.2.3 in the The set, string, as size of n, the address is determined by set - The number the number of the constraint of zeroes microinstructions in the constraint follows: n=2%%X Where X is the number For example, set of the of O's in constraint 0101 four microirstructions. has two 2eroes string. and thus determines a ALLOCATION .2.2.4 Page 7-7 Constraints Within Constraints - constraint string the block of skips to proceeds The within the set of MICRO2 addresses associated with an outer the next according purpose of address to the the satisfying algorithm nested example, suppose we microinstructions have labelled a LO, the is the and and so on, is a as string, constraint over a allocating the outer skip outermost constraint L1, by to encounters it constraint inner specified constraint that would ctherwise be allocated by For If instructions and to it then constraint. some addresses constraint. sequence of eight follows: =000 LO: L1: L2: L3: Lb: L5: L6: L7: If MICRO2 chooses microinstruction pn, as the base labelled address L1 0200, to 0200, L2 then it to 0201, follows: Microinstructions Allocation =000 LO -=-> 0200 L1 -—=> 0201 L2 L3 L4 -———> -——=> -——-> 0202 0203 0204 L5 -==> 0205 L6 ———> 0206 L7 Now suppose we -———> insert an inner 0207 constraint Microinstructions as follows: Allocation =000 LO: Ly: M1[0] MiI[1] -——=> -——-> 0200 0201 L2: L3: MI1[2] MI1[3] -———> -—=> 0203 0204 L5: L6: Mi[5] Mi1[o] -———> -——-> 0206 0207 =011 Lh: L7: MI1[4] M1[7] -——-> 0205 L3 allocates to 0202 and the so ALLOCATION The inner the total Page constraint directs MICRO2 instruction can number of labelled choose any all the Now suppose we by L7 address constrained to skip addresses within is outside for L7, it the 0202 assignment. the constraint the is constraint. allocates it after Thus seven and Since it 7-8 has the MICRO2 satisfied addresses. insert another inner constraint: Microinstructions Allocation =000 Lo: Li: M[0] M[1] -——> -==> 0200 0201 M[2] M[3] -—-> -—=> 0203 Q204 Li: L5: L6: ML) M[5] M[6] -—=> -—=> 0206 0207 L7: M[7] =011 L2: L3: =110 The microinstructions labelled by L6 and A null L7 are now outside the constraint. 7.2.2.5 of ""=''" Terminating a Constraint the constraint character. address terminates the - A constraint can also be assignment; constraint within constraint. however, in this A null terminated case, MICRC2 the constraint by scope is the an absolute issues a warning message. Suppose we want to - istrain only five addresses. Microinstructions Allocation =000 Lo: L1: L2: L3: M[o] M) M[2] M[3] L5: M[5] L7: M[7] Lb: L6: The null ML) 0200 0201 0202 0203 -———> 0204 M[6] constraint microinstruction -——=> -——=> -——-> -——-> terminates labelled by L&. the constraint after the ALLOCATM 0N Page 7-9 ..2.2.6 Address Space Boundaries - The set of allocated define by MICRO2 must 1lie within the following address an constrained addresses address-range. Suppose you space: .REGION/0100,0177 And suppose further, 0177 to satisfy that MICR02 uses a constraint. |If the addresses 0166, you define your longer used 0167, 0176, space as: .REGION/0100,0167/0170,0177 Then that set of addresses can no be as a set because addresses 0166 and 0167 belong to one range whereas addresses 0i76 and 0177 belong to another. 7-3 MIXING ALLOCATION You can shown switch in the between following e | MODES the two program allocation modes in your program, as keywords divide the fragment: bt + .TITLE : | | l} | : : )3 A . R+ ! .REGION ; ! .SEQUENTIAL | : ! } | ceee 1} : Bl B e et + ! ! | e ! : .RANDOM e |3 } 1} B2 R L L L+ .SEQUENTIAL ceee | } !} : B3 L) et + In the above address example, space into the L4 .RANDOM and .SEQUENTIAL sub-spaces, according to the method of allocation. If you do in the not give an 2bove example, allocation mode, part A is MICR02 allocated in assumes the .RANDOM. Thus random sequential. CHAPTER 8 COMMUN I CATION This chapter among considers memories in two the forms same of program communication: and communication communication among separate programs. 8.1 MEMORY COMMUNICATION Each memory has its address-space. However, than then one memory, own if definitions, the same the value-names known feature lets you communicate between memories. example, suppose as one memory in the the other you define address other as memories for are field-name all defined memory For in that two memories field. shown in You the identification; field-name can is defined in field in that define the field. and more any This and designate the then access labels following the same of example: .OCTAL .RTOL .UCODE A/=<12:10> J/=<9:0:», . ADDRESS L1: A/1,J/L2 L2: A/2,J4/L3 L3: A/3,Jd/L4L .DCODE B/=<9:0> J/=<16:10>, .ADDRESS B/0,J/L1 Lk: The label memory U. specifying name L1 is You can the label a value name jump L1. from the for the DCODE field J, which memory to the is defined in UCODE memory by COMMUNICATION Page 8-2 ‘.2 PROGRAM COMMUNICAT|ON You can assemble separate programs and load them together in a control store by handling address space assignment and communication. If, for example, you wish to have n separate programs, you divide the control store into n+tl logical spaces, o Communication o Space for Program o Space for Program 2 o Space for program n namely: Space 1 Suppose you want to assemble two separate programs for a control store of 2000 words. You might reserve the first 10 words for communication and then specify the address space for program ! as: .REGION/11,1200 After what you successfully assemble that program, you will know exactly space it needs and you can specify the space for program <. Suppose the last word program address space for program 2 1 uses is 1053. You can specify the as: .REGION/1054,1777 Or you can reserve a 1 and specify little extra space for the address space for prgram 2 later expansion of program as .REGION/1100,1777 When both your communication programs are succeszfully assembled, you assemble the region: .REGION/O,7 J.=<9:(-, .ADDRESS 0: J/1400 sTransfer 1: 2: J/762 J/21 ;Transfer to program 1 ;Transfer to program 1 You can, of course, the transfers to program 2 (1) (2) dispense with the communication space and perform directly by fixing certain addresses in each program. CHAPTER A tn this chapter microprogram values of a we that stack SAMPLE define and one to MICROPROGRAM a performs 9 sample two use machine subroutines, the stack to and one then to add determine give a top two the the program control. We begin by defining the the data microinstruction microprogram. field First, definitions, path fields. of the model Then, we consider then the the we mach discuss ne and the identification macro language, specifying parts part, and of then finally the the the two given in subroutines. The input and Appendix B. 9.1 DATA THE The data This output for the microprogram are PATH path of the architecture, machine, listings sample machine while very is simple, shown has in the Figure 9-1. essential features of a namely: o ALU - o PC - An A arithmetic logic program counter, unit which points register, which to next instruction to be execu :d o IR - An instruction instruction 4 MA - A memory o An internal o input and address stack Output for Buses register data contains the current A SAMPLE MICROPROGRAM Page 9-2 PC it + 1 I 1 1 f<-—+ +--1 et ' ouUTBUS ! \:/ e e et il L L N\ R i | P it | ! ! i Rie ! ! ! \!/ ! +ommrmrr pmme>+ i | 1 | i ; | 1 | | ] | ! ! i : ! ! ! btk + / i\ I ! 1 i | | ! i ALU / Foommmmm / e+ Ao | : IR \!/ : +om————— + ! i 1 1 : : ! 7\ B e —+ ' I \ \ /N l \i/ I /\ ; ' | } | | 1 ! : | ! ] | l e+ o | Rt | : : : : R L+ I 1 i | R | | STACK e + CACHE /i : : | 1 T1 ! Db bbb bbb bt + : | | | | ettt + INBUS i 1 - -+ ] i ' MAIN MEMORY ! R + 1 { 1 i | 1 #omomne : : \ ' J ! ] ] ) o 1 § ———— - Figure §-1. Model The fol'owir, sections specify of the microword for of for these fields, this the Machine progran aeve given Path identification, this data path, and uc= this Data define develop a macro language. in Appendix Tnhz B. the language input and output fields in terms listings A SAMPLE MiLrOPROGRAM 9.2 Page 9-3 IDENTIFICATION The identification part of the bit-numbering as mode as 9.2.1 Here random, and Program is the the program for right-to-left, the sample machine the base as the word width as octal, 23. Excerpt identification part of the program: e it e + ' .title "machine model" i .rtol : ' .octal ! ' .random H | -width/23 R 9.3 The ! ' e FIELD + DEFINITIONS sample machine has the following microword: 2221111111110 21056876543210987654L3210 e + ] I 1 | [N I I I | IR I | AR R I T I R ! |} | 1 B B R | ! I | [ it A A 1 [ SO i it + A A A A A A I B | i ] 1 UBF ' J T 1 CLKIR! | ALU| 1 | 1 ! 1 1 | SR ! 1 | IMEMFNC | [ N | I I | CLKT1! ! ISELTIFC ] 1 SETCC! Figure 9-2. Model Machine Microword the defines allocation A SAMPLE MICROPROGRAM ’.3.1 Here Page 9-4 Program Excerpt are the field ; The s to make ;s not definitions following sure both that expression that Tl clocked at and the define is used PC are same this word: time. .SET/T1.PC=<.CASE[<CLKT1/>]0OF[1,0] .~0oc '""Field .toc " Definitions" ALU function for this microcycle" ALU/=<22:1 .defaul t=<ALU/Zero> 9>, ADD = O sAddition A SuUB = 1 ;Subtraction AND = 2 ;Logical OR A =3 = A OR B through ALU B through = 5 ;Pass = 6 ;increment A ;Zero value IR A A B " B :Pass A+1 .toc B A \ND ;Logical Zero= 7 + B ALU A + 1 Control' CLKIR.defaul /=<18 t=<CLKIR/NO> >, NO = 0 ;Do not YES = ;Load .toc | " T1 clock IR IR with data bus Control" CLKT1/= .defaul<17>, t=<CLKT1/NO> NO = 0 ;0o not YES = sLoad T1 .toc " | OUTBUS change T with ALU output Control" SELTIPC .defaul /=<16>, t=<SELTIPC/TI> Tl =0 ;Tri-state T1 onto OUTBUS PC =) ;Tri-state PC onto OUTBUS SAMPLE MICROPROGRAM ' i i i | | I i ! I [ I ] i I | i i I i | | i I | | i 1 i i | I | | ' i i I | I 1 | .toc " Page 9-5 Condition Code e et ittt e D bt A Control" SETCC/=<15>, .defaul t=<SETCC/NOP> NOP =0 ;00 SET =1 ;Set condition codes according nothing with ;to .toc " Memory Request IR value condition and status of codes ALU. Control' MEMFNC/=<14:12>, .defaul t=<MEMFNC/NOP> NOP = 0 ;No STKRD = | ;Read operation. STKWR = 2 ;Write data on OUTBUS LOADMA = 3 sLoad Memory top of stack onto to INBUS. stack. Address with OUTBUS. READ = 4 ;Read onto WRITE = § ;Write OUTBUS value using MA. ! REAGPC = 6 ; INBUS gets PC. I i ! I | ! i | | i | i i ! I I ! t I ! | ] i 1 I ! ] I I ] i ] ] 1 I i ] WRITEPC = .toc 7, .VALIDITY=<T1.PC> Branch INBUS using MA. ;PC gets OUTBUS. Control® UBF/=<11:10>, .defaul t=<UBF /JUMP> JUMP = 0O ;Use next address ALU = ] sFour way branch 7 00 - Less ; Ol - Largest negative s 10 - Greater than 2zero. s 11 - Zero INSTR = 2 sinstruction THREE = 3 ;Reserved. .toc " Next Address than field unchanged. zero. number. decode. Field" | ] I 9.4 J/=<9:0>, .nextaddress MACRO DEFINITIONS The macros that define categories; 0O 0O0O0O0O0 five Stack Memory the language namely: interactions interactions Arithmetic actions Branch tests Miscellaneous functions for the machine are divided intc A SAMPLE MICROPROGRAM ’.h.l Page 9-6 Program Excerpt .toc ! nn '"Macro Definitions" | | I .toc " Stack Interactions' | | ! Pop Stack | Push Stack ! Stack Plus TI | | .toc | " Memory '""MEMFNC/STKRD, ALU/A,CLKT1/YES" ""MEMFNC/STKWR, SELTI1PC/T1" CLKT1/YES" /STKRD, ALU/ADD, '""MEMFNC Interactions" 1 | ! MA <-- PC ! T1 <-- Memory Data ! IR <-- Memor;,; Data | | .toc ! " Arithmetic Actions" | i i Tl <== PC + 1 ! PC <-= TI : l ! | | | ! .toc " "SELTIPC/PC,MEMFNC/LOADMA" '""MEMFNC/READ,ALU/A,CLKT1/YES" '""MEMFNC/READ,CLKIR/YES" '""MEMFNC/READPC,ALU/A+1,CLKT1/YES" "SELTIPC/T1,MEMFNC/WRITEPC" Branch Tests" ALUCC? Instruction Decode ""UBF/ALU" "UBF/ INST" : : ! .tor " Miscellaneous Functions" : 1 ) Set Condition Codes USETCC/SET" e e e : e ———————_—_————————————— e —————————— e e = — — = Here are the MICR02 macro definitions for the machine model: A SAMPLE MICROPROGRAM 9.5 The A Page 9-7 SUBROUTINE subroutine given below adds replaces these values with the top the two values value of their on sum, the as stack and represented below: Fommmm—mmeem + e+ 1 i | I ] | ; ! | ] ! 1 i I | 1 ! ! Fommmmmmmma + 1 1 Z I X | Y | o i l >I mmmm e + I 9.5.1 The | dommmmmm e + | I 1 Fommmmmm— e+ o | ] i Z | e+ X+ Y mm e + +ommmm e + Program Diagram program to accomplish this e function L LT + | Read Stack | | value | to T1 L+ | \}/ R | ) ! 1 | e L L Clock TIi L+ ontc OUTBUS (B) Read Stack (RA) ! Add A+B { Push Sum | onto Stack can be diagrammed as follows: A SAMPLE MICROPROGRAM b.5.2 Here Page 9-8 Program Excerpt is the microprogram .toc " .toc "Functions" " Add Top that on this function: Stack" Ve Two Values accomplishes (SP) to (SP-1) we WS ACD This basic arithmetic ; on the stack ; condition and codes instruction replaces are set the adds result according to the top two values onto the stack. the result of The the addition. ADDO1: Pop Stack,J/ADDO2 ;Read stack value to T1. ADDO2: Stack plus T1, Set condition ;Load T1 codes,J/ADDO3 with (sp) + (sp-1) and ;save conditicn codes. ADDO3: , Push stack,J/INSTFETCH it ;Store sum on stack oL TSPy ey 9.6 ANOTHER SUBROUTINE This subroutine uses determine where the to send Suppo.e we have the sign of the value on the g By top of g+ the control. following: instr. stream stack et + | | X1 PC --> X2 } 1] ] LT -+ : ! : | ] et Di+ : X25 { e+ X3 | -+ | ek + | e : tm——— : i ———— + : == + stack to A SAMPLE When to the the X25. to MICROPROGRAM instruction next |f X1 is being instruction X2, the sign instruction 9.6.1 Page 9-9 of X25. the |If executed, which top of not, the program counter contains the stack control the is address negative, continues with of points instruction control is sent instruction X3. Program Diagram The program tc accomplish this function Test Top of Move S bt PC can be diagranmed follows: Stack to Memory Data R ee+ | ] i | <0 <0 | ] I ] ) ] 1 1 >0 0] ] | | | | ! ] 1 I | | | $ommm e -+ e+ | | | ] | | \! \| Branch Skip on address T! <-- Mem next Data Tl | instruction <-=- PC + 1 | ] | ! ] R e it + | \ PC <-- 9.6.2 as TI Program Excerpt e g iy g+ Sign of Top of Stack" (SP) and Branch This control if Negative D TEST instruction address stream contains the next causes skipped and execution instruction the absolute to be executed. absolute address in continues the Any other instructior in address to normally. he . On entry to this routine, the PC points to the absolute - ®e of value stream G stack the R G the W item on next word V¢ the top the D G the then D zero WP examines @ than I GED less Ve is A instruction VS the value WO If WO Ve I ; v W W G L Branch on b. : address. SAMPLE MICROPROGRAM ): ! | ; 3 ) | | : On exit, the PC contains the address of the next instruction to be executed. The top item on the stack has been removed. TSTBNO1: Pop Stack,J/TSTBNO2 ! 1 ! Page ' ! ! | | ! | ;Test | : SP 1 | TSTBNO2: | 9-10 : MA <-- PC, ;Memory address of absolute ALUCC?,J/TSTBNO3 ;address. ;Branch on conditior SP. : : | | l | ] | | P ! 3 | I | TSTBNO3: :| Negative Number | [ ! T1 ! J/TSTBNOS | 1 t } <-- Memory Data, ;T1 <-- Absolute address. : B ! ; | P ! ’ J/TSTBNOS . | ! 3 I 1 . I | : <=- Memory Data, ;T1 <-- Absolute Address. i Greater T1 | I 1 3 I 1 . [ :! than zero ! | ! <-- PC + 1,J/TSTBNOS8 ;Skip Absolute Address. i | Zero | ! ! 1,J/TSTBNOS8 ;Skip Absolute Address. i | PC <=~ T1,J/INSTFETCH ' | I ! | ;Load PC with ;address. INSTFETCH: J/INSTFETCH ! ! 1 ! | TSTBNOS: : : : | | TSTBNOE: ! T1 <-- PC + H | : TSTBNO5: ! % } mTSTBNOL: T1 | | | Largest Negative Number I : next instruction } ! : : | I ! CHAPTER The conditional parts of suppressed Suppose, of a entry by for common point package with CONDITIONAL ASSEMBLY capability lets program. You the appropriate select setting example, you have a structure and a for with another assembly assembly your the set package. one set. 10 of list of can suppress parts of the your processing package Sometimes accomplist assembly program of to be expression-names subroutines. set of entry points You you the you (or this Each want to functions) by using that consists subroutine is an assemble this and other times the conditional keywords. 10.1 THE CCNDITIONAL Three keywords are ASSEMBLY provided KEY.JORDS for conditional assembly as follows: .|F/expression-name .IFNOT/expression-name .ENDIF These keywords divide keywords begin a your associated with either have the program block. a into blocks. They true include (1) or false TFr f and an exp: _=sion-name (0) value. These L.IFNOT that is keywords following meaning. Keyword Meaning .|F/expression-name |f expression-name true value (1), is associated with a assemble the following block. .1 FNOT/expression-name |f expression-name false value (0), is associated with assemble a the following block. In practice, a value espression-name faise value. has is any value the value that 2, is MICRO2 not 1. For considers example, it if the to represent a CONDITIONAL ’0.2 ASSEMBLY Page 10-2 .IFNOT and CONDITIONAL ASSEMBLY BLOCKS A conditional ends .IFNOT either for the same For example, only under an .ENDIF for have a special .IF or same expression keywords Frrrr as portion condition. in a conditional .ENDIF the or another .I|F or expression. suppose you some the program and assembly block begins with either an with of your program You can assembly block by to be included enclose that portion of branching it with .IF of program follows: e l e ——— ) I | Crmecemce e m —— e — - -+ i ' ] i | | e el + | i ! IF/A .ENDIF/A e ee e | | ! | : Part to be ! l<--included only! : if Ais true | L L T Lt + ! | ! | t et | ! L L L L Parts to be always included bty + | | et s+ 10.3 AN _EXAMPLE Suppose you have a sequence divide your program into of the conditional e e T LT+ ! : IF/A .. ! 1 } A1} lcmccmccrcccccce e = I } | ! ! ! : | .IF/B e : ! Bl l .ENDIF /B .. ! | : .ENDIF /A } } } A2 } } e e L LT + e e ; . L L L L+ X S ettt E LT+ e e e + : .IF/B : : . ! | : .ENDIF /B | ! } } } A : el : ! ! assembly directives, following blocks: B2 which CONDiTIONAL ASSEMBLY The block is within A block Page included if A, block the the value Bl of is A is true included only if (1). 10-3 However, the value of B is also true. The portions values of of A the and B Value are the assembled following Program | T T A1,B1,A2,X,B2 T F Al,A2,X 3 F T X,B2 F X X F is always assembled blocks. In Case because it 3, Bl the conditional block assembly 1is is for different Assembled (The entire program) outside not block the table. Portions 2 nested within all conditional assembled because controlled by it is A. ANOTHER EXAMPLE Suppose you and that in A Value assembly 10.4 shown Case L Block program B are then have a a case set of expression-name to in which one out accomplish of this | | : { you want two pairs binary 1 I general : code X | ; | ! | ! Rt L L L L C L+ { -IF/A | option I 1 K1 | R+ : .TENOT/A K2 : option 2 : Lt LD ; AF/A } option P L Er + | 1 K3 | R+ : .1FNOT/A ! ; option . | Kb Rl e e LT P + : IF/p : option i 1 K5 { e e L L L e+ ! | .IFNOT/A option 2 {3 | DL L L e L+ .ENDIF/A to select of some genera! options. decision, as You code can use one follows: CONDITIONAL ASSEMBLY Page 'e portions of the program assembled are shown in the 10-4 following able: 10.5 A Value Program Portions —— Case T X,K1,K3,K5 2 F X,K2,KkL,K6 SETTING AND You define and CHANGING set an Assembled EXPRESSION-NAMES expression-name with the .SET keywourd as value for follows: .SET/expression-name=expression For example, conditional to set the expression-name assembly purposes, A to a you use the following true .SET directive: SET/A=1 Once you .CHANGE 'efining have defined and keyword it as to change true above, .CHANGE/A=0 set an its value. expression-name, Thus you must write: to Yyou change A must to use false, the after CHAPTER MICRO2 This chapter listing output 11.1 The describes controls input consists prepared to the a to any output discusses listings of format and the MICR02 and the content of the enter lines until in preparing limits, on which end at of the the the detects In to response microprogram. or the validity of be The source input and can be the microprogram. To input. with the internal of the input any available have first file the is editor. you edit continues convinced input as your microprogram. and a From sequence continuing Within those structure. described the until that file of encountered. expected errors, details run. the microprogram consists reports are is writing familiar program will errors, process you input start last and these This until microprogram MICRO2 language. assembler source using the microprogram must The assembler present the point of view, beginning that The in editor. you must the microprogram the of written |nput step the assembler's microprogram. an example of microprogram, the processor a lines, rules available Preparing The a is of syntactic The first affect input use to modify assembler write of the can sequence the using section 11.1.1 You and LIST CONTROLS INPUT of conforming of AND listings. ASSEMBLER This you LISTING 11 input in Appendix to obtain either the messages no D. a valid errors produced do are not MICRO2 LISTING AND .1.1.2 Page 11-2 of the Formatting The Microprogram Using a standard microprogram. developed at 11.1.2.1 The begins formatting A and General with scheme standard DIGITAL the definitions, Tnen LIST CONTROLS increases format s given Format - for here if the the for your a memory has identification keywords readability microprograms has been information. any and definitions, continues with it field followed by macro-definitions. the action-part of a microprogram is given. It consists of a sequence of microinstructions. 11.1.2.2 Microinstruction The for rules 1. |f the microinstruction the microinstruction address at the information on 3. If - formatting a microinstruction Precede 2. Format by margin and do general and as comments. address, do follows: not give that include any other line. the microinstruction has a left any summarized has an explicit left-margin that are not label, include any give other that at the information on label that line. L. Include as many will 17) 5. fit in instruction-parts, the and continuing Place any columns separated starting at the by second commas, tab as (column to column 38. line-specific comments at allocation mode is a branch to the fifth tab (column Ly). 6. If the instruction-part with ]. Sepa-atas each microinstruction mict oprogram by one or 11.2 THE OUTPUT The output £xcept that from more blank conc lude the next-address. the remainder of the lines. LISTING listing of the random the a microprogram corresponds assembler prints some additioral to the input information, listing. namely: MiCRO2 LISTING AND o A LIST CONTROLS table of .PAGE contents, line with the output A A o Page headings at o Microword line number at o A o A map () An error brief table of and and top of each giving in each line. page. the memory, address, and bits the microprogram. any errors are detected. listing each of the above items is given the text in ¢the on the Contents contents .PAGE placement of is the .TOC table logical of section of and .TOC lines and detail in 11.2.2 Line Chapter Chapter Since blank the 2. of lines within the by which table of A good table of collecting listing. listing Judicial results in a you can quickly reference any As the size contents the the table of example of of a microprogram increases. contents are described the contents can be The number use of found in .TOC lines the to sample 9. Numbers numbers starts .PAGE by beginning the construction of comprehensive in the the microprogram. the value of program to contents, increases, produce a constructed 1lines useful MICRO2 1line .TOC the beginning of summary and statistics report. The Table O0f .TOC which each sections. The in if reference description of 11.2.1 the information, Error messages, cross iisting line number at the beginning of each microinstruction o following formed by assigned 11-3 listing. o for its Page each at | input and line. continues, lines and comments unusual for a However, the line small limit in are assigned microprogram of line increments 99999 is of is 1, a decimal through line numbers, to occupy several seldom exceeded. number, 99999. it thousand is not lines. MICRO2 LISTING AND '1.2.3 LIST CONTROLS Page 11-4 Page Headings The assembler divides the contains line, a heading microprogram. The output a 1listing into pages. tach page sub-heading line, and 54 lines of the i tems of page heading listing file gives the following information: o The output o The name and version assembling The !f a f number The time and o The program o The page number. date of title, contains as derived o The subtitle derived from line in given, the are assembler used Iin is not is from the .T!TLE last .TOC cr line. specification given left subtitle part Page headings MICR0O2 the following: input heading the assembly. The .TITLE file the o the of the microprogram. o sub-heading specification the the microprogram, blank. is left illustrated Similarly, if keyword then no line. the title part .TOC or lines are given in on the blank. in the sample output Llisting Appendix B. 11.2.4 The Microword information The main-listing portion of the microprogram file page left into program, two fields. The the octal or microinstruction. microprogrex, as The is tne in the program. the such a case, field left of can give right the user microword the microprogram. hexadecimal prepared by The width You field contains field Listing .NOBIN controls the main-listing input determined by listing corntrol divided representation contains as is the object part to the 'ny error messages placed there by MICRO2. of source part the the of the to MICRO2. the width of suppress are described reproduces the of input the widest the object part of in Section 11.3. In listing, except for MICRO2 LISTING AND L!ST The microword informat the microword object, For memory address example, consider Appendix U This line location If an is indicates 13 error error the a the memory, following digit address, and bits of 1listing in allocated to format: ... microword that in memory Error to on contains n 11-5 line from the output 1041,001%4 printed easy Page B. 13, 11.2.5 CONTROLS the octal word '10410014' is U. Messages is detected by in a microprogram the assembler find within messages the preceding listing begin with all the because, the line, that string then an error line. instead Error of '?7?7?77', a message messages line followed by are number, the error message. Appendix 11.2.6 D lists reference information The cross With of about reference the error messages. listing following field O macro and value the name consists of is defined list of up to lines listing rather the on which for its definition and any following define all the cross line numbers. is followed by the The cross-reference a numeric in the program and gives appears. three parts, one for names field-names, ordered indicate number of name it names the exception of an in which classes: expression names by lists each places o followed with listing the () numbers assembler The Cross Reference Listing The cross each of a '#' character. the name field-name is references to the The other line referenced. contains lines on which than symbolic value. the reference gives the name The |ine number on which a The field. only field was set of the line referenced value-names MICRO2 LISTING AND LIST CONTROLS Page ‘s an example of a cross reference excerpt from the cross ALU 1L# 20# 167 A This cross reference listing 11.2.7 The Map Listing MICRO2 produces shows A map and to listing for map listing shows line set of number is contains line |f llocated by characters is the an by address This a line line '"=" the is is defined used of lines in used the the by the microword 1location identifies plus 1 line line 215, an address with:n corresponding space 208. and a map no a location was neither of according on which the is allocated, and so on. listing Llocation Ol listing If is a allocated follows: lowbound-highbound line by these to its is starting the line on in Appendix B. allocated according to is allo.ated according to a so on. blank. that have the identifies in memory U location 00 line line allocated indicator line shows that |f location 150 154 on a '":'", the the addresses. the line address, If was assignment. the starting consists of character. U OO 208= 215= 221= 14k 147 as number followed by chose next '":" the map lines ALU addresses indicator or address The the following constraint those the name memory the line from message, following line 20 and used on each unconstrained indicator allocated. constraint on If an MICRO2 for A number the starting address Consider field memory-indicator, "=", absolute present, line is by a line allocation algorithm The first the indicators. followed onstraint. which address, followed optionally number the map each the B. it. listing a that a for consider Appendix is defined on The microprogram and, allocated in 196 207 on line 14, The value name A 167, 196, and 207. microprogram. 1listing, reference given 11-6 Unused not allocated, range of MICR0O2 addresses addresses are leaves is blank, indicated the then by a MICRO2 LISTING AND 11.2.8 LIST CONTROLS Page 11-7 The Summary The summary contains memory usage a list of breakdown, all and a the count errors of MICR02 the warning detected, and total a error messages. For each error cdetected, MICR02 gives the line number and the text of the message. For each memory, MICR02 the highest address The error message count how error many messages and the 11.3 The are THE ULD ULD file down related into to is the object address definitions used and the Finally, number related and were issued the warnings symbol to lexical and and error processing resolution. followed by produced by MICRO2. a code used in section, It consists followed by of an the set of the program. The Header The header, if present, the direction The Code contains in which loaded into information about the bits the program radix are numbered. Section The code section contains be of microwords how many warnings issued. file field and 11.3.2 number FILE header and total allocation optional 11.3.1 the indicates messages were broker number gives allocated. the control the address and store in the content of following each microword to format: [address] memory-id = contents For This If example, consider [11Ju = 16070012 line indicates the following that word the memory-indicator is 11 of code-section memory not given, it is has line: the assumed contents to be U. 16070012. MICRO2 LISTING AND )1.3.3 In Page 11-8 Field and Address Definitions this section of defined in A special the LIST CONTROLS the contro! field the ULD file, U memory and are .ALLMEMFIELDS address all the field and field-value names given. is names provided from for other those who want to memories as well as see the U memory. For example, under the consider the .ALLMEMFIELDS FIELD following portion of a ULD file produced control: D_FLD/=<0:2> s MEMORY /D DVALI1=] DVAL2=2 DVAL3=3 FIELD UCODE_DATA_FLD/=<0:5> ; MEMORY /U UVA'.1=] UVAL2=2 UVAL3=3 ADDRESS U_JMP/=<6:12> s MEMORY /U UADDR1=122 UADDR2=222 ADDRESS VING/=<3:19> s MEMORY /D D_ADDR=11 D_ADDR=12 D_ADDR=13 The above if, portion however, field and contains you do address FIELD not names field-names give from the from both the U and .ALLMEMFIELDS control, the U memory are given, as D memory. then only the follows: UCODE_DATA_FLD/=<0:5> UVAL 1= UVAL2=2 UVAL3=3 ADDRESS U_JMP/=<6:12> UADDRI1=122 UADDR2=222 11.4 The LIST CONTROLS list you want For controls to see example, definitions let suppose must microprogram. you specify which portions of reflected But you be this have the a first set the to suppress suppression by .LIST after of listing definitions. successful few assemblies, want the output file. long for therefore, listing the definitions and a the output present after ese definitions and, an accomplish in assembly you their inserting a the definitions. don't These of listing. .NOLIST our change You before MICRO2 LISTING AND LIST CONTROLS MICRO2 determine:; whether looking MICRO2 at a contributes negative number, The list or counter. to not If the are as Keyword to make a a Iincrement the listing counter the listing counter .CREF Increment the cross reference counter -NOCREF Decrement the cross reference .BIN Increment the object counter .NOBIN Decrement the beginning List control suppresses the counter object or with .BIN the with an assembly, the .CREF cross a and after .NOBIN macros each is listing. of counter produced the last by line of in the counter listing. has the value O. Counters positive, If part cf an output and expand counter of (1eft field) to the is instruction. not specified not by counter the field/value pairs associated with whether part of Do The List Control list fiie counter Decrement part The the .NOLIST specified a follows: the if If to positive number, LLIST .NOEXPAND 11.4.1 file. a not contribute. expanding macros the contains 11-9 Meaning .EXPAND At contribution the counter associated MICRO2 does controls Page the the controls listing .NOCREF reference map. is then iist MNICRG2 control is .NOLIST produced. control The counter determines whether is creates negative, the MICR0O2 listing. .LIST and listing the a produced. contrdols whethar or or not determines associated the object The counter associated not names will be added MICRO2 LISTING AND LIST CONTROLS Page 11-10 }uppose we 3add some list controls to a microprogram as follows: Fommm e + ! LTITLE LA : : o+ ! .NOLIST : ! | | | | | | 1 i L I LLIST B : - -+ : ) C D ' ittt + .NOCREF : : | ] I i D | ! .CREF : S e+ } ! } .NOLIST ! | | F1) el + ! .NOBIN : ! ! .BIN e D ! | } 'E } : } -+ } | F2} bl e m e -+ These list file creation. object The fact combine controls file that partition The file contains reference listing the } the program for purpose segments A, B, C, F1, segments A, B, D, C, and list controls operate with and the file contains segments contains programs F still retain the same A, and C, F2. of and The output D. The cress F. a counter list control allows you structure. to MICRO2 LISTING Consider AND LIST CONTROLS Page the following example: PROGRAM 1 PROGRAM 2 4+ : I : | ettt + A I NOLIST : | bt + ' : .NOLIST | | Bl: } e bbbt + ! : b LLIST B ! ! ! I : .LIST Il I | | | | ' | R : ! it + T C ! T+ JNLIST ! ] ] IS 1 bl bbbl DL+ I ! Lt b T+ .NLIST : I 11-11 { .LIST | i D LLIST | et TR + : € I 1 ] } e+ If we assemble these programs separately, we get 1listing files as follows: Program We can logical Listing 1 A, 2 R insert program result. 2 If nonlisting segment), insert program contrc s within program 2 was at the listing when 2 a in we Cl1 file C, Segments and E program 1 insert program listing of (that is, program 2 separate at any place 2 at program 2 is within a are segment. and Bl get the (that is, suppressed. listing segment), interpreted just as if correct within a If we then the they were CHAPTER USING To use MICRO2, command 1line describes you invoke chat specifies the wuser it at 12 MICRO2 command the output interface in the level and and input VAX, then give files. DEC 10, a MICRO2 This chapter and 0NEC 20 environments. 12.1 In VAX/VMS INTERFACE the VAX/VMS environment, you call MICR02 at command level as shown 'elow: Format e ettt e T TS+ ! ! MICRO2 i input-file-spac ! | ! ! E | File Qualifiers : .......... P 1 | : /LIST[=file-spec] | ! H /NOLIST /ULD [=file-spec] /NOULD e e | ! ! : } T T S + Prompts _file: input-file-spec File-Parameters Input-file-spec Specifies specify the names nf one or more to separate than one fiie-specs. input more files file, to be assembled. you can use |f you the character '+’ USING MICRO2 Page 12-2 Description MICROZ and assembles produces a the programs listing file contained and an in object the input-file-spec file. File Qualifiers /LIST [=file-spec] Specifies that you file-spec, MICRO2 not a file-spec, the first or include want the name of files, with the default listing file is a listing produces the MICRO2 input listing uses file extension described in file. If you in that name of the include file. |If you co the input-file, in the case of .MCR for the listing Section a multiple input file. The 11.2. /NOLIST Specifies /ULD that you do not want a listing file. [=file-spec] Specifies that file-spec, do not the you MICRO2 include name of a the want the default file is in MICR0O2 input extension described object-file. the object file-spec, first with an produces file .ULD Appendix file uses in for the the If in you that name of multiple the object include file. the input file. If input, file The a you or cape, object C. /NOULD Specifies that you do not want an object-file. Examples 1. AMICROZ ALPHA MICR0O2 assembles produces a the listing program file in the ALPHA.MCR file and ALPHA.MIC and object file the ALPHA.ULD. 2. MICRO2/1'ST=BLTA MiCRO2 sssembles produces the ALPHA the program 1listing file in the BETA.MCR file and ALPHA.MIC the obiect and file ALPHA.ULL. 3. MITRO2/NCULD MICRO2 ALPHA+GAMMA assembles ALPHA . MIC and the program formed GAMMA.MIC and by the produces concatenation the of iisting file ALPHA.MIC and 2.LPHA.MCR. b. MICRO2/LIST=BETA/NOULD MICR0O2 assembles the producee the an object file because listing ALPHA program file in BETA.MCR. the qualifier the file MICR0O2 does /NOULD not is given. produce USING MICRO2 Page 12-3 .i le-Specifications MICR0O2 accepts error reporting, name to the and processes MICRO2 first six legal VAX filename. abbreviates any long filenames characters and the extension For by to purposes of truncating the the first three characters. 12.2 To DEC 10 COMMAND R the comna for information the command information followed an "='" by you give more microprogram fol you the is closed and the second input file, of input on that from file not one type one of the can locder. produced. is produces the an The of an the all file is read, by a followed That files are the is load not an the the in the The input files. listing-file. the end this way, such the name of If a the first listing object-file file specified, is the file file. 11.2. input module indicating rejects name of Section the in that processed. MICR0O2 uses for then continues M!CR0O2 listing on then reads given Processing continues with end-of-file, numbers. in assembler the order load module on the file in Processing given as object-file format followed the object file-specifications. is opened. .MCR described MICR02 character. files input the output the extension (*) is: file, ready. specified, be subsequentiy If file is for input input again until line not invocation, {input-file},... first until is The assembler The to file, listing the input contain any produces file and the information specified file, listing-file the listing-file second The assembler The output in consists of object-file = the files must given an asterisk than from not owed by assembly-command-line. moving is the command listing-file, file 10, information with the fiie-specification character the form of irput the DEC command-information command The command If on MICRO2 prompts 's, level : R MICR02 by INTERFACE invoke MICRO2 at command following iIf LINE and that for the microprogram no 1load described in module Appendix is C. USING MICRO2 You get an object include the ",' file, if character you specify preceding an it. object file consider the name or Page 12-4 if you following MICRO2 calls: Call R MICRO2 Result A,B=C MICRO2 assembles C.MIC and and R MICRO2 A,=C the the produces object file MICRO2 assembles listing file program the in the file listing file A.MCR B.ULD C.MIC A.MCR and and produces the object the file produces the C.ULD R 12.2.1 A File file MICRO2 ,B=C MiCRO2 assembles object file C.MIC and B.ULD Specifications specification has the following form: diskname:filename.ext [PPN] Diskname, omitted, 12.3 ext, the DEC 20 and You invoke MICRO2 exception level, MICRO2 are all optional. or PPN If is diskname or PPN are system, the assumed. INTERFACE only command PPN user's defauli disk on the is that you simply DEC-20 system just instead of type MICR02, as typing as on R the 10 followed by MICRO2 .* follows: APPENDIX MICRO2 LANGUAGE This appendix provides a First, of the syntax of the elements used A.1 MICR02 SYNTACTIC reference language SUMMARY to the is given. MICR0O2 language. Then a summary is given to build a MICRO2 source program. SYNTACTIC SUMMARY The MICRO2 syntactic defau!ts for 'xamples quick the A of the summary g¢gives the syntax, MICRO2 language. Following restrictions, and information, this the syntax are given. The syntax notation used tc express the MICR02 language the syntax notation used in the BL!ISS Language Guide detailed description of the notation is contained is the same as (AA-H275A-RK). in Chapter 3 of A that manual. Briefly, a contains contains the syntactic name being defined. the definition. syntactic Concatenation rule is given is expressed after another. The above rule defines a followed by isiunction the character is character '}' disjunction the the box the box the terms one is: field-name / field-contents-indicator to be a field-name '/'. possibilities possible either or by giving them on separate is: The a concatenation expressed by enclosing the distinguishing left part of The right side of in the definition by writing An example of field-contents-indicator in a box. by terms in braces and separating lines. An them by the example o a MICRO2 LANGUAGE SYNTACTIC SUMMARY octal-digit The atove and so rule {011121314]516)7} defines an octal example of a disjunctin Omission is indicated by a disjunction. above rule left-bit defines followed by first character. a by is a '0' or a '!' or a '2' rule defines arguments separated the valid definitions °',' of a possibility character the replication ,... ] to be a followed by 'arg-part': [ argument ] [ argument, argument ] [ argument, argument, argument ] > a right-bit separator, 'arg-part' } to be either indicated by by as right-bit } '>'. [ argument The above : nothing followed by a 'nothing' is: { followed by example of arg-part term { field-spec contains An the omission left-bit ':' left-bit replication replication are all including < followed Finally, the be is: An example of field-spec ‘<" to { octal-number } { decimal-number } { hexadecimal-number } number The digit on. Another in Page A-2 '<' followed follcwed sequence separator by '>' by or a '...'. |If appears as the is: '[' ']'. followed by one or That is, more the following MICRO2 LANGUAGE SYNTACTIC SUMMARY '.l.l Page A-3 The Program program { { .LTOR | .OCTAL ! memory memory .RTOL | nothing } .HEXACECIMAL ! nothing } ... identification-part definition-part microinstruction-part identification-part { { { { { { { memory-indicator ! nothing } .WiDTH/word-width | nothing } .TITLE/" " 1 nothing } .VERSION/" " | nothing } .REGION {/low-address, high-address} | nothing .RANDOM ! .SEQUENTIAL | nothing } memory-indicator { .UCODE ! word-width decimal-integer low-address expression-subject-to-program-radix { .OCODE ! .DCODE .CCODE | .ECODE ! .MCODE | .ICODE } } high-address A.1.1.1 Defaults - memory-indicator program-radix .UCODE .OCTAL bit-order .LTOR allocation mode word-width -RANDOM highest bit specified field-definition plus A.1.1.2 Restrictions 1 - 1. 0 < word-width <= 128 2. low-address < high-address in a ... } } MICRO2 LANGUAGE A.1.1.3 SYNTACTIC SUMMARY Page A-bL Examples - -RTOL .OCTAL .DCODE -WIDTH/6k -.REGION/0100,0177 -.RANDOM A.1.2 The Definition definition-part field-definition Part { field-definition } { macro-definition } ... field-name/=field-spec { , qualifier... { nothing } } { value-name = value-spec }... { : right-bit } field-spec < left-bit qualifier { .DEFAULT = expression { .ADDRESS { .NEXTADDRESS { .VALIDITY = expression { .FLOATEPARITY } } } { .FLOATOPARIYY } value-spec field-name } value > } } {ti-value} {,t2-value}} { , {nothing } {nothing 3} { name-char { space } ...} { { nothing } } { nothing name name name-char { } { value-name } name-char { nothing letter | number | } special-char } {.VALIDITY} {nothing } MICRO2 LANGUAGE SYNTACTIC SUMMARY Page A-5 letter {Aa|B}b} ... number {ol1r1 191} special-character (v 21 #8 ) ... (V) | 2} Ve 2} = 2 _} {<})> } space { space-character space-character { blank left-bit } right-bit } decimal-integer value integer-subjecti-to-program-radix A.1.2.1 Restrictions 1. 2. | txamples } tao } - |If .LTOR >= right-bit If .RTOL Either specified, specified, then in then left bit <= .NEXTADDRESS or once and only once k.1.2.2 ... field-definition CLKT1/= <17>, .default = <CLKTI1/NO> YES = | ;Do not clock TI sLoac T1 ALU output with field-spec .ADDRESS must per memory. - NO = O a left-bit right-bit be specified Page A-6 MICRO2 LANGUAGE SYNTACTIC SUMMARY number expression-name expression field-conten s-indicator Nt field-value-identifier function-call number v gt St Expressions gt Nt A.1.3 octal-number decimal -number } } hexadecimal -number } octal-number octal-digit ... decimal-number decimal-digit hexadecimal-number hex-digit octal-digit ol 1121314157671 ... decimal-point
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies