Welcome to EZDefinition.com
Technological Concepts, Abbreviations & Definitions
Main Menu
Categories
  Computer Technologies  Programming Languages Assembler
Assembler

  Linux Assembly
This is the Linux Assembly HOWTO, version 0.6f. This document describes how to program in assembly language using free programming tools, focusing on development for or from the Linux Operating System, mostly on IA-32 (i386) platform. Included material may or may not be applicable to other hardware and/or software platforms.

  CODE EXAMPLE

  INTERFACING TO THE DOS ENVIRONMENT
When DOS hands over control of the CPU to a .EXE program, some of the registers are preset with data. In order for the program to run, it must preset the CS:IP registers to index the start of the application program execution logic. The SS:SP stack area is preset. The data values in DS and ES will be predefined to index the Program Segment Prefix (PSP).

  JUMPING INSTRUCTIONS
Jumping instructions are a unique set. They are the ones that reset the IP register or the CS:IP register pair. By doing so, they cause an alteration of the standard next instruction program sequence. The CS:IP register pair is used by the CPU to keep track of where the next instruction to execute is located.

  KEYBOARD CODE TABLE
This is a table of common keyboard code values that are returned to a program when it requests keyboard input data. If this is a BIOS call, the values are returned to the program in register AL unless the value of AL is zero. The values with 0: are extended code values with data in AH. If this is a DOS call and you receive a zero value, you must make another DOS call to get the extended code value.

  LOGICAL INSTRUCTIONS
The compare instruction works the same as the subtract instruction except that the resulting data variables are thrown away. What is important about the compare instruction is that the Flag register is reset by the operation. This allows for conditional branching following the compare instruction. There are 8 bit and 16 bit compares.

  MOVING DATA
The MOV statement is generally used to move data in and out of registers. It can also be used to move data from memory to memory and to load memory or registers with immediate data. When moving data, always define the destination first, then the source.

  REAL TIME PROGRAMMING
Many people program in Assembly language to speed up program routines that take too much time in a high level language. All good high level language development systems should have an option to produce an Assembly language level source code listing of the compiled high level language source code. In most cases, this Assembly language level source code listing can be modified to improve performance of the software.

  COMPUTER MATH
There are two basic integer add instructions: the standard ADD and the ADC (add with carry). Normally, just the standard add is used for binary integers, but with some code, the add with carry is necessary. Both the ADD and the ADC instructions will alter the contents of the carry flag to indicate an addition overflow out of the high bit position, but the ADC will check the contents of the carry flag at the instruction start and add an extra 1 to the two operands being added if carry condition is true.

  BITS AND BYTES
When programming in Assembly language, it is necessary to know about bits, bytes, and words. A bit is the smallest element of information that can be addressed. A single bit can only be programmed as either zero or one; therefore, it cannot convey much information. A group of eight bits linked together make one byte.

  COMPILING
Instructions for compiling a program are specific to the compiling software product and there may be many different options.

  CPU REGISTERS
This section will cover the programmable CPU registers. The Assembly language programmer must be familiar with the references and uses of each register in order to program effectively. Other registers are discussed in the section on different 80X86 processors.

  SEGMENT ADDRESSING REGISTERS
The 8086 CPU divides its memory addressing into four areas. The four areas are code, stack, data, and extra data. The current location of these sections is controlled by four segment addressing registers. The 8086 architecture uses these to expand the addressing range of the CPU. The basic addressing range of a normal 16 bit CPU is 65536 bytes.

  THE ELEMENTS OF AN ASSEMBLY LANGUAGE STATEMENT
In a standard Assembly language statement, there are four fields. The fields are normally separated by a space or a tab character. In many statements, there are fields missing.

[an error occurred while processing this directive]
 

All Rights Reserved

Terms of usage   Please read our privacy stetment
Copyright © 1999-2006 EZDefinition.com

 

[an error occurred while processing this directive]