2) How To Use The EQU Directive

Use the EQU directive.

.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD

;EQU directive defines a symbol by either an integer or text
;EQU directive makes the symbolic constant so it can't be redefined.
str1 EQU <"apple",0>		
str2 EQU <"orange",0>		 
str3 EQU <"grape",0>
str4 EQU <"melon",0>

var1 BYTE str1
var2 BYTE str2
var3 BYTE str3
var4 BYTE str4

result DWORD 1234567h
main PROC
	mov eax,0                       ;clarity purposes
	mov ebx,0
	mov edx,0
	mov ecx,0

	mov al, var1                    ; al = 61h which is 'a' in ascii
	mov bl, var2+1                  ; bl = 71h which is 'r' in ascii 
	mov cl, var3+2                  ; cl = 61h which is 'a' in ascii 
	mov dl, var4+3                  ; dl = 6Fh which is 'o' in ascii 

INVOKE ExitProcess,0
main ENDP
END main

Show Code