Can You build one more directive in Yours program.
'' org x
x stands for LONGS to reserve in begining of COG space
That will give .. Example ..
DAT
org 0
'' org 5
JMP 0+5 ' Start of code
1
2
3
4
5
Start of code
Regards
ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Nothing is impossible, there are only different degrees of difficulty. For every stupid question there is at least one intelligent answer. Don't guess - ask instead. If you don't ask you won't know. If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
ONE info that tels me how much space is used in COG in that program.
Regards
ChJ
I would have to ...
Zero a counter when DAT is detected.
Increment the counter each time AAC emits an opcode line (being careful not to count "label only" lines)
Increment the counter each time a regular PASM line with an opcode is found.
Examine every long and res statement to extract amount to add to the counter
Display the counter value when "finishCodeSection" is hit.
Sounds a little "fussy".
Actually, I'm not sure that step 4 can always be done.· If a symbolic constant is used to allocate an array, AAC does not care·or know about the value.· So this scheme·would only work if explicit constants were used in those statements.
I think the real problem is that "fit"·is the statement that does the counting.· It should do the report.· That's a Propeller Tool issue.
This is not sounding like something I want to undertake.
Not all of them are posible to realise --- I KNOW that.
If it is "fussy" ... MAYBE maybe not .... If I will optimise code for COG it is good to know how much space fre I have
Regards
ChJ
Ps ... You maybe are Correct that it Is Propeller Tool that need have that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Nothing is impossible, there are only different degrees of difficulty. For every stupid question there is at least one intelligent answer. Don't guess - ask instead. If you don't ask you won't know. If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
You can easily investigate cog memory usage using PASD.· See attached screen capture.
It is not necessary to have the PASD kernel in your code, BUT, in order to get PASD to display the assembled code in detail, you need to load some cog with PASD enabled code.· Then, you can switch to different code in the PropTool, start up PASD, and press f2.
If you don't follow the above procedure, PASD will complain about the missing kernel, but will still load the code in its window and will show what locations are used, but it won't show what's in each location.
I have thought a bit more about providing usage statistics from AAC.· I might be able to simply count what can be counted and then show any symbols used in res statements as the symbols themselves.· That's a very confusing sentence.· Sorry.· Here's an example.
If the res statements had explicit sizes that added to 25, but 2 statements had symbols to define size, I could report:
code = 213··· variables = 25 + Bsize + Gdata
Then you can compute the memory usage base on your knowlege of how Bsize and Gdata were declared.
Very NICE idea .... Maybe not nessesary show SYMBOLS at all....
BUT have only CODE = 213 before RES area like ........
code = 213 + Variables
Regards
ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Nothing is impossible, there are only different degrees of difficulty. For every stupid question there is at least one intelligent answer. Don't guess - ask instead. If you don't ask you won't know. If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
My option was meant to even generate an JUMP at begining to have posiblity to fill Longs with other values not nessesary NOP's
org 5
0 JMP Real Start
1 Long X1
2 Long X2
3 Long X3
3 NOP
4 NOP
Real Start
do something
Regards
ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Nothing is impossible, there are only different degrees of difficulty. For every stupid question there is at least one intelligent answer. Don't guess - ask instead. If you don't ask you won't know. If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
* Don't you still need the jmp at loc 0 ? After that, I agree there are more succinct ways of filling the intervening locations.
No, the NOPs are executed from loc 0, and you don't have to use a long for a jmp. Of course if you put data there with some initial value condition code bits 2^18,2^19,2^20,2^21 set (^ = exponent) then it probably wont work ... $0003FFFF would be fine though. Look at the condition codes in the data sheet to fully understand it (combinations other than 0 may also work ... IF_Z for example).
Bob Anderson said...
* How do you check the address of a label. I thought that was one of the missing items in the Propeller Tool?
Just click on the label of a compiled file (F9) and its address appears in the status bar ... it will briefly flash yellow.
Thanks for the tip on checking the address of a label in Propeller Tool. It also works after F8.
Sapieha:
I don't want to reinvent the wheel. His technique (jazzed) of labeling critical locations (like the end of cog memory usage) is quite flexible.
I see no need to do more.
Thanks for that.
That posiblites on Porpeller Tool I have mised
"Men learn as long he live"
Hi Bob Anderson.
Now it is not so important.¨
BUT thanks You look on it AT ALL
Regards
ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Nothing is impossible, there are only different degrees of difficulty. For every stupid question there is at least one intelligent answer. Don't guess - ask instead. If you don't ask you won't know. If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Thanks for that.
That posiblites on Porpeller Tool I have mised
"Men learn as long he live"
...
Very true. I hope that I'm always open to learning something new. Happy I could help a little.
OT Aside ... or Now for something completely different ... temporarily:
BradC said...
Which DVD do you have? Can you recite it?
Not sure, maybe "Monty Python's Meaning of Life" ?. No recitals for sure[noparse]:)[/noparse] Haven't watched it in a while. One very funny skit involves a troll who will only let you safely pass if you correctly answer 3 questions. The end it is a wonderful twist that builds on part of an earlier story line detail. Something about the speed of an east -vs- west bound bird. I used to watch Flying Circus on Public TV long ago. I was a 70's Dr Who fan also.
I am working to "integrate" AAC with PreSpin.· Ariba is the author of that program and has given me enough guidance to get a skeleton program operating.
PreSpin allows macros and a more complete set of conditional compilation statements.· PreSpin will do it's work first; then it calls AAC.
The macro capability may be useful in supporting LMM code.· I know several members have asked about that.
Post Edited (Bob Anderson) : 11/4/2009 5:30:07 AM GMT
BUT Have You posiblites tu build my own MACROS to build my own COMMANDS?
Regards
ChJ
I have built a version of AAC that works with PreSpin.· With that combination: macros are possible; very complete conditional compilation is possible (much better than the primitive capability supported by AAC); and 'include' files (which can be conditional as well) are possible.· I am ready to post this verion in the Object Exchange, but I asked Ariba (the author of PreSpin) to review the manual.· He will do so this weekend.· I just wanted to let you know that it is coming.· It makes AAC easier to use in my opinion, quite apart from the additional capabiliies that PreSpin brings to the party.· With this combination, AAC seems to an extension of Propeller Tool.
Ariba has also said that he would give me a version of PreSpin that eliminates the need for a user to fill in a setting to activate the link to AAC at the beginning of every session.· I found that even during testing, I sometimes forgot that necessary step.
I have uploaded version 0.97 of AAC to the Object exchange.·
This new version restricts the processing of AAC statements to only those inside ·a DAT section.· This makes it safer to use AAC with existing code that may have used the two single quotes to imbed documention.· Without this "guard", it was possible for AAC to issue "warnings" when·it encountered lines that were really intended to be documentation comments, but looked like AAC statements (with ' ' in column 1)
On another note: I have been working with Ariba to incorporate AAC into PreSpin.· The way it works is that PreSpin invokes a command line version of AAC after it has done its preprocessing.· PreSpin is the·program that works with Propeller Tool and adds macro capability, conditional compilation, and "include" files.·
Ariba did a special version of PreSpin· (PreSpinACC.exe) to make it easy for AAC users, but the original PreSpin can be used as well.· You just have to remember to add a particular setting to PreSpin so that it knows to run AAC (this was easy to forget, so Ariba stepped in and helped out).
Ariba has reviewed the manual (which now describes PreSpin as well) for accuracy.· I have made corrections and am waiting for him to tell me if I got it right·
I have just uploaded Version 0.98 to the Object Exchange
Revision history...
0.98· Fixed: a void subroutine with no parameters was causing an exception ·······Fixed: a subroutine call with empty parameters was giving an error message ······· Fixed: in AACclient, if you tried to create a file by enabling edits, it wasn't ················ possible to write either the source or the output file.
0.97· Now processes "tagged" lines only if they are in a DAT block.
0.96· Fixed bug in case statement that was allowing "fall-through" into "otherwise"
0.95· Added a labeled fit statement (emitted when finishCodeSection is used) that makes ····· it easy to see how much cog memory has been used.· The manual has been updated to ····· show this feature.
Comments
One to foolish question.
Can You build one more directive in Yours program.
'' org x
x stands for LONGS to reserve in begining of COG space
That will give .. Example ..
DAT
org 0
'' org 5
JMP 0+5 ' Start of code
1
2
3
4
5
Start of code
Regards
ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
Sounds a little "fussy".
Actually, I'm not sure that step 4 can always be done.· If a symbolic constant is used to allocate an array, AAC does not care·or know about the value.· So this scheme·would only work if explicit constants were used in those statements.
I think the real problem is that "fit"·is the statement that does the counting.· It should do the report.· That's a Propeller Tool issue.
This is not sounding like something I want to undertake.
As I said ... That are foolish questions.
Not all of them are posible to realise --- I KNOW that.
If it is "fussy" ... MAYBE maybe not .... If I will optimise code for COG it is good to know how much space fre I have
Regards
ChJ
Ps ... You maybe are Correct that it Is Propeller Tool that need have that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
''·········org· 0
''· entry· goto realStart
''········ nop
''········ nop
···· ...
''·········nop
''· realStart
Then cognew(@entry,0) does what you want.· I don't see why a new directive is needed.
You can easily investigate cog memory usage using PASD.· See attached screen capture.
It is not necessary to have the PASD kernel in your code, BUT, in order to get PASD to display the assembled code in detail, you need to load some cog with PASD enabled code.· Then, you can switch to different code in the PropTool, start up PASD, and press f2.
If you don't follow the above procedure, PASD will complain about the missing kernel, but will still load the code in its window and will show what locations are used, but it won't show what's in each location.
I have thought a bit more about providing usage statistics from AAC.· I might be able to simply count what can be counted and then show any symbols used in res statements as the symbols themselves.· That's a very confusing sentence.· Sorry.· Here's an example.
If the res statements had explicit sizes that added to 25, but 2 statements had symbols to define size, I could report:
Then you can compute the memory usage base on your knowlege of how Bsize and Gdata were declared.
"code = 213 variables = 25 + Bsize + Gdata"
Very NICE idea .... Maybe not nessesary show SYMBOLS at all....
BUT have only CODE = 213 before RES area like ........
code = 213 + Variables
Regards
ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
pasm ORG long 0 [noparse][[/noparse]8] ' 8 NOPs ... condition bits 0 is NOP (approximately top two bytes) ' first instruction here
As far as left-over COG space, I always put a label at the end of long PASM so I can check its address.
That option is pretty easy. I'll put together a version with it added and we'll see how effective and/or useful it is.
Reserve YES.
My option was meant to even generate an JUMP at begining to have posiblity to fill Longs with other values not nessesary NOP's
org 5
0 JMP Real Start
1 Long X1
2 Long X2
3 Long X3
3 NOP
4 NOP
Real Start
do something
Regards
ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
Just click on the label of a compiled file (F9) and its address appears in the status bar ... it will briefly flash yellow.
Thanks for the tip on checking the address of a label in Propeller Tool. It also works after F8.
Sapieha:
I don't want to reinvent the wheel. His technique (jazzed) of labeling critical locations (like the end of cog memory usage) is quite flexible.
I see no need to do more.
Thanks for that.
That posiblites on Porpeller Tool I have mised
"Men learn as long he live"
Hi Bob Anderson.
Now it is not so important.¨
BUT thanks You look on it AT ALL
Regards
ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
Very true. I hope that I'm always open to learning something new. Happy I could help a little.
OT Aside ... or Now for something completely different ... temporarily:
Not sure, maybe "Monty Python's Meaning of Life" ?. No recitals for sure[noparse]:)[/noparse] Haven't watched it in a while. One very funny skit involves a troll who will only let you safely pass if you correctly answer 3 questions. The end it is a wonderful twist that builds on part of an earlier story line detail. Something about the speed of an east -vs- west bound bird. I used to watch Flying Circus on Public TV long ago. I was a 70's Dr Who fan also.
See new version (0.95) that implements the technique (suggested by jazzed) for determining cog memory usage.
Check my original post at top of thread for a note about the manual.
Something like this ?
09B4(01EC) | fit 495 09B4(01EC) | There are 3 ($003) Longs left in the cog
Heater asked for that a while back.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
I am working to "integrate" AAC with PreSpin.· Ariba is the author of that program and has given me enough guidance to get a skeleton program operating.
PreSpin allows macros and a more complete set of conditional compilation statements.· PreSpin will do it's work first; then it calls AAC.
The macro capability may be useful in supporting LMM code.· I know several members have asked about that.
Post Edited (Bob Anderson) : 11/4/2009 5:30:07 AM GMT
Ariba has also said that he would give me a version of PreSpin that eliminates the need for a user to fill in a setting to activate the link to AAC at the beginning of every session.· I found that even during testing, I sometimes forgot that necessary step.
Bug:· previous version allowed "fall-through" into the "otherwise" clause.
This new version restricts the processing of AAC statements to only those inside ·a DAT section.· This makes it safer to use AAC with existing code that may have used the two single quotes to imbed documention.· Without this "guard", it was possible for AAC to issue "warnings" when·it encountered lines that were really intended to be documentation comments, but looked like AAC statements (with ' ' in column 1)
On another note: I have been working with Ariba to incorporate AAC into PreSpin.· The way it works is that PreSpin invokes a command line version of AAC after it has done its preprocessing.· PreSpin is the·program that works with Propeller Tool and adds macro capability, conditional compilation, and "include" files.·
Ariba did a special version of PreSpin· (PreSpinACC.exe) to make it easy for AAC users, but the original PreSpin can be used as well.· You just have to remember to add a particular setting to PreSpin so that it knows to run AAC (this was easy to forget, so Ariba stepped in and helped out).
Ariba has reviewed the manual (which now describes PreSpin as well) for accuracy.· I have made corrections and am waiting for him to tell me if I got it right·
Revision history...
0.98· Fixed: a void subroutine with no parameters was causing an exception
······ ·Fixed: a subroutine call with empty parameters was giving an error message
······· Fixed: in AACclient, if you tried to create a file by enabling edits, it wasn't
················ possible to write either the source or the output file.
0.97· Now processes "tagged" lines only if they are in a DAT block.
0.96· Fixed bug in case statement that was allowing "fall-through" into "otherwise"
0.95· Added a labeled fit statement (emitted when finishCodeSection is used) that makes
····· it easy to see how much cog memory has been used.· The manual has been updated to
····· show this feature.