0 Members and 1 Guest are viewing this topic.
In other news, Frey continues kicking unprecedented levels of ass.
.WriteGetCalc("appvMAROS",Y1)->PIf P{Y1-2}[sup]r[/sup]->SGetCalc("appvMTEMP",S)->JGetCalc("appvNTEMP",S/2*58)->M.^Where the program bytes are going to be stored while it's still being created. I've determined S/2*58 to be the maximum possible size of the resulting program.Copy(Y1,J,S)0->L0->D.D is length of code in NTEMP[3AA8]->Str1.^:DrawInv HEXIf 0.Writing to NTEMP is here for the time being until I get the rest of the program written[3A]->{M+D}D+1->DIf V=2 or (V=5 or (V=7.^These are the commands that turn pixels off. They're just the corresponding On command with a DrawInv each on the line before and the line after.Copy(Str1,M+D,2)D+2->DEndCopy(Str0,M+D,length(Str0))D+length(Str0)->DIf V=2 or (V=5 or (V=7Copy(Str1,M+D,2)D+2->DEndLbl LX->TY->U1->LReturnEndFor(Z,0,S/3-1){3*Z+J}->V3*Z+J+1->x3*Z+J+2->YIf V=1 or (V=2If L[A5]{T}[2C]{U}[2C302DBC28]{T}[2D]{X}[29122B2828]{U}[2D]{Y}[291229292900]->Str0.^As far as I know, this should be the bytes that Circle(T,U,0-sqrt((T-X)[sup]2[/sup]+((U-Y)[sup]2[/sup]))) gets stored as.0->LElsesub(LEndElseIf V=3
[code]This is code
////TO STORE////... drawing things here...GetCalc("appvNAMEOFYOURAPPVAR",768)->PCopy(L6,P,768////TO READ////GetCalc("appvNAMEOFYOURAPPVAR")->PCopy(P,L6,768DispGraph////TO STORE TO A PIC VAR////Repeat the STORE part, but instead ofGetCalc("appvNAMEOFYOURAPPVAR",768use GetCalc("PicNUMBERFROM0-9",768/////////////////////////////////
[01][t]Line([0004][01][t]Rect([0002]We use the null 00 as a filler since the tokens are one byte. If they are two bytes then we won't use them
1) Run through the appvar data with a for() loop2) Use the current byte of the appvar to determine the table entry of the command we want3) Use the table entry to paste in the appropriate token into the output file4) Use the table entry to advance our location in the program appropriately.5) Run a loop for the amount of arguments for a particular command6) Paste in the hex from the appvar and add commas as necessary7) Add a newline9) Repeat
"01234567890ABCDEF"->Str0 //Hex digit listGetCalc("appvNAME",Y1)GetCalc("appvOUTPUT",size)->P0->L //L will be the current position in the programFor(E,0,{Y1-2}^^r) //for the length of the appvar {Y1+E}*4+GDB1->T //Now T holds the pointer to the start of table entry... Copy(T+1,P+L,{T}) //Copy the token (at offest 1) to the current place in the program, and remember {T} holds how big the token is L+{T}->L //Increment L appropriately For(A,0,{T+3}) //For the amount of arguments... [t]E->{P+L} //scientific notation E since we will be using hex input... {{Y1+E+A}/16+Str0}->{P+L+1} //The left nibble first {{Y1+E+A}^16+Str0}->{P+L+2} //And the right nibble [t],->{P+L+3} //A comma... L+4->L //Increment L appropriately !If A-2 //If A=2, it is time to move on to the next 3 byte set so we need to A+1->A //Skip over a byte End End E 3F->{P+L} // The scientific notation E again...3F is a newline. E+{T+3}->E //Move forward appropriately in the offset code L+1->L //Increment L again since we added the newline, which counts as a byteEnd