Hello, I am using ATMega128
add + 1 to var : sts var +1, r22
or setup and use st
also increase var : var: .byte 5
another way is to set up a pointer reg pair/loop
var: .byte 5
ldi YL, LOW(var)
inc temp ; puts 1-5 in ram(var)
st Y+, temp ; post increment Y pointer
dec count ; counter
... rest of code
I'll have to look up the m128... never used it
I use the Atmel assemblers and not GAS. That might be it...?
There is a m103 issue that deals with memory relocation or something.
Being that I have never used this chip my (ass)umtion was that avr's are generally the same
This chip is kind of a unicorn, RampZ and all... Good Luck!
you dont need any special sram variables for this simple task.
use a pointer only:
ldi YH,1 ;Start address 0100H
brne loop ;until end address 10FFH
Thanks for the help
I tried sts var +1, r22 and it didn't work, gave an error.
What was teh error? No one can see your screen other than you.
I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie
"The critical shortage here is not stuff, but time." - Johan Ekdahl
"Step N is required before you can do step N+1!" - ka7ehk
"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman
"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?" - Lee "theusch"
Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-) - Source Unknown
Please Read: Code-of-Conduct
Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user
© 2021 Microchip Technology Inc.