Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/01/07 22:48
Read: times


 
#141399 - Yes
Responding to: ???'s previous message
;declare internal memory address's 30h to 32h as variables
;one to three

variable_one: .reg 30h ;could use any memory from 00h to 7fh
variable_two: .reg 31h
varianbe_three: .reg 32h

main:

mov a,#00h
mov b,#01h

mov variable_one,a ;set memory address 30h to '00h'
mov variable_two,b ;set memory address 31h to '01h'
mov variable_three,#02h ;set memory address 32h to '02h'

jmp $

end


;--------------------------------------------------------

yes you declare a variable for each ram location
your variables will be protected, unless you write to them, or you use the SFR part of internal memory (80h to FFh)



List of 13 messages in thread
TopicAuthorDate
assembly help, please.            01/01/70 00:00      
   Confusion            01/01/70 00:00      
   use DB            01/01/70 00:00      
      i know            01/01/70 00:00      
         It is ASM            01/01/70 00:00      
         ram in 8051            01/01/70 00:00      
            SEG            01/01/70 00:00      
            query            01/01/70 00:00      
               Yes            01/01/70 00:00      
                  Protection??            01/01/70 00:00      
                     A bit unclear...            01/01/70 00:00      
                        tricky...            01/01/70 00:00      
                           Indeed...            01/01/70 00:00      

Back to Subject List