Assembly Language – Lab 1. Introduction, Program structure, comments, define variables. Assembly Language. Assembly language makes it possible to write Machine Language code. A program called the Assembler does the translation. Each line of a program is one of the following:
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Assembly Language – Lab 1 Introduction, Program structure, comments, define variables
Assembly Language • Assembly language makes it possible to write Machine Language code. • A program called the Assembler does the translation. • Each line of a program is one of the following: • an instruction • an assembler directive (or pseudo-op) • a comment • Whitespace (between symbols) and case are ignored. • Comments (beginning with “;”) are also ignored.
Comments • Anything after a semicolon is a comment. Comment
Defining Variables • Defining variables goes under the .DATA segment
Defining Variables Declaration syntax: • NameType Value
Identifiers • May consist of letters, digits, and the special characters • ? . @ _ $ % (Thus, embedded blanks are not allowed). • Names may not begin with a digit. • If a dot is used, it must be the first character.
Questions • Can we use the following names as identifiers in assembly language: • Hi_ • YES • #ASM • NO • add • NO • NO • !Set • *NO • YES • 1ONE • NO • YES • QUS%%$ • Learn@ • YES • _USE • Sign& • NO • NO • NO • %Percent • YES • PASS 1234% • CS221 • YES • @Data • NO
EMU8086 How to use the required software