Mouka Zwina

Assembly directives

Discussion created by Mouka Zwina on May 27, 2010
Latest reply on May 27, 2010 by CompilerGuru

I am trying to declare variables and intialize them in assembly.

here's what I have tested so far:

variableName:    dc.b  $xx  ; This declares a named constant. So my code in theory cannot change it

variableName:    ds.b 1      ; This creates a variable but it's uninitialized

 

How do I create an initialized variable?

I know I could write a code fragment that initializes my uninitialized variables, but there should be an easier way.

I used to do:

variableName:     db   $xx    ; This declares a variable and initializes it with $xx

 

Thanks for your help!!

Outcomes