Declare a constant in assembly language, Assembly Language

Assignment Help:

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.

 


Related Discussions:- Declare a constant in assembly language

Copy a string backwards, I can get it to copy the string but can''t get it ...

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

Bitwise logical and shift operations, Part A: Bitwise Logical and Shift Op...

Part A: Bitwise Logical and Shift Operations Create a SPARC assembly language program that extracts a bit-field from the contents of register %l0. The position of the rightmos

Relocate program and data, ) What is the difference between re-locatable pr...

) What is the difference between re-locatable program and re-locatable data?

8279 keyword /display controller-microprocessor, 8279 Keyword /Display Cont...

8279 Keyword /Display Controller : Figure shows the structure of 8279 and its interface to the bus. Addressing is according to the table given below. CS        RD

Program to move contents in memory-machine level programs, Example : Write...

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

Programming with an assembler-microprocessor, Programming with an assembler...

Programming with an assembler The procedure of hand-coding 8086 programs is somewhat tiresome; hence generally a programmer may find it hard to get a correct listing of the mac

8254 programmable timer-microprocessor, 8254 Programmable Timer A diagr...

8254 Programmable Timer A diagram of Intel's 8254 interval event/timer counter is given in Figure. The 8254 consists of 3 identical counting circuits, per of which has GATE and

PIC, LIST p=18f4550 #include org 0x0000 movlw 0x00 _________ movlw 0xFF ...

LIST p=18f4550 #include org 0x0000 movlw 0x00 _________ movlw 0xFF movwf PORTB end .

Mlil-arithmetic instruction-microprocessor, MLIL: Unsigned Multiplication ...

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

Program on virtual learning environment, Task One Produce a menu such a...

Task One Produce a menu such as the one below (remember to keep to this specification). M E N U 1, Enter Number 1 2, Enter Number 2 3, Display num1 and num2 4, D

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd