Propeller assembler mnemonics
Kayjay
Posts: 4
I'm a newbie to the Prop and I've been browsing the manual to get an idea of the architecture and instructions etc. I noticed that the mnemonics are quite similar to the Z80 and the 8080. My question is this:- are these similarities intentional or just coincidence.
Does anyone have any ideas on this? Are Parallax connected with Zilog at all?
Happy new year to all :thumb:
Keith
Does anyone have any ideas on this? Are Parallax connected with Zilog at all?
Happy new year to all :thumb:
Keith
Comments
Anyway, back to the reading for me, the Prop is certainly a nice device and overtakes the PIC in a lot of ways but I can see there still being a place for both. It would be nice to combine them both in one project where the Prop handles the input and video and leaves the PIC to handle running the main part of the program. I guess that this has already been done but I'm just sat here with my head buzzing with ideas. I've found a new toy and I'm eager to play with it !!!
Keith
But the Propeller is 32bit while what you refer to is 8bit. At some point, every microprocessor's quirks and realities need to be learned in order to succeed with it. Since the timing of instructions is nearly always 4 cycles and the memory is flat, I think you might find the Propeller actually easier than those oldies.
Most processors tend to have instructions for addition, subtraction, comparison etc operations so of course a lot or assemblers use ADD, SUB, CMP etc as mnemonics. Similarly for control flow CALL, RET, JMP etc.
Do be sure to check the details though, how flags are set and when, how conditional execution is done, how subroutine calls/retrurns are handled an so on. Having the comfort of familiar instruction mnemonics can lead one into making wrong assumptions about things when moving from one CPU to another.
Then of couse the Prop has a few instructions you won't find in many other machines. For example REV. So it' good to be familiar with all opcodes not just stick to that subset you are used to using elsewhere.
I'm sure there is no connection between Zilog and Parallax. Apart from the Z80 emulators by myself an PullMoll:)
One of the major points that the Propeller has is the way it's memory is laid out, I really like that. How many times have I had to debug a PIC because I haven't changed the bank over when reading data, so the flat memory makes it a massive step over the PIC and also as you say it has 4 cycles for the majority of instructions which makes the writing of timing routines a doddle. I can definitely seeing me having a love affair with the Prop ! It definitely has some features that are a big improvement over the PIC.
Keith
It may be the references to the emulators that I've read about somewhere that have been making me think about the Z80 being linked with the Prop.
Thanks for the tips about the flag settings etc, I'll work on pushing the Z80 out of my mind when I start to do some coding. I've never learnt C preferring to code in machine code which if I had would help with flags etc I assume.
I'll make a point of reading through the instruction code list to familiarise myself with what is available and then time will make me remember the codes automatically.
Keith
Instructions are provided to modify source, destination, and instruction bit fields.
Oh no. What have we done?!
I once read up the history of the Z80 and found it was a group of 8080 people who thought it was not being done right and went off and set up their own company http://en.wikipedia.org/wiki/Zilog_Z80. I like the Z80, and I never really cared much for 8080 mnemonics. Strange how DJNZ is still there. I spent a lot of time coding Z80 in the early 1980s. Then the Intel 80x86 chips took over with the complexities of banked memory and memory offset registers and I have to say that they lost me as an assembly programmer for 25 years.
And then along comes the Propeller. A logical set of assembly commands. A flat memory map. A speed increase of around 20x. Perhaps a little confusing with the lack of registers, as Potatohead says, but Cluso99 set me right on that one and the lack of registers suddenly becomes a huge positive.
And now I'm as happy as a pig in mud!
http://smarthome.viviti.com/propeller for some photos of Pacman playing on the Propeller running a Z80 emulation. And it is still a little too fast.
Yes, I have a few hybrid designs. Then I found you could get the propeller to do it all. An amazing little chip really!
Regarding potatoheads comment about the prop having no registers in the traditional sense, I think that depends on how you look at it. From the perspective of not having specific registers to store data for performing arithmetic and logic functions with he is correct. Another way to look at it is that it has 512 registers that can be used for arithmetic and logic functions as well as being used for storing executable instructions.
Now those are truly general purpose registers.