Assembler Language Macro "Boot Camp" Part 2

Size: px
Start display at page:

Download "Assembler Language Macro "Boot Camp" Part 2"

Transcription

1 Assembler Language Macro "Boot Camp" Part 2 SHARE in Austin March 1-6, 2009 Session 8159 Who am I? Michael Stack, K Cats Consulting Instructor in Computer Science at Northern Illinois University from , including assembler language, data structures (in assembler), and applied systems programming Available Materials Materials described in these two sessions, as well as the Assembler Boot Camp, can be found at Yesterday's Agenda (Brief Review) Our First Macro Instruction The Second Version of Our ADD Macro The Macro Programming Language 1-4

2 Today's Agenda Variable Symbols We Can Change A Bit More on Variable Symbols Finally, the Add Macro Instruction Wrap Up Variable Symbols We Can Change (So that's why they're called Set Symbols) Set Symbols Now that we have AIf and AGo to control the path of code generation, it will be very useful to have a way to keep assembly-time data Assembler variables which can hold this data are called set symbols, of which there are three data types Arithmetic Binary (logical) Character Set Symbol Scope As with high level languages, set symbol variables have the scope characteristic The value assigned to a local set symbol is known only within one macro expansion, and each expansion of that - or any other - macro has its own copy of that local variable The value assigned to a global set symbol is known throughout the assembly 5-8

3 Set Symbol Declaration Modern assemblers do not require that local Set Symbols be declared before use (older assemblers do, though) But it's a good idea to declare (and globals require it), as it's a great place to document the purpose of the variable Declaration describes the variable as Local or Global Arithmetic, Binary, or Character Set Symbol Declaration To declare a local set symbol of type x (where x is A, B, or C): seq_sym Lclx var_sym 1,var_sym 2,... where seq_sym may be a sequence symbol and each var_sym n is a variable symbol To declare a global set symbol of type x: seq_sym Gblx var_sym 1,var_sym 2,... Although more than one set symbol can be declared in one statement, limiting to one leaves room for a descriptive comment Arithmetic Set Symbol Assignment The SetA instruction is used to assign a value to an arithmetic set symbol (from now on called a SetA symbol) var_sym SetA arithmetic_expression var_sym is a variable symbol and arithmetic_expression (as described earlier) is evaluated as a signed, 32-bit number The default (initial) value of a SetA symbol is zero Arithmetic Set Symbol Assignment Example Here is some sample code: LclA &S Counter LclA &Con Assigned "constant" &S SetA 3 Initial value &S SetA &S+1 Increment by 1 &Con SetA 2*(1-&S) Set &Con to -6 And here's a real oddity: when &Con (whose value now is -6) is used in a model statement, its absolute value is used: DC F'&Con' Generates (Don't ask) 9-12

4 Arithmetic Set Symbol Assignment Example Here is some more sample code, this one to generate all of the register equates: Macro EQURegs GblA &EQURegs Recall if already done LclA &Reg Counter (initially 0) AIf (&EQURegs NE 0).Done &EQURegs SetA 1 Don't generate again.loop ANOP R&Reg EQU &Reg &Reg SetA &Reg+1 Increment reg number AIf (&Reg LE 15).Loop.Done MEnd Arithmetic Set Symbol Assignment Example Here is the output (assembler source) from EQURegs (first time only!) EQURegs +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU R12 EQU 12 +R13 EQU 13 +R14 EQU 14 +R15 EQU 15 Arithmetic Set Symbol Assignment Example Here is a slightly different version of the same macro (loop test at top): Macro EQURegs GblA &EQURegs Recall if already done LclA &Reg Counter (initially 0) AIf (&EQURegs NE 0).Done &EQURegs SetA 1 Don't generate again.loop AIf (&Reg GT 15).Done R&Reg EQU &Reg &Reg SetA &Reg+1 Increment reg number AGo.Loop.Done MEnd Binary (Logical) Set Symbol Assignment The SetB instruction is used to assign a value to a binary set symbol (from now on called a SetB symbol) var_sym SetB binary_value var_sym is a variable symbol and binary_value (described in the next slide) is evaluated as a 0 or 1 The default (initial) value of a SetB symbol is zero 13-16

5 Binary (Logical) Set Symbol Assignment A full description of the binary_value operand of SetB is beyond the scope of these sessions; simplified, it can be one of A binary digit (0 or 1) A binary value enclosed in parentheses An arithmetic value enclosed in parentheses If the value is 0, the assembler assigns a value of 0 to the symbol in the name field; if the value is not 0, the assembler assigns a value of 1 A logical expression enclosed in parentheses Binary (Logical) Set Symbol Assignment Examples Each &X starts with initial &A, &B, & &C &A SetA 4 &B SetB 1 (Note no parentheses) &C SetC 'XYZ' (This is a preview of SetC!) * &X SetB (&B) &X =? &X SetB (NOT &B) &X =? &X SetB (&A LE 15) &X =? &X SetB ('&C' EQ 'XYZ') &X =? &X SetB ((NOT &B) AND (&A LT 15)) &X =? &X SetB ((&A GT 0) AND (&A LT 15)) &X =? &X SetB (&B OR ('&C' EQ 'YES')) &X =? &X SetB (&B AND NOT (&A GT 5)) &X =? Character Set Symbol Assignment The SetC instruction is used to assign a value to a character set symbol (from now on called a SetC symbol) var_sym SetC 'character_string' note quotes! character_string is a sequence of characters and variable symbols (followed by '.' for concatenation) interpreted as characters The initial value of a SetC symbol is the null string Character Set Symbol Assignment Examples Here is a SetC example: &A SetA 4 &B SetB 1 &C SetC 'XYZ' * &X SetC 'A&A.B&B.C&C.' &X =? &X evaluates to the string A4B1CXYZ Note that the arithmetic and binary values have been converted to character values (See Concatenation in the next section) 17-20

6 Substrings of SetC Symbols Definition SetC operands can also be substrings by placing two arithmetic expressions, separated by commas and enclosed in parentheses, immediately following the character expression The first arithmetic expression identifies the first character of the substring The second arithmetic expression gives the length of the substring Substrings of SetC Symbols Examples 'ABCDEF'(3,2) evaluates to 'CD' If &VAR evaluates to 2 and &STR evaluates to 'ABCD' then '&STR.%'(2,&VAR*2) evaluates to 'BCD%' 'AB'.'CD'.'EFG'(1,2).'H' evaluates to 'ABCDEFH' (For. see concatenation in the next section) Meeting in Progress A Bit More on Variable Symbols Then we can really go to work! Concatenation Concatenation can sometimes be without ambiguity &this&that (variable.variable) this&that (ordinary.variable) Others are a problem &thisthat (variable.ordinary intended) We use the concatenation operator '.' to avoid the ambiguity &this.that 21-24

7 Symbolic Parameter Sublists A single macro operand can be a list of elements, called a sublist, with one or more items enclosed in parentheses and separated by commas (X,2,Y) An individual sublist item can be referred to by a subscripted symbolic parameter, so if &ABC has the value (W,15) &ABC(1) has the value W &ABC(2) has the value 15 But &ABC.(1) has the value (W,15)(1) Keyword Symbolic Parameters Macro prototype statements may have keyword operands as well as positional These are coded on the prototype as &Keyword=[default] The default value is optional The advantages of keyword parameters are They can have a default value They can be coded in any order when invoked But positionals look more like operands System Variable Symbols The third kind of variable symbol after symbolic parameters and set symbols is the set of system variable symbols These all begin with &SYS so this prefix should be avoided in programmer-created variable symbols Some popular examples &SYSTIME - time of the assembly &SYSDATC - Y2K-compliant date of assembly &SYSNDX - (see the following slides) System Variable Symbol &SYSNDX Here is a macro - what's its problem? Macro &name AddVal &num,&val Macro to add &val to &num L 0,&num A 0,FWrd ST 0,&num B FWrd+4 FWrd DC F'&val' MEnd 25-28

8 System Variable Symbol &SYSNDX The way it's written, it can be used only once in an assembly (because of FWrd) We can fix this by concatenating &SYSNDX &SYSNDX has a new value assigned by the assembler each time a macro is called For the first macro, &SYSNDX is 0001 It increases by 1 for any macro invocation Until it goes past 9999, it is four characters This can provide unique labels for macros System Variable Symbol &SYSNDX Here is the macro rewritten using &SYSNDX Macro &name Add1 &num,&val Macro to add &val to &num L 0,&num A 0,FWrd&SYSNDX ST 0,&num B FWrd&SYSNDX+4 FWrd&SYSNDX DC F'&val' MEnd Attributes of Symbols As should be expected in a HLL (!) like assembler, symbols have attributes We will be concerned with only three Type, which distinguishes one form of named object from another, such as character data from binary data Count, which gives the number of characters required to represent the data as a character string Number, which gives the number of sublist entries in a macro instruction operand Attributes of Symbols We can refer to these attributes inside macro instructions by using a single letter followed by a single quote: T' K' and N' For example in the Add1 macro T'FWrd&SYSNDX is F And if we invoke as Add1 F4,18 then K'&num is 2 N'&num is 1 We will see more in the next slides 29-32

9 Finally, The Add Macro Instruction In which we analyze and demonstrate an overloaded Add Add Macro Definition: Prototype and Doc Box 1 Macro &Name Add &List,&Sum,&R=1,&WKR=0 ******************************************************************* Function: This macro generates assembler instructions to add multiple values held in storage as fullword, halfword, and packed data. The first operand is a sublist of the labels on the numbers to be added. The sum will be returned in register R= as a binary value. Optionally, the sum may be returned in storage at the location given by the second operand, which must be of the fullword, halfword, or packed data type. Instructions will be generated appropriate to the data types. Prototype Statement: &Name Add &List,&Sum,&R=1,&WKR=0 Add Macro Definition: Prototype and Doc Box 2 Symbolic Parameters: &List is a sublist of the values to be added, consisting of labels of storage areas of types F, H, and P (required) &Sum is a label of type F, H or P and is the calculated sum (optional) &R= is the sum accumulation register; it is required and must be different from &WKR=; &R always has the result &WKR= is a scratch register for CVB and CVD instructions in case the sum or any summand is type P (required if any binary<->decimal conversion is necessary) Error Conditions: Missing summand sublist (8) Incorrect sum or summand type (4) Add Macro Definition: Prototype and Doc Box 3 Notes: Two registers are altered and not saved. By default these are R0 and R1. This exercise and solution are patterned after the ADD macro in _Assembler Language Programming for the IBM 370, ASSIST Edition_, by Frank M. Carrano, p ******************************************************************* 33-36

10 Add Macro Definition: Set Symbol Declaration & Init Define and initialize local set symbols LclA &J &List loop counter LclB &P 1 if decimal summand seen, else 0 LclC &A Current binary operation (L or A) LclC &DEC Current decimal op (ZAP or AP) LclC &H 'H' if LH or AH, '' if L or A LclC &D Unique label for work area LclC &NM &Name for flexibility in use &J SetA 1 Start with first summand &P SetB 0 No decimal summands yet &A SetC 'L' First time use L, then A &DEC SetC 'ZAP' First time use ZAP, then AP &H SetC '' Set to 'H' if binary is halfword &D SetC 'DWrd&SYSNDX' Unique label for D work area &NM SetC '&Name' &NM can be cleared, &Name cannot Add Macro Definition: Initial Check, Main Loop Sublist &List is required - quit if not present, CC=8 AIf (K'&List NE 0).Loop MNote 8,'** Error: Required list of summands missing ***' MExit, Begin loop to process summands.loop AIf (T'&List(&J) EQ 'P').Decimal AIf (T'&List(&J) EQ 'F').FullBin AIf (T'&List(&J) EQ 'H').HalfBin MNote 4,'** Warning: Invalid summand type - &List(&J) **' &J SetA &J+1 Increment loop counter AIf (&J LE N'&List).Loop Continue if more summands AGo.EndList Else done with list Add Macro Definition: Process Binary and Decimal Process binary load or add, either halfword or fullword.halfbin ANOP, &H SetC 'H'.FullBin ANOP, &NM &A&H &R,&List(&J) Increment binary part of sum &A SetC 'A' Use A after first L &H SetC '' and set fullword default AGO.LoopEnd Continue Process decimal zero and add, or add.decimal ANOP, &NM &DEC &D,&List(&J) Increment decimal part of sum &DEC SetC 'AP' Use AP after first ZAP &P SetB 1 We have seen a decimal summand.loopend ANOP, Add Macro Definition: Add Dec Summand, Dec Result Bottom of loop - check if any more summands &J SetA &J+1 Increment loop counter &NM SetC '' Clear &NAME holder after first use AIf (&J LE N'&List).Loop Continue if more summands All summands processed - if any were dec, get binary of their sum.endlist AIf (NOT &P).NoDSum Skip if no decimal summand CVB &WKR,&D Get binary sum of decimal summands &A.R &R,&WKR Add to sum of binary summands If the result is to be decimal, convert result to dec, then save.nodsum AIf (T'&Sum EQ 'O').CKD If omitted, don't save result AIf (T'&Sum NE 'P').NoDRes Skip if no decimal result CVD &R,&D Get decimal sum of summands ZAP &Sum,&D Copy to target AGO.CKD Go generate DWORD 37-40

11 Add Macro Definition: Store Result, Gen Temp Storage If the result is to be binary, save as halfword or fullword.nodres AIf (T'&Sum EQ 'F').SaveSum AIf (T'&Sum EQ 'H').HalfSum MNOTE 4,'** Warning: Invalid sum type - &Sum **' AGO.CKD Bad type, don't save sum.halfsum ANOP, &H SetC 'H'.SaveSum ST&H &R,&Sum Save result If any decimal summands or result, generate scratch doubleword.ckd AIf (T'&Sum NE 'P' AND NOT &P).MEnd B &D+8 Branch around doubleword &D DS D Scratch area.mend MEnd Add Macro Output: Example 1 This is similar to the code in ADD2, except that this uses the RX add instead of RR (A instead of AR) * Add (Word1,Word2),Word3 + L 1,Word1 Increment binary part of sum + A 1,Word2 Increment binary part of sum + ST 1,Word3 Save result... * Word1 DC F'4' Word2 DC F'6' Word3 DS F * Add Macro Output: Example 2 AddDemo Add (One,Two,Three,Two,Three,One),Three +AddDemo L 1,One Increment binary part of sum + AH 1,Two Increment binary part of sum + ZAP DWrd0009,Three Increment decimal part of sum + AH 1,Two Increment binary part of sum + AP DWrd0009,Three Increment decimal part of sum + A 1,One Increment binary part of sum + CVB 0,DWrd0009 Get binary sum of dec summands + AR 1,0 Add to sum of binary summands + CVD 1,DWrd0009 Get decimal sum of summands + ZAP Three,DWrd0009 Copy to target + B DWrd Branch around doubleword +DWrd0009 DS D Scratch area... * One DC F'1' Two DC H'2' Three DC PL2'3' Wrap Up In Which We Learn That Only a Small Fraction of the Macro Language Has Been Covered 41-44

12 Summary Two hours is just a start, but a good one For further information, John Ehrman often gives sessions at SHARE on advanced macro techniques: 'Assembler as a Higher Level Language' Basic Conditional Assembly and Macro Concepts Applied macro techniques Some of What Wasn't Covered Set symbols Subscripted set symbols and extended Set statements SetAF and SetCF Created set symbols Many data attributes (length, scaling, integer, etc.) Many system variable symbols &SYSLIST in particular Some of What Wasn't Covered Controlling macro expansion listing using PRINT GEN / NOGEN Defining macros within macros (!) Using macros to create job streams (SYSGEN) - important to understand SMP/E Using conditional assembly in open code (outside macros) Nevertheless... You now have a basic understanding of S/390 and z/os assembler macro language You have seen what comprises a macro written in assembler language And you are ready, if you wish, to begin writing macros (the best way to learn) and go on to the next step So,

13 Congratulations! 49-52

Assembler Language Macro "Boot Camp" Part 2. SHARE in Austin March 1-6, 2009 Session 8159

Assembler Language Macro Boot Camp Part 2. SHARE in Austin March 1-6, 2009 Session 8159 Assembler Language Macro "Boot Camp" Part 2 SHARE in Austin March 1-6, 2009 Session 8159 1 Who am I? Michael Stack, K Cats Consulting Instructor in Computer Science at Northern Illinois University from

More information

Assembler Language Macro "Boot Camp" Part 1

Assembler Language Macro Boot Camp Part 1 Assembler Language Macro "Boot Camp" Part 1 SHARE in Austin March 1-6, 2009 Session 8158 Who am I? Michael Stack, K Cats Consulting Instructor in Computer Science at Northern Illinois University from 1982-2007,

More information

Assembler Language "Boot Camp" Part 3 - Assembly and Execution; Branching SHARE 115 in Boston August 3, 2009

Assembler Language Boot Camp Part 3 - Assembly and Execution; Branching SHARE 115 in Boston August 3, 2009 Assembler Language "Boot Camp" Part 3 - Assembly and Execution; Branching SHARE 115 in Boston August 3, 2009 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems & Technology

More information

Assembler Language "Boot Camp" Part 2 - Instructions and Addressing. SHARE 118 in Atlanta Session March 12, 2012

Assembler Language Boot Camp Part 2 - Instructions and Addressing. SHARE 118 in Atlanta Session March 12, 2012 Assembler Language "Boot Camp" Part 2 - Instructions and Addressing SHARE 118 in Atlanta Session 10345 March 12, 2012 1 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems

More information

Assembler Language "Boot Camp" Part 2 - Instructions and Addressing SHARE 116 in Anaheim February 28, 2011

Assembler Language Boot Camp Part 2 - Instructions and Addressing SHARE 116 in Anaheim February 28, 2011 Assembler Language "Boot Camp" Part 2 - Instructions and Addressing SHARE 116 in Anaheim February 28, 2011 Introduction Who are we? John Ehrman, IBM Software Group John Dravnieks, IBM Software Group Dan

More information

z390 Macro Pseudo Code Support

z390 Macro Pseudo Code Support z390 Macro Pseudo Code Support The z390 macro processor has support for macro pseudo code which is generated in a cache memory buffer during conditional macro code source statement parsing for AGO, AIF,

More information

Assembler Language "Boot Camp" Part 5 - Decimal and Logical Instructions. SHARE 117 in Orlando Session 9214 August 11, 2011

Assembler Language Boot Camp Part 5 - Decimal and Logical Instructions. SHARE 117 in Orlando Session 9214 August 11, 2011 Assembler Language "Boot Camp" Part 5 - Decimal and Logical Instructions SHARE 117 in Orlando Session 9214 August 11, 2011 1 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems

More information

Assembler Language "Boot Camp" Part 5 - Decimal and Logical Instructions SHARE 116 in Anaheim March 3, 2011

Assembler Language Boot Camp Part 5 - Decimal and Logical Instructions SHARE 116 in Anaheim March 3, 2011 Assembler Language "Boot Camp" Part 5 - Decimal and Logical Instructions SHARE 116 in Anaheim March 3, 2011 Introduction Who are we? John Ehrman, IBM Software Group John Dravnieks, IBM Software Group Dan

More information

Data Definition, Movement, and Comparison

Data Definition, Movement, and Comparison Topics covered include: Data Definition, Movement, and Comparison 1. Data Definition: the DS and DC statements. 2. The use of literals as statements to define constants. 3. Data movement commands 4. Data

More information

Assembler Language "Boot Camp" Part 4 - Program Structures; Arithmetic. SHARE 118 in Atlanta Session March 14, 2012

Assembler Language Boot Camp Part 4 - Program Structures; Arithmetic. SHARE 118 in Atlanta Session March 14, 2012 Assembler Language "Boot Camp" Part 4 - Program Structures; Arithmetic SHARE 118 in Atlanta Session 10347 March 14, 2012 1 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems

More information

Assembler Language "Boot Camp" Part 4 - Program Structures; Arithmetic SHARE 116 in Anaheim March 2, 2011

Assembler Language Boot Camp Part 4 - Program Structures; Arithmetic SHARE 116 in Anaheim March 2, 2011 Assembler Language "Boot Camp" Part 4 - Program Structures; Arithmetic SHARE 116 in Anaheim March 2, 2011 Introduction Who are we? John Ehrman, IBM Software Group John Dravnieks, IBM Software Group Dan

More information

Assembler Language "Boot Camp" Part 1 - Numbers and Basic Arithmetic SHARE 115 in Boston August 1-5, 2010

Assembler Language Boot Camp Part 1 - Numbers and Basic Arithmetic SHARE 115 in Boston August 1-5, 2010 Assembler Language "Boot Camp" Part 1 - Numbers and Basic Arithmetic SHARE 115 in Boston August 1-5, 2010 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems & Technology

More information

Assembler Language "Boot Camp" Part 4 - Arithmetic; Program Structures SHARE in San Francisco August 18-23, 2002 Session 8184

Assembler Language Boot Camp Part 4 - Arithmetic; Program Structures SHARE in San Francisco August 18-23, 2002 Session 8184 Assembler Language "Boot Camp" Part 4 - Arithmetic; Program Structures SHARE in San Francisco August 18-23, 2002 Session 8184 1 Introduction Who are we? John Dravnieks, IBM Australia John Ehrman, IBM Silicon

More information

Chapter 7: Assembler Directives and Data Definitions

Chapter 7: Assembler Directives and Data Definitions Chapter 7: Assembler Directives and Data Definitions We begin the discussion of IBM Mainframe Assembler Language by making a broad distinction. Every program to be processed on a computer begins in a form

More information

Assembler Language "Boot Camp" Part 1 - Numbers and Basic Arithmetic SHARE in San Francisco August 18-23, 2002 Session 8181

Assembler Language Boot Camp Part 1 - Numbers and Basic Arithmetic SHARE in San Francisco August 18-23, 2002 Session 8181 Assembler Language "Boot Camp" Part 1 - Numbers and Basic Arithmetic SHARE in San Francisco August 18-23, 2002 Session 8181 1 Introduction Who are we? John Dravnieks, IBM Australia John Ehrman, IBM Silicon

More information

Assembler Language "Boot Camp" Part 1 - Numbers and Basic Arithmetic. SHARE 117 in Orlando Session 9210 August 8, 2011

Assembler Language Boot Camp Part 1 - Numbers and Basic Arithmetic. SHARE 117 in Orlando Session 9210 August 8, 2011 Assembler Language "Boot Camp" Part 1 - Numbers and Basic Arithmetic SHARE 117 in Orlando Session 9210 August 8, 2011 1 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems

More information

High Level Assembler for z/os & z/vm & z/vse. Language Reference. Version 1 Release 6 SC

High Level Assembler for z/os & z/vm & z/vse. Language Reference. Version 1 Release 6 SC High Level Assembler for z/os & z/vm & z/vse Language Reference Version 1 Release 6 SC26-4940-07 High Level Assembler for z/os & z/vm & z/vse Language Reference Version 1 Release 6 SC26-4940-07 Note Before

More information

Chapter 16: Direct Conversions Between EBCDIC and Fullword Formats

Chapter 16: Direct Conversions Between EBCDIC and Fullword Formats Chapter 16: Direct Conversions Between EBCDIC and Fullword Formats This chapter presents a discussion of direct conversions between digits in the EBCDIC format and binary integers stored in the 32 bit

More information

SC OS.Assembler H Messages. Program Product. Program Number 5734 AS1 . (

SC OS.Assembler H Messages. Program Product. Program Number 5734 AS1 . ( " SC26-3770-1 / Program Product OS.Assembler H Messages Program Number 5734 AS1. ( " Second Edition (June, 1972) This is a major revision of, and makes obsolete SC26-3770-0 together with Technical Newsletters

More information

High Level Assembler for z/os & z/vm & z/vse. Language Reference. Version 1 Release 6 SC

High Level Assembler for z/os & z/vm & z/vse. Language Reference. Version 1 Release 6 SC High Level Assembler for z/os & z/vm & z/vse Language Reference Version 1 Release 6 SC26-4940-06 Note Before using this information and the product it supports, be sure to read the general information

More information

EXPERIMENT NO : M/C Lenovo Think center M700 Ci3,6100,6th Gen. H81, 4GB RAM,500GB HDD

EXPERIMENT NO : M/C Lenovo Think center M700 Ci3,6100,6th Gen. H81, 4GB RAM,500GB HDD GROUP - A EXPERIMENT NO : 04 1. Title: Write a Java program for pass-ii of a two-pass macro-processor. The output of assignment-3 (MNT, MDT and file without any macro definitions) should be input for this

More information

PSD1C SYSTEM SOFTWAE UNIT: I - V PSD1C SYSTEM SOFTWARE

PSD1C SYSTEM SOFTWAE UNIT: I - V PSD1C SYSTEM SOFTWARE PSD1C SYSTEM SOFTWAE UNIT: I - V 1 Syllabus Unit-I Language Processors Types of Language Processors Language Processing Activities Fundamentals of Language Processing Language Specification Data Structures

More information

Chapter 18: Writing Macros

Chapter 18: Writing Macros Chapter 18: Writing Macros This lecture will focus on writing macros, and use stack handling as an example of macro use. Macros differ from standard subroutines and functions. Functions and subroutines

More information

******************************************************** * SAMPLE CALLABLE SERVICE PROGRAM. * * SHARE SESSION: INTRODUCING LE CALLABLE SERVICES * *

******************************************************** * SAMPLE CALLABLE SERVICE PROGRAM. * * SHARE SESSION: INTRODUCING LE CALLABLE SERVICES * * SAMPLE CALLABLE SERVICE PROGRAM. SHARE SESSION: INTRODUCING LE CALLABLE SERVICES THOMAS PETROLINO IBM LANGUAGE ENVIRONMENT TAPETRO@US.IBM.COM THANKS TO JOHN EHRMAN FOR THE CONVE ROUTINE TITLE 'LE CALLABLE

More information

Assembler Language as a Higher Level Language: Conditional Assembly and Macro Techniques SHARE 115

Assembler Language as a Higher Level Language: Conditional Assembly and Macro Techniques SHARE 115 Assembler Language as a Higher Level Language: Conditional Assembly and Macro Techniques SHARE 115 John R. Ehrman Ehrman@us.ibm.com IBM Silicon Valley (Santa Teresa) Laboratory 555 Bailey Avenue San Jose,

More information

Assembler Programming

Assembler Programming 31-Bit Mode - Assembler Programming... 13:3 4095 - Limit... 4:17 A ACB: Access Method Control Block...10:2-3 Access Method... 6:1 Add Instructions - A, AR, and AH... 4:8 Addressability... 1:9 Addressing...

More information

Assembler Language "Boot Camp" Part 3x - Implicit Addresses and USING SHARE in New York City August 15-20, 2004 Session 8188

Assembler Language Boot Camp Part 3x - Implicit Addresses and USING SHARE in New York City August 15-20, 2004 Session 8188 Assembler Language "Boot Camp" Part 3x - Implicit Addresses and USING SHARE in New York City August 15-20, 2004 Session 8188 1 Introduction Who are we? John Dravnieks, IBM Australia John Ehrman, IBM Silicon

More information

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 05 I/O statements Printf, Scanf Simple

More information

Bourne Shell Reference

Bourne Shell Reference > Linux Reviews > Beginners: Learn Linux > Bourne Shell Reference Bourne Shell Reference found at Br. David Carlson, O.S.B. pages, cis.stvincent.edu/carlsond/cs330/unix/bshellref - Converted to txt2tags

More information

UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

More information

XQ: An XML Query Language Language Reference Manual

XQ: An XML Query Language Language Reference Manual XQ: An XML Query Language Language Reference Manual Kin Ng kn2006@columbia.edu 1. Introduction XQ is a query language for XML documents. This language enables programmers to express queries in a few simple

More information

CHAPTER 4 FUNCTIONS. 4.1 Introduction

CHAPTER 4 FUNCTIONS. 4.1 Introduction CHAPTER 4 FUNCTIONS 4.1 Introduction Functions are the building blocks of C++ programs. Functions are also the executable segments in a program. The starting point for the execution of a program is main

More information

CHAD Language Reference Manual

CHAD Language Reference Manual CHAD Language Reference Manual INTRODUCTION The CHAD programming language is a limited purpose programming language designed to allow teachers and students to quickly code algorithms involving arrays,

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 2 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA

More information

Examples of attributes: values of evaluated subtrees, type information, source file coordinates,

Examples of attributes: values of evaluated subtrees, type information, source file coordinates, 1 2 3 Attributes can be added to the grammar symbols, and program fragments can be added as semantic actions to the grammar, to form a syntax-directed translation scheme. Some attributes may be set by

More information

17. Instruction Sets: Characteristics and Functions

17. Instruction Sets: Characteristics and Functions 17. Instruction Sets: Characteristics and Functions Chapter 12 Spring 2016 CS430 - Computer Architecture 1 Introduction Section 12.1, 12.2, and 12.3 pp. 406-418 Computer Designer: Machine instruction set

More information

X Language Definition

X Language Definition X Language Definition David May: November 1, 2016 The X Language X is a simple sequential programming language. It is easy to compile and an X compiler written in X is available to simplify porting between

More information

DEFINING DATA CONSTANTS AND SYMBOLS

DEFINING DATA CONSTANTS AND SYMBOLS Chapter 2 DEFINING DATA CONSTANTS AND SYMBOLS SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Data types. Defining constants. Truncation and padding. Alignment - constants and boundary.

More information

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming)

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Learning any imperative programming language involves mastering a number of common concepts: Variables: declaration/definition

More information

Computer Organization CS 206 T Lec# 2: Instruction Sets

Computer Organization CS 206 T Lec# 2: Instruction Sets Computer Organization CS 206 T Lec# 2: Instruction Sets Topics What is an instruction set Elements of instruction Instruction Format Instruction types Types of operations Types of operand Addressing mode

More information

CSC 467 Lecture 3: Regular Expressions

CSC 467 Lecture 3: Regular Expressions CSC 467 Lecture 3: Regular Expressions Recall How we build a lexer by hand o Use fgetc/mmap to read input o Use a big switch to match patterns Homework exercise static TokenKind identifier( TokenKind token

More information

Chapter 12 Variables and Operators

Chapter 12 Variables and Operators Basic C Elements Chapter 12 Variables and Operators Original slides from Gregory Byrd, North Carolina State University! Variables named, typed data items! Operators predefined actions performed on data

More information

Information Science 1

Information Science 1 Information Science 1 Simple Calcula,ons Week 09 College of Information Science and Engineering Ritsumeikan University Topics covered l Terms and concepts from Week 8 l Simple calculations Documenting

More information

Chapter 6 What's this Stuff on the Left?

Chapter 6 What's this Stuff on the Left? Chapter 6 What's this Stuff on the Left? Objectives Upon completion of this chapter you will be able to: Describe the SI instruction format as used with the MVI and CLI instructions, Describe the SS instruction

More information

EDIABAS BEST/2 LANGUAGE DESCRIPTION. VERSION 6b. Electronic Diagnostic Basic System EDIABAS - BEST/2 LANGUAGE DESCRIPTION

EDIABAS BEST/2 LANGUAGE DESCRIPTION. VERSION 6b. Electronic Diagnostic Basic System EDIABAS - BEST/2 LANGUAGE DESCRIPTION EDIABAS Electronic Diagnostic Basic System BEST/2 LANGUAGE DESCRIPTION VERSION 6b Copyright BMW AG, created by Softing AG BEST2SPC.DOC CONTENTS CONTENTS...2 1. INTRODUCTION TO BEST/2...5 2. TEXT CONVENTIONS...6

More information

Declaring Floating Point Data

Declaring Floating Point Data Declaring Floating Point Data There are three ways to declare floating point storage. These are E D L Single precision floating point, Double precision floating point, and Extended precision floating point.

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

Chapter 24: Some Compilation Examples

Chapter 24: Some Compilation Examples Chapter 24: Some Compilation Examples In this chapter, we shall examine the output of a few compilers in order to understand the assembler language code emitted by those compilers. We study this assembler

More information

CSCI 2010 Principles of Computer Science. Data and Expressions 08/09/2013 CSCI

CSCI 2010 Principles of Computer Science. Data and Expressions 08/09/2013 CSCI CSCI 2010 Principles of Computer Science Data and Expressions 08/09/2013 CSCI 2010 1 Data Types, Variables and Expressions in Java We look at the primitive data types, strings and expressions that are

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

Chapter 3 - Simple JavaScript - Programming Basics. Lesson 1 - JavaScript: What is it and what does it look like?

Chapter 3 - Simple JavaScript - Programming Basics. Lesson 1 - JavaScript: What is it and what does it look like? Chapter 3 - Simple JavaScript - Programming Basics Lesson 1 - JavaScript: What is it and what does it look like? PP presentation JavaScript.ppt. Lab 3.1. Lesson 2 - JavaScript Comments, document.write(),

More information

68000 Assembler by Paul McKee. User's Manual

68000 Assembler by Paul McKee. User's Manual Contents 68000 Assembler by Paul McKee User's Manual 1 Introduction 2 2 Source Code Format 2 2.1 Source Line Format............................... 2 2.1.1 Label Field............................... 2 2.1.2

More information

Briefly describe the purpose of the lexical and syntax analysis phases in a compiler.

Briefly describe the purpose of the lexical and syntax analysis phases in a compiler. Name: Midterm Exam PID: This is a closed-book exam; you may not use any tools besides a pen. You have 75 minutes to answer all questions. There are a total of 75 points available. Please write legibly;

More information

Assessment of Programming Skills of First Year CS Students: Problem Set

Assessment of Programming Skills of First Year CS Students: Problem Set Assessment of Programming Skills of First Year CS Students: Problem Set Notes to the working group participants. Enclosed in this file are the three problems. They are in ascending order of difficulty.

More information

15 FUNCTIONS IN C 15.1 INTRODUCTION

15 FUNCTIONS IN C 15.1 INTRODUCTION 15 FUNCTIONS IN C 15.1 INTRODUCTION In the earlier lessons we have already seen that C supports the use of library functions, which are used to carry out a number of commonly used operations or calculations.

More information

Sketchpad Graphics Language Reference Manual. Zhongyu Wang, zw2259 Yichen Liu, yl2904 Yan Peng, yp2321

Sketchpad Graphics Language Reference Manual. Zhongyu Wang, zw2259 Yichen Liu, yl2904 Yan Peng, yp2321 Sketchpad Graphics Language Reference Manual Zhongyu Wang, zw2259 Yichen Liu, yl2904 Yan Peng, yp2321 October 20, 2013 1. Introduction This manual provides reference information for using the SKL (Sketchpad

More information

sarm User Guide Note that a space must appear before the operation field because any word beginning in the first column is a label

sarm User Guide Note that a space must appear before the operation field because any word beginning in the first column is a label sarm User Guide The sarm is program that implements an experimental CPU simulator. It is called experimental because it is not yet complete, and it also incorporates facilities that are not conventionally

More information

Use of scanf. scanf("%d", &number);

Use of scanf. scanf(%d, &number); Use of scanf We have now discussed how to print out formatted information to the screen, but this isn't nearly as useful unless we can read in information from the user. (This is one way we can make a

More information

Assembly Language Programming

Assembly Language Programming Assembly Language Programming Integer Constants Optional leading + or sign Binary, decimal, hexadecimal, or octal digits Common radix characters: h hexadecimal d decimal b binary r encoded real q/o - octal

More information

COP4020 Programming Assignment 1 - Spring 2011

COP4020 Programming Assignment 1 - Spring 2011 COP4020 Programming Assignment 1 - Spring 2011 In this programming assignment we design and implement a small imperative programming language Micro-PL. To execute Mirco-PL code we translate the code to

More information

CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square)

CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square) CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square) Introduction This semester, through a project split into 3 phases, we are going

More information

Project 3 Due October 21, 2015, 11:59:59pm

Project 3 Due October 21, 2015, 11:59:59pm Project 3 Due October 21, 2015, 11:59:59pm 1 Introduction In this project, you will implement RubeVM, a virtual machine for a simple bytecode language. Later in the semester, you will compile Rube (a simplified

More information

Assembler University 207: Powerful New z/architecture Instructions That Don't Require AMODE(64), Part 2

Assembler University 207: Powerful New z/architecture Instructions That Don't Require AMODE(64), Part 2 Assembler University 207: Powerful New z/architecture Instructions That Don't Require AMODE(64), Part 2 SHARE 116 in Anaheim, Session 8983 Avri J. Adleman, IBM adleman@us.ibm.com (Presented by John Ehrman,

More information

CSE 1001 Fundamentals of Software Development 1. Identifiers, Variables, and Data Types Dr. H. Crawford Fall 2018

CSE 1001 Fundamentals of Software Development 1. Identifiers, Variables, and Data Types Dr. H. Crawford Fall 2018 CSE 1001 Fundamentals of Software Development 1 Identifiers, Variables, and Data Types Dr. H. Crawford Fall 2018 Identifiers, Variables and Data Types Reserved Words Identifiers in C Variables and Values

More information

If we have a call. Now consider fastmap, a version of map that uses futures: Now look at the call. That is, instead of

If we have a call. Now consider fastmap, a version of map that uses futures: Now look at the call. That is, instead of If we have a call (map slow-function long-list where slow-function executes slowly and long-list is a large data structure, we can expect to wait quite a while for computation of the result list to complete.

More information

7.1 Optional Parameters

7.1 Optional Parameters Chapter 7: C++ Bells and Whistles A number of C++ features are introduced in this chapter: default parameters, const class members, and operator extensions. 7.1 Optional Parameters Purpose and Rules. Default

More information

3 The Building Blocks: Data Types, Literals, and Variables

3 The Building Blocks: Data Types, Literals, and Variables chapter 3 The Building Blocks: Data Types, Literals, and Variables 3.1 Data Types A program can do many things, including calculations, sorting names, preparing phone lists, displaying images, validating

More information

2. ADDRESSING METHODS

2. ADDRESSING METHODS 2 Addressing Methods STUDY MATERIALS ON COMPUTER ORGANIZATION (As per the curriculum of Third semester BSc Electronics of Mahatma Gandh Uniiversity) Compiled by Sam Kollannore U Lecturer in Electronics

More information

A variable is a name for a location in memory A variable must be declared

A variable is a name for a location in memory A variable must be declared Variables A variable is a name for a location in memory A variable must be declared, specifying the variable's name and the type of information that will be held in it data type variable name int total;

More information

Conditional Control Structures. Dr.T.Logeswari

Conditional Control Structures. Dr.T.Logeswari Conditional Control Structures Dr.T.Logeswari TEST COMMAND test expression Or [ expression ] Syntax Ex: a=5; b=10 test $a eq $b ; echo $? [ $a eq $b] ; echo $? 2 Unix Shell Programming - Forouzan 2 TEST

More information

Instruction Sets: Characteristics and Functions

Instruction Sets: Characteristics and Functions Instruction Sets: Characteristics and Functions Chapter 10 Lesson 15 Slide 1/22 Machine instruction set Computer designer: The machine instruction set provides the functional requirements for the CPU.

More information

COMPUTER ORGANIZATION & ARCHITECTURE

COMPUTER ORGANIZATION & ARCHITECTURE COMPUTER ORGANIZATION & ARCHITECTURE Instructions Sets Architecture Lesson 5a 1 What are Instruction Sets The complete collection of instructions that are understood by a CPU Can be considered as a functional

More information

UNIT-IV: MACRO PROCESSOR

UNIT-IV: MACRO PROCESSOR UNIT-IV: MACRO PROCESSOR A Macro represents a commonly used group of statements in the source programming language. A macro instruction (macro) is a notational convenience for the programmer o It allows

More information

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement Outline Expression Evaluation and Control Flow In Text: Chapter 6 Notation Operator evaluation order Operand evaluation order Overloaded operators Type conversions Short-circuit evaluation of conditions

More information

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals:

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals: Numeric Types There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals: 1-123 +456 2. Long integers, of unlimited

More information

Chapter 3: Assembly Language Fundamentals. Cristina G. Rivera

Chapter 3: Assembly Language Fundamentals. Cristina G. Rivera Chapter 3: Assembly Language Fundamentals Cristina G. Rivera Basic Elements of Assembly Language Example: Adding and Subtracting Integers Assembling, Linking, and Running Programs Defining Data Symbolic

More information

Introduction to Perl. c Sanjiv K. Bhatia. Department of Mathematics & Computer Science University of Missouri St. Louis St.

Introduction to Perl. c Sanjiv K. Bhatia. Department of Mathematics & Computer Science University of Missouri St. Louis St. Introduction to Perl c Sanjiv K. Bhatia Department of Mathematics & Computer Science University of Missouri St. Louis St. Louis, MO 63121 Contents 1 Introduction 1 2 Getting started 1 3 Writing Perl scripts

More information

Chapter Overview. Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 3: Assembly Language Fundamentals.

Chapter Overview. Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 3: Assembly Language Fundamentals. Assembly Language for Intel-Based Computers, 4 th Edition Chapter 3: Assembly Language Fundamentals Slides prepared by Kip R. Irvine Revision date: 09/15/2002 Kip R. Irvine Chapter Overview Basic Elements

More information

printf( Please enter another number: ); scanf( %d, &num2);

printf( Please enter another number: ); scanf( %d, &num2); CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful

More information

Chapter 12 Variables and Operators

Chapter 12 Variables and Operators Chapter 12 Variables and Operators Highlights (1) r. height width operator area = 3.14 * r *r + width * height literal/constant variable expression (assignment) statement 12-2 Highlights (2) r. height

More information

Program Analysis ( 软件源代码分析技术 ) ZHENG LI ( 李征 )

Program Analysis ( 软件源代码分析技术 ) ZHENG LI ( 李征 ) Program Analysis ( 软件源代码分析技术 ) ZHENG LI ( 李征 ) lizheng@mail.buct.edu.cn Lexical and Syntax Analysis Topic Covered Today Compilation Lexical Analysis Semantic Analysis Compilation Translating from high-level

More information

Will introduce various operators supported by C language Identify supported operations Present some of terms characterizing operators

Will introduce various operators supported by C language Identify supported operations Present some of terms characterizing operators Operators Overview Will introduce various operators supported by C language Identify supported operations Present some of terms characterizing operators Operands and Operators Mathematical or logical relationships

More information

We briefly explain an instruction cycle now, before proceeding with the details of addressing modes.

We briefly explain an instruction cycle now, before proceeding with the details of addressing modes. Addressing Modes This is an important feature of computers. We start with the known fact that many instructions have to include addresses; the instructions should be short, but addresses tend to be long.

More information

Comparison InstruCtions

Comparison InstruCtions Status Flags Now it is time to discuss what status flags are available. These five status flags are kept in a special register called the Program Status Register (PSR). The PSR also contains other important

More information

Intermediate Representations

Intermediate Representations Intermediate Representations A variety of intermediate representations are used in compilers Most common intermediate representations are: Abstract Syntax Tree Directed Acyclic Graph (DAG) Three-Address

More information

Information Science 1

Information Science 1 Topics covered Information Science 1 Terms and concepts from Week 8 Simple calculations Documenting programs Simple Calcula,ons Expressions Arithmetic operators and arithmetic operator precedence Mixed-type

More information

regsim.scm ~/umb/cs450/ch5.base/ 1 11/11/13

regsim.scm ~/umb/cs450/ch5.base/ 1 11/11/13 1 File: regsim.scm Register machine simulator from section 5.2 of STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS This file can be loaded into Scheme as a whole. Then you can define and simulate machines

More information

CS 440: Programming Languages and Translators, Spring 2019 Mon 2/4

CS 440: Programming Languages and Translators, Spring 2019 Mon 2/4 Haskell, Part 5 CS 440: Programming Languages and Translators, Spring 2019 Mon 2/4 More Haskell Miscellaneous topics Simple I/O, do blocks, actions Modules data vs type declaration Instances of classtypes

More information

Vint Cerf - UCLA. Eric Harslem - Rand. John Heafner - Rand NIC Updates: None THE DATA RECONFIGURATION SERVICE --

Vint Cerf - UCLA. Eric Harslem - Rand. John Heafner - Rand NIC Updates: None THE DATA RECONFIGURATION SERVICE -- Vint Cerf - UCLA Eric Harslem - Rand RFC 194 NIC 7139 Category: D.4 Updates: None Obsoletes: None John Heafner - Rand Bob Metcalfe - MIT Jim White - UCSB THE DATA RECONFIGURATION SERVICE -- COMPILER/INTERPRETER

More information

Assembly Language for Intel-Based Computers, 5 th Edition. Kip Irvine. Chapter 3: Assembly Language Fundamentals

Assembly Language for Intel-Based Computers, 5 th Edition. Kip Irvine. Chapter 3: Assembly Language Fundamentals Assembly Language for Intel-Based Computers, 5 th Edition Kip Irvine Chapter 3: Assembly Language Fundamentals Chapter Overview Basic Elements of Assembly Language Example: Adding and Subtracting Integers

More information

ELEG3924 Microprocessor

ELEG3924 Microprocessor Department of Electrical Engineering University of Arkansas ELEG3924 Microprocessor Ch.2 Assembly Language Programming Dr. Jing Yang jingyang@uark.edu 1 OUTLINE Inside 8051 Introduction to assembly programming

More information

06/11/2014. Subjects. CS Applied Robotics Lab Gerardo Carmona :: makeroboticsprojects.com June / ) Beginning with Python

06/11/2014. Subjects. CS Applied Robotics Lab Gerardo Carmona :: makeroboticsprojects.com June / ) Beginning with Python CS95003 - Applied Robotics Lab Gerardo Carmona :: makeroboticsprojects.com June / 2014 Subjects 1) Beginning with Python 2) Variables 3) Strings 4) Basic arithmetic operators 5) Flow control 6) Comparison

More information

Macro. simple idea of textual substitution useful when you need a group of instructions or directives frequently.

Macro. simple idea of textual substitution useful when you need a group of instructions or directives frequently. Macro simple idea of textual substitution useful when you need a group of instructions or directives frequently. a programming language with a quite different feel than C, Java, etc.: textual substitution

More information

Run time environment of a MIPS program

Run time environment of a MIPS program Run time environment of a MIPS program Stack pointer Frame pointer Temporary local variables Return address Saved argument registers beyond a0-a3 Low address Growth of stack High address A translation

More information

Lecture 1. Types, Expressions, & Variables

Lecture 1. Types, Expressions, & Variables Lecture 1 Types, Expressions, & Variables About Your Instructor Director: GDIAC Game Design Initiative at Cornell Teach game design (and CS 1110 in fall) 8/29/13 Overview, Types & Expressions 2 Helping

More information

Functions. Lab 4. Introduction: A function : is a collection of statements that are grouped together to perform an operation.

Functions. Lab 4. Introduction: A function : is a collection of statements that are grouped together to perform an operation. Lab 4 Functions Introduction: A function : is a collection of statements that are grouped together to perform an operation. The following is its format: type name ( parameter1, parameter2,...) { statements

More information

Language Reference Manual

Language Reference Manual TAPE: A File Handling Language Language Reference Manual Tianhua Fang (tf2377) Alexander Sato (as4628) Priscilla Wang (pyw2102) Edwin Chan (cc3919) Programming Languages and Translators COMSW 4115 Fall

More information

ARM Shift Operations. Shift Type 00 - logical left 01 - logical right 10 - arithmetic right 11 - rotate right. Shift Amount 0-31 bits

ARM Shift Operations. Shift Type 00 - logical left 01 - logical right 10 - arithmetic right 11 - rotate right. Shift Amount 0-31 bits ARM Shift Operations A novel feature of ARM is that all data-processing instructions can include an optional shift, whereas most other architectures have separate shift instructions. This is actually very

More information

Template Language and Syntax Reference

Template Language and Syntax Reference APPENDIX B This chapter describes the language and syntax conventions used in the VPN Solutions Center template implementation. Grammar and Syntax The Extensible Markup Language (XML) template definition

More information

5.1. Chapter 5: The Increment and Decrement Operators. The Increment and Decrement Operators. Looping. ++ is the increment operator.

5.1. Chapter 5: The Increment and Decrement Operators. The Increment and Decrement Operators. Looping. ++ is the increment operator. Chapter 5: Looping 5.1 The Increment and Decrement Operators Copyright 2009 Pearson Education, Inc. Copyright Publishing as Pearson 2009 Addison-Wesley Pearson Education, Inc. Publishing as Pearson Addison-Wesley

More information