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
#I submitted my assignment this morning and it is still processing. How long does it take?

Assembling a program Microsoft Assembler MASM is one of the simple to use and famous assemblers.  All the references and discussions in this section are belonging to the MASM.



Program : Write a program to perform a one byte BCD addition. Solution : It is consider that the operands are in BCD form, but the CPU considers it as hexadecimal and acco

Write an assembly language program to find the maximum of: y = x 6 - 14x 2 + 56x for the range -2 ≤ x ≤ 4, by stepping one by one through the range. The program should in

Write an assembly language program that will: accept keyboard input of a positive integer value N; compute the sum S= 1+ 2 + 3 + ... + N; print (output) the computed su


You will need to upload your main.c and factorial.s files and a .jpg photo of the output on your board using the Vista assignment upload features.  It must be submitted by the dead

I can get it to copy the string but can''t get it to reverse it.