This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Celtic III => Your Projects
United-TI Archives -> Celtic III
 
    » Goto page 1, 2, 3, 4, 5, 6, 7  Next
» View previous topic :: View next topic  
Author Message
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 22 Sep 2007 10:23:44 pm    Post subject:

Well, here we go. This is a place where people can let me know what kind of features might be useful for a project such as this one. Keep in mind that features for individual builds can be enabled or disabled so only the features the user needs will be included in the binary that he or she will create.

Note that this post will be edited as features are implemented and new ideas are provided.

Anyway, the current features are as follows, in no particular order:

1. Support of program variables (PROG) as well as application variables (APPVAR), henceforth known as "file"
2. Performing any function with hidden variables using their unhidden name
3. Reading lines from a file from either RAM or archive
4. Inserting or deleting lines from a RAM-resident file
5. Toggling of the following parameters of a file: hidden/unhidden, archive/unarchived, locked/unlocked.
6. Delete file.
7. Indexing and ungrouping of grouped files.

The following features are currently on the "drawing board" :

1. Toggling between APPVAR and PROG file types (should be insanely easy to do)
2. Renaming files
3. Multi-line copying
4. Entire program copying
5. Directly copying a line from one program to another
6. Hex-binary reading/writing from the Nth byte in source/destination.
-------------------------
EDIT: For those who are viewing this topic for the very first time, the discussion has turned toward the FlashAPP version, which is, save for the size of a page (16K), the application is unrestricted in the memory that it uses, and is far faster than just about any homescreen-run ASM program could ever be, if for the simple fact that there's no memory relocation going on when the application is called.

As far as this topic goes, I'm trying to find *useful* ways to fill up the 16K of space I'm preallocated. I do not intend on making this a multi-page application, so the question of getting more space is completely out.

Most recent versions of the build will be kept in the "Current Progress" thread as they are discussed. If you can, download the file and view its ReadME file AND ensure that you understand what it's saying. In addition, READ THE ENTIRE TOPIC before you post about what features you want to add.

Thank you.


Last edited by Guest on 07 Apr 2008 03:34:30 pm; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 22 Sep 2007 10:41:48 pm    Post subject:

In PyroEdit 4.0, there's a couple of programs called prgmPRGM2STR and prgmSTR2PRGM. The former takes the program's name in Ans and returns the entire program as a string in Ans, complete with newline tokens that behave weirdly and appear as spaces. The latter takes the same string in Ans and takes the program name in Str7 and overwrites/creates a program with that name with the code from Ans.

It'd be nice to have those features in Celtic III, but not necessary.

Considering the amount of feature you have, why don't you distribute the all-inclusive binary and the source, and in the source have a bunch of definitions that either include or exclude certain features Smile.

EDIT: To make your it a bit easier, if you decide to do this, I disassembled the programs.

PRGM2STR.z80

Code:
     bcall(_AnsName)     
     rst  10h     
     and  1Fh
     jr   z, Label1
     di           
     push de     
     exx         
     pop  de     
     ld   hl, OP1
     ld   (hl), 05h
     inc  hl     
     ex   de, hl 
     ld   c, (hl)
     inc  hl     
     ld   b, (hl)
     inc  hl     
     ldir         
     exx         
     ei           
     bcall(_DelVar)     
     bcall(_ChkFindSym)     
     ret  c       
     push bc     
     ex   de, hl 
     ld   a, b   
     or   a       
     jr   z, Label2
     ld   b, 00h
     add  hl, bc 
     ld   c, 0Ah
     add  hl, bc 
     pop  bc     
     push bc     
     push hl     
     bcall(_LoadDEIndPaged)     

Label3:
     bcall(_AnsName)     
     ex   de, hl 
     push hl     
     bcall(_CreateStrng)     
     pop  bc     
     pop  hl     
     pop  af     
     inc  bc     
     inc  bc     
     bcall(_FlashToRam)     
     ret         

Label2:
     push hl     
     bcall(04009h)     
     ex   de, hl 
     jr   Label3

Label1:
     push de     
     ld   hl, (08568h)
     ld   h, a   
     bcall(_SetXXXXOP2)     
     ld   hl, OP2
     ld   bc, 0009h
     pop  de     
     ldir         
     ret         
     ld   b, l   

 ; Disassembled by Jimmy Conner - timagic@yahoo.com
 ; @ 9/22/2007 10:43:48 PM
 ; Disassembler v1.7
 ; Total Opcodes: 60
 ; Total Data: 0
 ; Z80 AC   -  z80.us.fornax.com
 ; Personal -  www.timagic.cjb.net
.end
end


STR2PRGM.z80

Code:

.org        9D93h

     ld   hl, Str1
     rst  20h     
     bcall(_ChkFindSym)     
     ld   c, 01h
     jr   c, Label1
     ld   a, b   
     or   a       
     ld   c, 02h
     jr   nz, Label1
     ex   de, hl 
     ld   c, (hl)
     inc  hl     
     ld   b, (hl)
     inc  hl     
     ld   de, 08001h
     ld   a, 05h
     ld   (ramStart), a 
     ldir         
     xor  a       
     ld   (de), a
     bcall(_AnsName)     
     bcall(_ChkFindSym)     
     ld   a, (hl)
     cp   04h
     ret  nz     
     ex   de, hl 
     ld   c, (hl)
     inc  hl     
     ld   b, (hl)
     push bc     
     ld   hl, ramStart
     rst  20h     
     bcall(_ChkFindSym)     
     jr   c, Label2
     bcall(_DelVarArc)     
     ld   hl, ramStart
     rst  20h     

Label2:
     pop  hl     
     push hl     
     bcall(_CreateProg)     
     inc  de     
     inc  de     
     push de     
     bcall(_AnsName)     
     bcall(_ChkFindSym)     
     ex   de, hl 
     inc  hl     
     inc  hl     
     pop  de     
     pop  bc     
     ldir         

Label1:
     ld   a, c   
     bcall(_SetXXOP1)     
     bcall(_StoAns)     
     ret         
     inc  b       
     xor  d       

Str1:
     .db  06h, 00h, 1Ah

 ; Disassembled by Jimmy Conner - timagic@yahoo.com
 ; @ 9/22/2007 10:43:51 PM
 ; Disassembler v1.7
 ; Total Opcodes: 57
 ; Total Data: 3
 ; Z80 AC   -  z80.us.fornax.com
 ; Personal -  www.timagic.cjb.net
.end
end


Last edited by Guest on 22 Sep 2007 10:46:41 pm; edited 1 time in total
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 22 Sep 2007 11:10:32 pm    Post subject:

Harrierfalcon wrote:
In PyroEdit 4.0, there's a couple of programs called prgmPRGM2STR and prgmSTR2PRGM.  The former takes the program's name in Ans and returns the entire program as a string in Ans, complete with newline tokens that behave weirdly and appear as spaces.  The latter takes the same string in Ans and takes the program name in Str7 and overwrites/creates a program with that name with the code from Ans.

It'd be nice to have those features in Celtic III, but not necessary.

Considering the amount of feature you have, why don't you distribute the all-inclusive binary and the source, and in the source have a bunch of definitions that either include or exclude certain features Smile.
[post="113049"]<{POST_SNAPBACK}>[/post]


1. I heard of this one before. vuurrobin mentioned something about it relating back to one your own posts, so I thought about it and I figured it would be relatively easy. All I really have to do is call up a subroutine and run a copy until EOF is reached. That's for copying a program to a string. I would expect the user to use the standard line writing routine to paste that information into a program.

2. Source is always included, and those definitions already exist. Perhaps I should provide links to those project files, eh?

Anyway, I've taken note of your suggestion. Thanks!
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 23 Sep 2007 06:35:46 pm    Post subject:

Harrierfalcon wrote:
PRGM2STR.z80

Code:
     bcall(_AnsName)    
     rst  10h    
     and  1Fh
     jr   z, Label1
     di          
     push de     
     exx         
     pop  de     
     ld   hl, OP1
     ld   (hl), 05h
     inc  hl     
     ex   de, hl 
     ld   c, (hl)
     inc  hl     
     ld   b, (hl)
     inc  hl     
     ldir        
     exx         
     ei          
     bcall(_DelVar)    
     bcall(_ChkFindSym)    
     ret  c      
     push bc     
     ex   de, hl 
     ld   a, b   
     or   a      
     jr   z, Label2
     ld   b, 00h
     add  hl, bc 
     ld   c, 0Ah
     add  hl, bc 
     pop  bc     
     push bc     
     push hl     
     bcall(_LoadDEIndPaged)    

Label3:
     bcall(_AnsName)    
     ex   de, hl 
     push hl     
     bcall(_CreateStrng)    
     pop  bc     
     pop  hl     
     pop  af     
     inc  bc     
     inc  bc     
     bcall(_FlashToRam)    
     ret         

Label2:
     push hl     
     bcall(04009h)    
     ex   de, hl 
     jr   Label3

Label1:
     push de     
     ld   hl, (08568h)
     ld   h, a   
     bcall(_SetXXXXOP2)    
     ld   hl, OP2
     ld   bc, 0009h
     pop  de     
     ldir        
     ret         
     ld   b, l   

 ; Disassembled by Jimmy Conner - timagic@yahoo.com
 ; @ 9/22/2007 10:43:48 PM
 ; Disassembler v1.7
 ; Total Opcodes: 60
 ; Total Data: 0
 ; Z80 AC   -  z80.us.fornax.com
 ; Personal -  www.timagic.cjb.net
.end
end

[post="113049"]<{POST_SNAPBACK}>[/post]


That's actually a renamed version of ZASSEMB1. Razz I believe I gave Demon permission to use it, though.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 23 Sep 2007 06:52:55 pm    Post subject:

I know--I'd accidentally pressed [ON] while I was compiling something with OTBP, and out of curiousity, I peeked at all the strings. I saw one containing ALL the equates, so I started toying around with some of your ASM subprograms. I found out about ZASSEMB1, and started using it in conjunction with CelticII, but then I tried out PyroEdit and stumbled upon a program that writes it back. How nice Smile!

Oh, and Iambian? The mass-ungroup feature of CelticIII isn't working for me...(I have the most recent Alpha)
Back to top
vuurrobin


Advanced Member


Joined: 09 Aug 2006
Posts: 428

Posted: 24 Sep 2007 04:58:40 am    Post subject:

besides de features I posted here, I have some more.

function 11, the find prog/appvar to work with groups,
and to work without a search string so it will output a list of all programs/appvars/groups.

if I can come with anymore ideas, I'll post them.
Back to top
thornahawk
μολών λαβέ


Active Member


Joined: 27 Mar 2005
Posts: 569

Posted: 07 Oct 2007 11:50:13 pm    Post subject:

I have a thought: how about a function that takes whatever is in Ans (or better, takes any possible variable as argument) and returns a numeric code that signifies what kind of variable is it (real, complex, list, matrix, string, etc.)?

thornahawk
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 08 Oct 2007 12:52:10 pm    Post subject:

thornahawk wrote:
I have a thought: how about a function that takes whatever is in Ans (or better, takes any possible variable as argument) and returns a numeric code that signifies what kind of variable is it (real, complex, list, matrix, string, etc.)?

thornahawk
[post="114068"]<{POST_SNAPBACK}>[/post]

For the Ans variable, that would be pretty easy. The code could possibly be something like this:

Code:
 bcall(_RclAns)
 ld a,(Op1)
 bcall(_SetXXOp1)
 bcall(_StoAns)
 ret

Where the Ans variable would now contain a numeric code that is according to its type. Some of these codes would be as follows:
0 = Real
1 = list
2 = Matrix
3 = equation
4 = string
12 = complex
13 = complex list

Is this the kind of feature you're asking for?
Implementing this should take very little space in the program. Say, 12 bytes for the code itself, and four bytes for the entry at the start of the program. A total of 16 bytes for this little feature. Would it be a useful 16 bytes, though?
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Oct 2007 01:41:17 pm    Post subject:

Oh yeah...that reminds me. What about a function that turns whatever type of variable that's in Ans into a string? Like lists, matrices, real variables, etc. ? It might get complicated, but it'll be very useful...

Last edited by Guest on 08 Oct 2007 03:15:49 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Oct 2007 02:27:44 pm    Post subject:

That's essentially the same as finding the type of expr(Ans, shouldn't need any new code.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 08 Oct 2007 02:56:44 pm    Post subject:

I think Harrierfalcon meant a function that converts the data in Ans to a string, like a number to string routine, only it would work with all data types. Kind of like Java's toString() method. So, a list would make it return "{1,2,3)" and a number would return "42". (Harrierfalcon, if I misunderstood your meaning, please correct me.)
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Oct 2007 03:15:18 pm    Post subject:

No, you didn't. I phrased oddly, I'll fix that.
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 08 Oct 2007 03:53:37 pm    Post subject:

Harrierfalcon wrote:
Oh yeah...that reminds me.  What about a function that turns whatever type of variable that's in Ans into a string?  Like lists, matrices, real variables, etc. ?  It might get complicated, but it'll be very useful...
[post="114079"]<{POST_SNAPBACK}>[/post]

If I understand this correctly, you're asking for an overglorified (and correctly working) version of the list to string util that I said I'd include into the Celtic III project? If that is the case, then the hardest part would be simply to convert each individual element in each list, matrix, or variable into a string and then calculate additional overhead (i.e. displaying the square braces for the matrices and the brackets for the lists).

For this to work properly, I'd have to add in the possibility of displaying these strings in scientific notation and so forth. Should I have the routine read the current mode settings and apply them (i.e. Float vs Fix N, where N is some number between 0 and 9)?

And... I fail to see what purpose this has other than a way to insert the data back into a program file. Is this the best reason, or are there others?


Last edited by Guest on 08 Oct 2007 03:57:32 pm; edited 1 time in total
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 08 Oct 2007 04:19:53 pm    Post subject:

Iambian, I had an idea about how to do the data to string method. It's a bit roundabout, but it might work. You back up what's on the screen, and use OutputExpr or FormDisp to display the variable's contents. Then, you read the string out of textShadow and copy the original display back. I guess you'd have to test it out and see if the routine will restore the display fast enough to be unnoticeable

Last edited by Guest on 08 Oct 2007 04:23:48 pm; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Oct 2007 04:37:35 pm    Post subject:

For, perhaps, data storage within a program. It's wouldn't be a very widely used function, but seeing as how you can include/exclude features, I thought it might be something useful for Celtic's features.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Oct 2007 05:22:57 pm    Post subject:

Iambian wrote:
Harrierfalcon wrote:
Oh yeah...that reminds me.  What about a function that turns whatever type of variable that's in Ans into a string?  Like lists, matrices, real variables, etc. ?  It might get complicated, but it'll be very useful...
[post="114079"]<{POST_SNAPBACK}>[/post]

If I understand this correctly, you're asking for an overglorified (and correctly working) version of the list to string util that I said I'd include into the Celtic III project? If that is the case, then the hardest part would be simply to convert each individual element in each list, matrix, or variable into a string and then calculate additional overhead (i.e. displaying the square braces for the matrices and the brackets for the lists).
Furthermore, I think that the code for this would be smaller in Basic and you wouldn't need an extra function.

magicdanw wrote:
Iambian, I had an idea about how to do the data to string method.  It's a bit roundabout, but it might work.  You back up what's on the screen, and use OutputExpr or FormDisp to display the variable's contents.  Then, you read the string out of textShadow and copy the original display back.  I guess you'd have to test it out and see if the routine will restore the display fast enough to be unnoticeable
[post="114097"]<{POST_SNAPBACK}>[/post]
This wouldn't work for large variables that won't fit on the screen.
Back to top
Demon


Advanced Member


Joined: 17 Jun 2006
Posts: 369

Posted: 08 Oct 2007 05:32:57 pm    Post subject:

DarkerLine wrote:
Iambian wrote:
Harrierfalcon wrote:
Oh yeah...that reminds me.  What about a function that turns whatever type of variable that's in Ans into a string?  Like lists, matrices, real variables, etc. ?  It might get complicated, but it'll be very useful...
[post="114079"]<{POST_SNAPBACK}>[/post]

If I understand this correctly, you're asking for an overglorified (and correctly working) version of the list to string util that I said I'd include into the Celtic III project? If that is the case, then the hardest part would be simply to convert each individual element in each list, matrix, or variable into a string and then calculate additional overhead (i.e. displaying the square braces for the matrices and the brackets for the lists).
Furthermore, I think that the code for this would be smaller in Basic and you wouldn't need an extra function.

magicdanw wrote:
Iambian, I had an idea about how to do the data to string method.  It's a bit roundabout, but it might work.  You back up what's on the screen, and use OutputExpr or FormDisp to display the variable's contents.  Then, you read the string out of textShadow and copy the original display back.  I guess you'd have to test it out and see if the routine will restore the display fast enough to be unnoticeable
[post="114097"]<{POST_SNAPBACK}>[/post]
This wouldn't work for large variables that won't fit on the screen.
[post="114100"]<{POST_SNAPBACK}>[/post]


I want that variable to string function too. I needed that last night and now I have to rewrite a whole entire
part of the generator program I was working on 'cause I didn't plan it out and forgot there was no way to do that yet.

[ fumes ]

Yeah, I should plan stuff next time. Razz


Last edited by Guest on 08 Oct 2007 05:34:12 pm; edited 1 time in total
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 08 Oct 2007 05:44:39 pm    Post subject:

DarkerLine wrote:
Iambian wrote:
Harrierfalcon wrote:
Oh yeah...that reminds me.  What about a function that turns whatever type of variable that's in Ans into a string?  Like lists, matrices, real variables, etc. ?  It might get complicated, but it'll be very useful...
[post="114079"]<{POST_SNAPBACK}>[/post]

If I understand this correctly, you're asking for an overglorified (and correctly working) version of the list to string util that I said I'd include into the Celtic III project? If that is the case, then the hardest part would be simply to convert each individual element in each list, matrix, or variable into a string and then calculate additional overhead (i.e. displaying the square braces for the matrices and the brackets for the lists).
Furthermore, I think that the code for this would be smaller in Basic and you wouldn't need an extra function.

magicdanw wrote:
Iambian, I had an idea about how to do the data to string method.  It's a bit roundabout, but it might work.  You back up what's on the screen, and use OutputExpr or FormDisp to display the variable's contents.  Then, you read the string out of textShadow and copy the original display back.  I guess you'd have to test it out and see if the routine will restore the display fast enough to be unnoticeable
[post="114097"]<{POST_SNAPBACK}>[/post]
This wouldn't work for large variables that won't fit on the screen.
[post="114100"]<{POST_SNAPBACK}>[/post]

Well, when text is output to the screen, if it's bigger than 16 characters I think the entire string is written to fmtString (97B1h). I haven't checked myself, but WikiTI seems to suggest that in its Homescreen Hook documentation.
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 08 Oct 2007 07:02:53 pm    Post subject:

Iambian wrote:
thornahawk wrote:
I have a thought: how about a function that takes whatever is in Ans (or better, takes any possible variable as argument) and returns a numeric code that signifies what kind of variable is it (real, complex, list, matrix, string, etc.)?

thornahawk
[post="114068"]<{POST_SNAPBACK}>[/post]

For the Ans variable, that would be pretty easy. The code could possibly be something like this:

Code:
 bcall(_RclAns)
 ld a,(Op1)
 bcall(_SetXXOp1)
 bcall(_StoAns)
 ret

Where the Ans variable would now contain a numeric code that is according to its type. Some of these codes would be as follows:
0 = Real
1 = list
2 = Matrix
3 = equation
4 = string
12 = complex
13 = complex list

Is this the kind of feature you're asking for?
Implementing this should take very little space in the program. Say, 12 bytes for the code itself, and four bytes for the entry at the start of the program. A total of 16 bytes for this little feature. Would it be a useful 16 bytes, though?
[post="114077"]<{POST_SNAPBACK}>[/post]

That destroys Ans, though. Why not just return the value in the function instead?
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 08 Oct 2007 11:55:23 pm    Post subject:

calc84maniac wrote:
(... lots of quoted material. See previous post...)

That destroys Ans, though. Why not just return the value in the function instead?
[post="114113"]<{POST_SNAPBACK}>[/post]

You're right about one thing. I could just skip _StoAns, but I'd need a place to store the result if this was the non-app version of Celtic III. The THETA variable would be the first choice, since it's expected.


Last edited by Guest on 08 Oct 2007 11:56:47 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2, 3, 4, 5, 6, 7  Next
» View previous topic :: View next topic  
Page 1 of 7 » All times are UTC - 5 Hours

 

Advertisement