I am having problem getting rid of the trailing trash in memory when logging my output.
I have a number n in my D1 and another one in D2.
Whenever I log them, the appear like this:
1-20012
but I just want the 1-2
I would just like to know how would I be able to select certain bytes of my Data Registers and put them in memory (in a ds.b declared storage with label result with size of 40 bytes).
Say, if I store the 1 in the starting address of my label "result" ($0000 2450), the '1' would only take up 1 byte, so will the '-' sign, as well as the '2'. So these contents would be stored in the range $0000 2450 - $0000 2452. The thing is that the following byte addresses contain garbage from previous operations and I am not allowed to clear them manually. I need to develop a method to clear them during runtime.
How would I ignore the following garbage bytes that are logged all together with my '1-2' print?
Thank you for your help!