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
Assembly Language Example Programs We studied the entire instruction set of 8086/88, pseudo-ops and assembler directives. We have explained the process of entering an assembly

8255 Programmable Peripheral Interface Intel's 8255 A programmable peripheral interface provides a nice instance of a parallel  interface. As shown the interface have a control

Write a MC68H12 assembly language program to find the largest number in an array of ten 8-bit numbers. The array is stored in memory locations starting at address $1100. Use branch

Write a M68000 assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n

write an assembly program to display triangular star like shape

Logical Instruction : This type of instructions is utilized for carrying out the bit by bit shift, basic logical operations or rotate. All of the condition code flags are affe

give the explaination of timing diagram minimum mode memory write cycle

XOR: Logical Exclusive OR: The XOR operation is again carried out in a similar way to the AND and OR operation. The constraint over operands are also similar. The XOR operation pr

i have a question.

write a program using assembly language that print your name