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
hey ,, I need to know how to let a symbol moves with mouse ??

You have to write a subroutine (assembly language code using NASM) for the following equation.

Request a depreciation of the item, year of purchase, cost of item, number of years to be depreciated (estimated life ) and,the method of depreciation . Method of depreciation sh

I am assigned to implement dijkstra algorithm in assembly language. I am not a novice in assembly. I need help implementing it.Kindly if anyone then please.

I need to generate a random number bby using 8086 assembly language

Software Interrupts Software interrupts are the result of an INT instruction in an executed program.  It may be assumed as a programmer triggered event that immediately stops e

code to add two matrices

MLIL: Unsigned Multiplication Byte or Word: This instruction multiplies an unsigned byte or word by the contents of the AL. The unsigned byte or word can be in any one of the gene

This is a short program to practice assembly language loops and if/else statements. You will use various jump commands and the cmp instruction. The program will generate a random

AAS: ASCII Adjust AL After Subtraction AAS instruction correct the result in the AL register after subtracting operation of two unpacked ASCII operands. The result is in unpacked