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
how to write the alp for matrix addition in microprocessor 8086?

need some project ideas

program to find negative and positive integers from given signed numbers with output and explanation of every instructions.

Execution Unit (EU) and Bus Interface Unit (BIU) : 8086 consist of two processors called EU and BIU. Two Processors can work parallel. This improves speed of execution. BIU fi

Print Media Advertising (PMA) has been providing a contract to market Buzz Cola via newspaper ads in a main southern newspaper. Full-page ads in the weekday editions (Monday throug

SCAS : Scan String Byte or String Word:- This instruction scans a string of words or byte for an operand word or byte specified in the register AL or  register AX. The string i

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

Using the AddSub program from Ch3 under c:\Masm615\examples as a reference, write a program that subtracts three 16-bit integers using only registers. Insert a call DumpRegs statem

Example : Write a program to move the contents of the memory location 0500H to BX and also to register CX. Add immediate byte 05H to the data residing in memory location, whose ad

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