Zum Inhalt

Guide to Assembly Language

A Concise Introduction

  • 2020
  • Buch

Über dieses Buch

Diese kompakte Anleitung soll es dem Leser ermöglichen, so schnell wie möglich zu lernen, wie man in Montagesprache programmiert. Durch einen praxisorientierten Programmieransatz lernen die Leser auch die Architektur des Intel-Prozessors und die Beziehung zwischen Hoch- und Niedrigsprachen kennen. Diese aktualisierte zweite Ausgabe wurde um zusätzliche Übungen erweitert und um neues Material über Fließkommazahlen und 64-Bit-Verarbeitung erweitert.Themen und Merkmale: Anleitung zur vereinfachten Registernutzung, vereinfachte Eingabe / Ausgabe mittels C-ähnlicher Anweisungen und die Verwendung von Hochleistungssteuerungsstrukturen; beschreibt die Implementierung von Kontrollstrukturen, ohne die Verwendung von Hochleistungsstrukturen und häufig mit verwandtem C-Programmcode; illustriert Konzepte mit einem oder mehreren vollständigen Programmen; präsentiert Zusammenfassungen in jedem Kapitel sowie eine Vielzahl von Übungen, von Kurzantwortfragen bis hin zu Programmieraufgaben; behandelt Auswahl- und Iterationsstrukturen, Logik, Verschiebung, arithmetische Verschiebung, Die Präsentation setzt Vorkenntnisse der Grundlagen des Programmierens in einer Hochsprache wie C, C + + oder Java voraus.

Inhaltsverzeichnis

  1. Frontmatter

  2. 1. Variables, Registers, and Data Movement

    James T. Streib
    Abstract
    High-level languages, such as C, C++, and Java, have similarities with natural languages which help make programs easier to read and write whereas low-level languages are closer to the machine and offer a look at the machine organization and architecture. There is a one-to-many relationship between high-level languages and low-level languages, where language translators such as compilers and interpreters convert each high-level instruction into many low-level instructions. The native language of a particular machine is a low-level language known as machine language and is coded in ones and zeros. Further, the machine language of an Intel microprocessor is different than that of other microprocessors or mainframes, thus machine language is not transferable from one type of machine to another.
  3. 2. Input/Output

    James T. Streib
    Abstract
    As mentioned in Chap. 1, input and output (I/O) in assembly language can be quite difficult and complicated. Although the exploration of I/O at the assembly language level is a subject worthy of study, it often times gets in the way of many of the other important topics and reasons for studying assembly language. The result is that it is helpful to have a simplified form of input/output.
  4. Chapter 3. Arithmetic Instructions

    James T. Streib
    Abstract
    After learning how to load a register, transfer data between memory locations, and perform I/O, the next step is to learn how to perform various arithmetic operations. One of the simplest ways to learn how to perform arithmetic in assembly language is to first write the equation as a high-level statement.
  5. 4. Selection Structures

    James T. Streib
    Abstract
    As one should have learned in Computer Science I, there are two basic types of control structures available regardless of the language used. These two types of control structures are selection structures and iteration structures, also commonly known as ifs and loops.
  6. 5. Iteration Structures

    James T. Streib
    Abstract
    As should be recalled from previous courses, there are many different types of iteration structures available to a programmer in a high-level programming language.
  7. 6. Logic, Shifting, Rotating, and Stacks

    James T. Streib
    Abstract
    However, some-times it is necessary to not just compare the contents of variables or registers but check the individual bits within a memory location or a register.
  8. 7. Procedures and Macros

    James T. Streib
    Abstract
    This chapter will first show the reader how procedures are implemented in assembly language. The implementation of macros is introduced next which is probably a new topic to most readers. Both procedures and macros are tools that allow programmers to save time by not having to rekey the same code over and over again, but there are important differences between the two mechanisms. The chapter then continues with the introduction of conditional assembly which can be a difficult concept for new assembly language programmers. Lastly, this chapter shows the beginning of the implementation of what might be called a macro calculator which simulates a one register (accumulator) computer.
  9. 8. Arrays

    James T. Streib
    Abstract
    Up until this point, arrays have not been needed in the examples shown. However, this chapter will introduce the declaration of arrays, array access, indexing arrays, and how to input, process, and output arrays. Although there are many ways one can index an array, this text will present only two of them.
  10. 9. Strings

    James T. Streib
    Abstract
    This chapter concerns string processing. Specifically it examines various string processing instructions that are available in MASM. Continuing on with the last chapter, it also examines the manipulation of arrays of strings.
  11. 10. Floating-Point Instructions

    James T. Streib
    Abstract
    This chapter introduces the fundamentals of floating-point instructions. This includes registers, memory storage, input/output, the instructions needed to perform arithmetic, and basic control structures. In order to learn the concepts in this chapter one should understand how floating-point numbers are represented in memory from a computer organization class or text. Alternatively, one can review or learn the basic concepts needed as presented in Appendix B.7 of this text. Also, one should have knowledge of stacks usually discussed in a second semester computer science course or text such as Guide to Data Structures [3].
  12. 11. 64-Bit Processing

    James T. Streib
    Abstract
    To store larger 64-bit numbers in a high-level language such as Java, variables are declared as long, or in the C programming language long long is used. In assembly language a quad word, qword, or signed quad word, sqword, is used. Just as a 32-bit double word is twice as big as a regular 16-bit word, a 64-bit quad word is two times larger than a 32-bit double word or four times larger than a 16-bit word, thus the name quad word.
  13. 12. Selected Machine Language Instructions

    James T. Streib
    Abstract
    The purpose of this chapter is to help draw further connections between assembly language and computer organization. The advantage of using assembly language is that one can see computer organization from a software perspective. Further, by examining machine language one can see some of the principles discussed in a computer organization text. It is especially helpful to see these principles implemented in a real machine language.
  14. Backmatter

Titel
Guide to Assembly Language
Verfasst von
Prof. James T. Streib
Copyright-Jahr
2020
Electronic ISBN
978-3-030-35639-2
Print ISBN
978-3-030-35638-5
DOI
https://doi.org/10.1007/978-3-030-35639-2

Informationen zur Barrierefreiheit für dieses Buch folgen in Kürze. Wir arbeiten daran, sie so schnell wie möglich verfügbar zu machen. Vielen Dank für Ihre Geduld.

    Bildnachweise
    AvePoint Deutschland GmbH/© AvePoint Deutschland GmbH, ams.solutions GmbH/© ams.solutions GmbH, Wildix/© Wildix, arvato Systems GmbH/© arvato Systems GmbH, Ninox Software GmbH/© Ninox Software GmbH, Nagarro GmbH/© Nagarro GmbH, GWS mbH/© GWS mbH, CELONIS Labs GmbH, USU GmbH/© USU GmbH, G Data CyberDefense/© G Data CyberDefense, Vendosoft/© Vendosoft, Kumavision/© Kumavision, Noriis Network AG/© Noriis Network AG, WSW Software GmbH/© WSW Software GmbH, tts GmbH/© tts GmbH, Asseco Solutions AG/© Asseco Solutions AG, AFB Gemeinnützige GmbH/© AFB Gemeinnützige GmbH, Ferrari electronic AG/© Ferrari electronic AG, Doxee AT GmbH/© Doxee AT GmbH , Haufe Group SE/© Haufe Group SE, NTT Data/© NTT Data