Declare a constant in assembly language, Assembly Language

Declare 1 constant. This can be done just below the prototype section. Put the following divider above the constant section.

;************************ Constants ***************************

Declare a constant LF to hold the ASCII value for a linefeed: 0Ah

A linefeed moves the cursor to the next line.

You can embed a LF in your declaration of the string variables below.

Example: name byte "Fred Kennedy",LF,0

If the above string were printed with WriteString as follows, Fred Kennedy would print then the cursor would move to the beginning of the next line.

movedx, offset name

callWriteString

You could also embed a LF at the beginning of a string which would move the cursor to the next line then the string would print:

name byte LF,"Fred Kennedy",0

See WriteStringLFconstants.asm on the class web site for examples of declaring strings with embedded LF and how to declare constants.

 

Posted Date: 3/18/2013 5:50:25 AM | Location : United States







Related Discussions:- Declare a constant in assembly language, Assignment Help, Ask Question on Declare a constant in assembly language, Get Answer, Expert's Help, Declare a constant in assembly language Discussions

Write discussion on Declare a constant in assembly language
Your posts are moderated
Related Questions
You are to write an assembly language program called subfaq.s that computes the generalized subfactorial function of nonnegative integer inputs i0 and n. The generalized subfactori

SHL/SAL : Shift logical/Arithmetic Left: These instructions shift the operand byte or word bit by bit to the left and insert 0 in the newly introduced least significant bits. In c

AAM: ASCII Adjust for Multiplication after execution. This instruction converts the product available in the AL into unpacked BCD format.  This follows a multiplication   instruct

The Alpha : The development of the Alpha chip start in the year 1988 The new chip used 64 bit technology, let users to pack  more  complexity  into  their  programs  than  exis

You have been hired by the Elbonian government to write an Assembly program to help its workforce determine how much their tax will be. The tax laws in Elbonian are very simple. Th

Maximim and Minimum mode 8088 system : In the maximum mode, the pin 880 is lastingly high. The functions and timings of other pins of 8088 are exactly similar to 8086. Due to t

The main objective of the assignment is to explore the knowledge regarding parallel ports of a computer system. You can read and write datato/from the parallel port using IN and OU

Interrupt When the CPU detects an interrupt signal, it stops activity of current and jumps to a special routine, known an interrupt handler. This handler then detects why the i

CMP: Compare: - This instruction compares the source operand, which can be a register or memory location an immediate data with a destination operand that might be a register or a

Type of Microprocessor : Microprocessors fall into 3 categories: Single Chip Microcomputers: - Contains RWM, ROM, microprocessor, I/O port, timer and clock. General pu