Author Topic: A Few Questions  (Read 7435 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: A Few Questions
« Reply #15 on: September 02, 2010, 02:39:56 pm »
im not changing to flash anything with Axe. I'll work in RaM. Last time i inadvertently wrote to flash i almost f***ed over my certificate and actually did wipe an OS sector. Wasn't fun. lol. Thanks for the help.

Lol :D Nearly did the same with my first *useful* ASM program. Good thing it was on Wabbit :P

But what if the user archives the appvar (unless you're going to delete it when done)?




Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: A Few Questions
« Reply #16 on: September 02, 2010, 02:42:02 pm »
Program will automatically unarchive it when it opens.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: A Few Questions
« Reply #17 on: September 02, 2010, 03:07:34 pm »
For the storing code to work better, you should change the line that stores the length to:
Code: [Select]
length(Str9Z)+1->V
The length() command returns the number of characters in the string, not including the null byte that actually terminates the string. Without that last byte, it doesn't actually store the end of the string signifier to the appvar, so calling length() or trying to display the string would result in garbage being added to the end until a zero byte is reached in RAM.

For the reading code, the easiest thing to do would be to simply display the string from the appvar, without copying it out, like this:
Code: [Select]
Disp D
« Last Edit: September 02, 2010, 03:10:42 pm by Runer112 »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: A Few Questions
« Reply #18 on: September 02, 2010, 06:57:54 pm »
For the storing code to work better, you should change the line that stores the length to:
Code: [Select]
length(Str9Z)+1->V
The length() command returns the number of characters in the string, not including the null byte that actually terminates the string. Without that last byte, it doesn't actually store the end of the string signifier to the appvar, so calling length() or trying to display the string would result in garbage being added to the end until a zero byte is reached in RAM.

I think he's adding a zero at the end, separately.

For the reading code, the easiest thing to do would be to simply display the string from the appvar, without copying it out, like this:
Code: [Select]
Disp D

That.

EDIT: 42nd post today!

And I finally reach an average of one post per day, after a year of not posting at all and exactly 100 days of posts! :D
« Last Edit: September 02, 2010, 07:06:19 pm by Deep Thought »




Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: A Few Questions
« Reply #19 on: September 02, 2010, 11:26:05 pm »
If he wants to be able to just do Disp D, the zero ending byte needs to be in the appvar. That's why I suggested the modification to the storing method.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: A Few Questions
« Reply #20 on: September 03, 2010, 05:35:14 pm »
If he wants to be able to just do Disp D, the zero ending byte needs to be in the appvar. That's why I suggested the modification to the storing method.

Oh, got it.