PDA

View Full Version : Prop Assembly Help



allanlane5
05-24-2008, 02:07 AM
I've got the LaMothe book, and downloaded the Parallax docs.

I've been perusing the Hydra Video driver, and it looks like it uses heavily "self-modifying code".

Does anybody have any more detail on how Propeller assembly works?

Thanks.

StefanL38
05-24-2008, 02:19 AM
http://forums.parallax.com/showthread.php?p=601870
http://forums.parallax.com/showthread.php?p=668559
http://forums.parallax.com/showthread.php?p=575479

Ale
05-24-2008, 02:24 AM
I'd recommend my simulator, great to test assembly http://forums.parallax.com/images/smilies/wink.gif

sourceforge.net/projects/ppropellersim

Mike Green
05-24-2008, 05:54 AM
The Propeller doesn't have index registers, so any indirect access (like arrays) has to be done with self-modifying code.

StefanL38
05-24-2008, 08:10 AM
@ ale

give an estimation:
how long can a code for the propeller DIRECTLY without your simulator
until the amount of time gets bigger than

- the time needed searching through your unzipped directories to find a readme that gives a QUICK overview
- the time needed searching through your unzipped directories to find a main-file ?
- learning about the basics of java SDK HOW to compile it ?

Stefan

BTX
05-24-2008, 09:20 AM
Stefan.
It tooks me about 30sec to find the application in:
\pPropellerSim\dist\pPropellerSim including "double click" to execute.
Not needs to compile it.

Readme.txt say:
========================
BUILD OUTPUT DESCRIPTION
========================

When you build an Java application project that has a main class, the IDE
automatically copies all of the JAR
files on the projects classpath to your projects dist/lib folder. The IDE
also adds each of the JAR files to the Class-Path element in the application
JAR files manifest file (MANIFEST.MF).

To run the project from the command line, go to the dist folder and
type the following:

java -jar "pPropellerSim.jar"

To distribute this project, zip up the dist folder (including the lib folder)
and distribute the ZIP file.

Notes:

* If two JAR files on the project classpath have the same name, only the first
JAR file is copied to the lib folder.
* If the classpath contains a folder of classes or resources, none of the
classpath elements are copied to the dist folder.
* If a library on the projects classpath also has a Class-Path element
specified in the manifest,the content of the Class-Path element has to be on
the projects runtime path.
* To set a main class in a standard Java project, right-click the project node
in the Projects window and choose Properties. Then click Run and enter the
class name in the Main Class field. Alternatively, you can manually type the
class name in the manifest Main-Class element.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.

Alberto.

Ale
05-24-2008, 06:07 PM
Thanks BTX !

I'd add something... The release notes are also available to be read before/during/after download... some of your questions can be there.

StefanL38: As a side note: I find simulating my code (I program exclusively in asm, no spin thanks) much faster to catch bugs than making small changes recompiling testing again and so on.

If you would take the time to ask yourself why that project is at all in sourceforge, you may realize that it is open source and that means that anyone can contribute, even you. So far nobody came forward. Your loss not mine. Development continues, a new version will be released soon and that will address many of the shortcomings I found... because I use it. Migtor suggested to put it there and I thought was a opportunity more people could benefit from that.

StefanL38
05-24-2008, 07:02 PM
Hello Ale,

i was disapointed because of that:

unzipping the zipfile
two directories called __MACOSX and pPropellerSim

__MACOSX my thought sounds like for MAC-computers or an extra Operating system

first thing i thought a-hm where is the readme ?
click onto MACOSX another subdir with the same name as the other pPropellerSim
my thought: not well organized because of doubled names

clicking through the subsubdirs only strangenamed *.store files

ok try the other directory

a-hm a build.xml-file - my thought: seems to be sourcecode that has to be compiled

a file "RealeaseNotes.txt" my thought: sounds not like a readme let's look in anyway

thereleasenotefileisformattedasgoodasthissentence
almost unreadable

my former experience with Linux and java is:
complicated to handle first needs a lot of exercising to get to now the system

At this point i decided to cancel the examination.

There was a lot of misunderstanding by me about what thing means what
That made me upset and still i think: what would be so difficult to
add a well formatted file named README.TXT that gives a quick overview and names the path
to the executable file

regards

Stefan

Sapieha
05-24-2008, 09:11 PM
Hi Stefan...

In Windows system You may delate all MAC related files!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.

Sapieha

Harley
05-24-2008, 10:52 PM
Ale,

Today I finally downloaded pPropellerSim. But I'm at a total loss as how to use it. The ReadMe file is no help for me.

I'm not a PC'er, but decades from the Mac world. I'm running Windows XP using Parallals on a dual-core Intel iMac.

I've 'gone through the hoops' getting PASD and ViewPort to work with my Prop project and thought maybe your simulator would be another helpful tool. But I do not find any application to double-click to use it. Does it need a some file in the OBJ section?

Can you or someone provide a clue as what has to be done to use this simulator please? http://forums.parallax.com/images/smilies/yeah.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko

Ale
05-24-2008, 11:08 PM
Well, I thought all this was.. a piece of cake. It seems that... it is not. Welcome to the world of computers !.

Some may have missed the original thread were all this was clarified. Let's see if we go to get pPropellerSim running..

1. go to sourceforge and get it.. The release notes ! Do not forget to RFineM


ReleaseNotes said...

pPropellerSim v0.8.3 - Release notes

This is the full contents of the NetBeans IDE (v5.5.1) pPropellerSim Project.

Included are:

- Full sources (./src)
- Addtional libaries required to run the project (./dist/lib)
- Ready to run, compiled sources (./dist)
- Documentation and changelog (./src/doc)

This project can be accessed at sourceforge.net/projects/ppropellersim

To run:

cd dist
java -jar pPropellerSim

You can create a launcher under Xfce, Genome, KDE, etc, just type in the command field "java -jar <path/to/dist/>pPropellerSim.jar", without quotes, most of the times. Don't forget to have jre v1.5 (or jdk1.5), and java in your PATH.

A small script can be created under MacOS X to launch.

For Bugs/Comments, please use the project pages at SourceForge.net
or contact me at ale500[št]users.sourceforge.net

Have fun

Pacito.Sys




Well, more clear ?... echale agua !

What can I say ?...


Regarding how to use it, I recommend you read the readme.txt in src/doc and ask any specific questions you have. I assume you used any other simulator before... similarity helps.

Help with the docs are very welcome http://forums.parallax.com/images/smilies/burger.gif

heater
05-25-2008, 01:34 AM
No. Does nor work:

[root@andLinux michael]# java -jar pPropellerSim.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib/awte
xtra/AbsoluteLayout
at org.pacito.ppropellersim.COGFrame.initComponents(C OGFrame.java:382)
at org.pacito.ppropellersim.COGFrame.<init>(COGFrame.java:163)
at org.pacito.ppropellersim.Main.main(Main.java:42)
[root@andLinux michael]#

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

StefanL38
05-25-2008, 02:28 AM
Hello Ale,

first of all whats the RFineM ?


there is something wrong with the CR-LF characters in the readme-file

if i open the releasenotes or the readmefile ...\pPropellerSim-0.8.3\pPropellerSim\src\doc\readme.txt

with the standard windows editor it looks like the screenshot attached to this posting

The CR-LF got lost somehow and then it is unformatted

My Opinion: if the readme file is down under in the sub-sub-sub-subdirectory
\pPropellerSim-0.8.3\pPropellerSim\src\doc
that's a piece of "hide-and-seek-cake"

i'm using PCs now for twenty years and developed software with Pascal, Delphi, SPIN, Assembler
and whenever i downloaded codesnippets the documentaion was right in the mainfile itself
or in the main-directory of the zipfile.

Is it a common java-convention to put the documentation into the the subdirectory
...\ProjectMainName\ProjectSubname\src\doc ?

Beeing familiar with the propeller means not automatically beeing familiar with java.

And if you compare the Propeller-IDE with java SDK
The propeller-IDE is super-easy to use

So users that are not SUPERcomputerfreaks are attraced by the propeller because it so easy
to use.

regards
Stefan

Ale
05-25-2008, 03:54 AM
heater said...

No. Does nor work:

[root@andLinux michael]# java -jar pPropellerSim.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib/awte
xtra/AbsoluteLayout
at org.pacito.ppropellersim.COGFrame.initComponents(C OGFrame.java:382)
at org.pacito.ppropellersim.COGFrame.<init>(COGFrame.java:163)
at org.pacito.ppropellersim.Main.main(Main.java:42)
[root@andLinux michael]#



I just tested it. I works for me, in three different machines, MacOSX, Ubuntu 7.10 and Ubuntu 8.04 (Java 1.5).
You may want to find out why it is not finding AbsoluteLayout.jar that it is available in the lib directory.
Btw, using root is never a good idea. Normally /usr/local/bin is not in the PATH and some other oddities. I just tested it with my user and with root and it worked.

StefanL38: For the years of experience say you have, you should be a bit less complaining... I did not want to say Read the F*cking manual (RFM) so I changed it for Read the _fine_ manual. OTOH the texts can be read with the editors I have and I use i.e. Netbeans IDE, Midnight Commander, jEdit, enough for me. If you want proper _anything_ let's say it is 500 € for a 1 year subscription for pPropellerSim and some email support, 10 incidents per month plus new releases for that period. This is free software (Did you read the GPL v2, didn't you?), I am not bound to provide you anything beyond what I think is necessary/appropriate. If you like it, good, if you don't good. I do not gain anything with your complaints. Just saying "do it better because I am a lazy person", does not help me. Sorry. I already asked for collaboration and everyone looked to the other side... well, Es ist mir egal !

heater
05-25-2008, 08:18 PM
Ale, this starts to look interesting !

Thing is I'm currently running Ubuntu but in the form of andLinux www.andlinux.org/ (http://www.andlinux.org/) under Windows XP so:

1. I find out running pPropellerSim when currently in windows directory (/mnt/win/....pProp...) for some reason does not work.
2. Never mind it works if I copy everything to my linux home home directory !
3. Also works from XP anyway.
4. Previously I only copied over the pPropellerSim.jar file so obviously no go.
5. Of course the readme.txt does not display correctly in notepad as it uses unix line terminations. Have to use wordpad.

Sorry I'm totally out of touch with java so please bear with me.

I may have found a bug: When trying to jump to a label at address zero the jmp instruction is screwed up, see attached screen capture.

I'm sure pPropellerSimulator can be very useful but just now I'm experimenting with LMM code so I really need to see the HUB RAM, and then I'd need watch windows to keep an eye on the LMM program counter, registers etc. Perhaps it all gets a bit to much.

Cheers.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

Ale
05-25-2008, 10:07 PM
heater:

The screw up, is actually the label, if you write jump #0 it does work. Very strange.
The Hub RAM is available in the menu DATA. In COG Memory dump you can see the COG's memory again, with labels. It allows for modification of memory location (as longs) as well as breakpoint set/clear usw.

I have to post the new version, but first have to make the editor faster, it is painfully slow for something more than 100s lines, and to stop compilation on errors (I rewrote most of the compiler).