Hca.geocities.com/JLABELLE@rogers.com/nsasm/docs/r1663.htmlca.geocities.com/JLABELLE_rogers.com/nsasm/docs/r1663.htmldelayedxnJ%OKtext/html@'%b.HTue, 07 Dec 2004 00:49:37 GMT8Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)en, *mJ%.db

.db

Name

.db --  put one or more 8-bit bytes of data in memory (same as .byte)

Syntax

.db expression [,expression...]

Description

The .byte and .db directives generate consecutive 8-bit bytes of data for each given expression. If the directive has a label, it refers to the address of the first byte. The value of each expression must be in the range -256 to +255 where -256 is treated as 0, -1 as 255. The value of the expression may be interpreted either as signed or unsigned. The .byte and .db directives are valid only in a ROM type section. Any label will be assigned the byte type.

The hexadecimal value of ASCII characters may be stored in memory using the .db (and .byte) directive and an operand expression specifying character strings or their hexadecimal equivalents. (See Appendix A.)

Note: A single quotation mark in a string is represented by two quotation marks. An ASCII character may also be specified using the escape characters described in Section 2.3.4.

Example

		.db X'FF
	

stores the hexadecimal number FF in a byte of memory

	T:	.db MPR-10, X'FF
	

stores two hexadecimal numbers in consecutive bytes in memory

		.db 'DON''T'
	

stores the ASCII string (DON'T) in consecutive bytes of memory

		.db X'44,X'4F,X'4E,X'27,X'54
	

stores the ASCII string (DON'T) in consecutive bytes of memory