Discussion:
m68k PIC documentation
Anders Magnusson
2014-04-09 13:30:53 UTC
Permalink
Anyone know of PIC docs for m68k? Google do not find anything useful
for me...

-- Ragge
Kurt Lidl
2014-04-09 15:05:41 UTC
Permalink
Post by Anders Magnusson
Anyone know of PIC docs for m68k? Google do not find anything useful
for me...
It looks like the book:

"Principles of Computer Hardware", but Alan Clements has a section
about PIC code in chapter 6, that describes in detail some of the
limitations of PIC code on the m68k. (Around page 250, according
to Google Books.)

As I recall, the branch relative operations only have a 16bit
displacement on the 68000/68010. On the 68020/68030/68040,
there's a 32bit offset variant for BRA, in addition to the
8bit and 16bit versions of the instruction. (Presumably
the 68060 is like the 68040, but I've never used one of those.)

The MOVE instruction only has 16 bit displacement for the
address register indirect addressing, which is what drives
the +/- 32K limitation for PIC code. At least as I understand it.

-Kurt
Janne Johansson
2014-04-09 15:22:28 UTC
Permalink
Post by Kurt Lidl
Post by Anders Magnusson
Anyone know of PIC docs for m68k? Google do not find anything useful
for me...
"Principles of Computer Hardware", but Alan Clements has a section
about PIC code in chapter 6, that describes in detail some of the
limitations of PIC code on the m68k. (Around page 250, according
to Google Books.)
As I recall, the branch relative operations only have a 16bit
displacement on the 68000/68010. On the 68020/68030/68040,
there's a 32bit offset variant for BRA, in addition to the
8bit and 16bit versions of the instruction. (Presumably
the 68060 is like the 68040, but I've never used one of those.)
I did. the 060 is like 040 except it needs to emulate the hard stuff
floating math (sin,cos and so on), 32:32=>64 bit MUL/DIVs, MOVEP (which
noone uses ;)
It also has two ALUs or whatever, so it can execute two instructions in
paralell if god is good.
Post by Kurt Lidl
The MOVE instruction only has 16 bit displacement for the
address register indirect addressing, which is what drives
the +/- 32K limitation for PIC code. At least as I understand it.
I think on 020+ you can do 32-bit offsets with the address register
indirect addressing.
MOVE.W #1234,(PC,A0.L) or how you wrote that on amiga, dunno how it looks
in gas.

http://www.chemie.fu-berlin.de/chemnet/use/info/gas/gas_15.html
that mentions .w or .l as a size for the displacement.
--
May the most significant bit of your life be positive.
Hauke Fath
2014-04-15 07:30:02 UTC
Permalink
Post by Anders Magnusson
Anyone know of PIC docs for m68k? Google do not find anything useful
for me...
The "System V Application Binary Interface Motorola 68000 Processor Family
Supplement" (ISBN 0-13-877663-6) which I found through German inter-library
loan, and later as a used copy, has a few paragraphs on PIC in chapter 3.

If you cannot get the book through your friendly university library, I
could scan the pages for you.

hauke


--
"It's never straight up and down" (DEVO)

Loading...