How To Use Symbolic Constants To Distinguish Between Variables and Symbols

Discussion in 'Assembly Language Programming (ALP) Forum' started by UncleBazerko, Jan 4, 2015.

  1. UncleBazerko

    UncleBazerko New Member

    Joined:
    Jan 4, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi everyone. I'm using the book using asmirvine, to start learning assembly language (using Microsoft Visual Studio 2013), but I need an extra push to keep going. Here's my code so far:

    Code:
    TITLE Symbolic Constants						(main.asm)
    
    ; This program has 2 parts:
    
    ; First, the program defines symbolic constatns for
    ; all of the days of the week, using an array variable
    ; that uses the symbols as initializers.
    
    ; Second, the program defines symbolic names for several
    ; string literals (characters between quotes), using each
    ; symbolic name in a variable definition.
    
    ; Author: Sam Peterson
    ; 
    ; Revision date:
    
    INCLUDE Irvine32.inc
    
    .data
    daysArray DWORD 1,2,3,4,5,6,7
    
    literal01 EQU <"Rip"> 
    literal02 EQU <"her">
    literal03 EQU <"head">
    literal04 EQU <"off">
    
    myMessage BYTE "MASM program example",0dh,0ah,0
    
    
    .code
    main PROC
    	call Clrscr  
    
    	mov	 edx,offset myMessage
    	call WriteString
    
    	exit
    main ENDP
    
    END main
    
    Assuming that I've correctly declared my variables and arrays after .data, what do I need to do/change next?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice