SECTION V-6: Using EQU for Fixed Data Assignment

To get more practice using EQU to assign fixed data, examine the following:

  ;In Hexadecimal
DATA1 EQU 39 ;hex data is the default
DATA2 EQU 0x39 ;another way for Hex
DATA3 EQU 39H ;another way for Hex
DATA4 EQU H'39' ;another way for Hex
DATA5 h'39' ;another way for Hex
  ;In Binary
DATA6 EQU b'00110101 ;binary, 35 in Hex
DATA7 EQU B'00110101 ;binary , 35 in Hex
  ;In Decimal
DATA8 EQU D'28' ;decimal number, 1C in Hex
DATA9 EQU d'28' ;second way for decimal
  ;in ASCII
DATA10 EQU A'2' ;ASCII characters
DATA11 EQU a'2' ;another way for ASCII character
DATA12 EQU '2' ;another way for ASCII character

 

 

 

 

 

 

 

 

 

 

 

 

 

We use DB to allocate code memory locations for fixed data such as ASCII strings.

 

More From Iamtechnical.com

Advertisement:

SiteLock