1 / 13

Assembly Language – Lab 1

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:

liora
Download Presentation

Assembly Language – Lab 1

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Assembly Language – Lab 1 Introduction, Program structure, comments, define variables

  2. 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.

  3. Program Structure

  4. Comments • Anything after a semicolon is a comment. Comment

  5. Defining Variables • Defining variables goes under the .DATA segment

  6. Defining Variables Declaration syntax: • NameType Value

  7. 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.

  8. 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

  9. EMU8086 How to use the required software

  10. EMU8086 – How to use it

  11. EMU8086 – Open empty workspace

  12. EMU8086 – Press emulate, after coding

  13. EMU8086 – Press run to execute the code

More Related