0 Members and 2 Guests are viewing this topic.
.READPRGSGetCalc("apvrDATA")->D->P .get the pointer to the appvar DATA"prgm"->Str0ZZ .initialize Str0ZZWhile P<{D-2}rr-9 .check for reaching the end of the AppVarlength(P)->L .store the length of the string at P to L, because it will be used more than onceCopy(P,Str0ZZ,L) .annex data at current position to Str0ZZP+L+1->P .add the length of the string at P to P to move P to the start of the next string.Code to do whatever you want with the program...End
HoMM: [==--------] Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :PtiDE: [----------] Explored and understood the main part of the code: just started writing a Tokenizer.
.READPRGSGetCalc("apvrDATA")->D->P .get the pointer to the appvar DATA"prgm"->Str0ZZ .initialize Str0ZZdet(8 ) .You want this here so you don't overwrite something important if there's something important right after the program in memory. While P<{D-2}rr-12 .check for reaching the end of the AppVarlength(P)->L .store the length of the string at P to L, because it will be used more than onceCopy(P,Str0ZZ,L) .annex data at current position to Str0ZZP+L+1->P .add the length of the string at P to P to move P to the start of the next string.Code to do whatever you want with the program...End
I don't know wheter Str0ZZ should be Str09 or not, because I thought only Str00 till Str99 were supported, but I'm not sure about that.
Quote from: LordConiupiter on September 13, 2010, 03:51:52 pm.READPRGSGetCalc("apvrDATA")->D->P .get the pointer to the appvar DATA"prgm"->Str0ZZ .initialize Str0ZZdet(8 ) .You want this here so you don't overwrite something important if there's something important right after the program in memory. While P<{D-2}rr-12 .check for reaching the end of the AppVarlength(P)->L .store the length of the string at P to L, because it will be used more than onceCopy(P,Str0ZZ,L) .annex data at current position to Str0ZZP+L+1->P .add the length of the string at P to P to move P to the start of the next string.Code to do whatever you want with the program...End
Quote from: LordConiupiter on September 13, 2010, 03:51:52 pmI don't know wheter Str0ZZ should be Str09 or not, because I thought only Str00 till Str99 were supported, but I'm not sure about that.It's supported. Axe supports names up to three chars now.
Quote from: ztrumpet on September 13, 2010, 03:59:11 pmQuote from: LordConiupiter on September 13, 2010, 03:51:52 pm.READPRGSGetCalc("apvrDATA")->D->P .get the pointer to the appvar DATA"prgm"->Str0ZZ .initialize Str0ZZdet(8 ) .You want this here so you don't overwrite something important if there's something important right after the program in memory. While P<{D-2}rr-12 .check for reaching the end of the AppVarlength(P)->L .store the length of the string at P to L, because it will be used more than onceCopy(P,Str0ZZ,L) .annex data at current position to Str0ZZP+L+1->P .add the length of the string at P to P to move P to the start of the next string.Code to do whatever you want with the program...Endouch! forgot about the Zeros( 8 ) or det( 8 ) part Quote from: ztrumpet on September 13, 2010, 03:59:11 pmQuote from: LordConiupiter on September 13, 2010, 03:51:52 pmI don't know wheter Str0ZZ should be Str09 or not, because I thought only Str00 till Str99 were supported, but I'm not sure about that.It's supported. Axe supports names up to three chars now. nice to know! haven't heard/seen it anywhere, but that's my bad the -12 should be -9, but that I've already changed.EDIT: lol! i noticed your space between the 8 and the ), but didn't see why, but now I see
Quote from: LordConiupiter on September 13, 2010, 04:14:14 pmQuote from: ztrumpet on September 13, 2010, 03:59:11 pmQuote from: LordConiupiter on September 13, 2010, 03:51:52 pm.READPRGSGetCalc("apvrDATA")->D->P .get the pointer to the appvar DATA"prgm"->Str0ZZ .initialize Str0ZZdet(8 ) .You want this here so you don't overwrite something important if there's something important right after the program in memory. While P<{D-2}rr-12 .check for reaching the end of the AppVarlength(P)->L .store the length of the string at P to L, because it will be used more than onceCopy(P,Str0ZZ,L) .annex data at current position to Str0ZZP+L+1->P .add the length of the string at P to P to move P to the start of the next string.Code to do whatever you want with the program...Endouch! forgot about the Zeros( 8 ) or det( 8 ) part Quote from: ztrumpet on September 13, 2010, 03:59:11 pmQuote from: LordConiupiter on September 13, 2010, 03:51:52 pmI don't know wheter Str0ZZ should be Str09 or not, because I thought only Str00 till Str99 were supported, but I'm not sure about that.It's supported. Axe supports names up to three chars now. nice to know! haven't heard/seen it anywhere, but that's my bad the -12 should be -9, but that I've already changed.EDIT: lol! i noticed your space between the 8 and the ), but didn't see why, but now I see Wait, why?
perhaps you should seperate the data in the AppVar with zero's? then you could use the length( command to see how long the nam is, and then add that to a pointer to the current program-name. here is some code which should do it:Code: [Select].READPRGSGetCalc("apvrDATA")->D->P .get the pointer to the appvar DATA"prgm"->Str0ZZ .initialize Str0ZZWhile P<{D-2}rr-9 .check for reaching the end of the AppVarlength(P)->L .store the length of the string at P to L, because it will be used more than onceCopy(P,Str0ZZ,L) .annex data at current position to Str0ZZP+L+1->P .add the length of the string at P to P to move P to the start of the next string.Code to do whatever you want with the program...Endthis code is not tested, use at your own risk I don't know wheter Str0ZZ should be Str09 or not, because I thought only Str00 till Str99 were supported, but I'm not sure about that.