New Appvar utility

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

zeros are ok, but they have to be at the beginning, not the end
3 resulted in the name "Var30000"
but the name is not the biggest issue, for some reason it doesnt read/write properly (maybe it writes OK, but doesnt read right, or the other way around, which both result in the output being zero)
no errors, but the output is zero

edit: I forgot to push de before _arc_unarc (so it got destroyed..) not too clever..
Last edited by King Harold on Thu 10 Aug, 2006 6:51 pm, edited 1 time in total.
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

Ok, well it would be a lot easier to conver 3 into Var3_ _ _ _ (four spaces) than to move it over to 00003. Plus, you'd have a wider selection of variable names available.

ld hl,var_name+9
reformat_loop:
ld a,(hl)
sub a,30
jr nz,done
ld (hl),a
dec hl
jr reformat_loop
done:


that should null-terminate the appvar right after the last digit. (So Var3 would be Var3 and not Var30000). However, Var30 would be truncated to Var3, although Var301 would be fine.

We could also use the second byte in OP1 to determine how many values to store into the label. I'll give you an example in the help programming section.
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

cant we do this?
Image
although 300 would become 3 unless there is a real good algorithm
Last edited by King Harold on Thu 10 Aug, 2006 10:17 am, edited 1 time in total.
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

I can't see that picture, it's blocked by my work's filter. But check out the other method I posted in your other help topic.
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

thanx to chickendude the namegenertion works fine now, recalling an integer from the appvar also works fine, writing one to it works half, or acutally dubble, it writes the integer to it but somehow also changes the size of the appvar (to insanely huge sizes)
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

Hopefully this weekend I'll have some time to examine your code in more depth. However, I think there might be a better way than ldi.

Hopefully you can get this project done and into the community!
Post Reply