Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

MAC Assembling??

[b][red]This message was edited by MrTrimble at 2002-11-2 14:12:5[/red][/b][hr]
Hello there.

I am a litle intrested in bying an MAC, i have never had one befor.

But hove is it to program in assembler on that machine,.. what does the registers look like and bla.. bla ... bla..?

Added:
On the new Macs i meen.




Comments

  • blipblip Member Posts: 756
    All Macs I've heard about use 68k processors manufactured by Motorola. They have 16 32-bit registers: data registers D0-D7 and address registers A0-A7. A7 is special in that it is like the stack pointer. Technically, you can actually use any register for that purpose, except that the CPU uses it internally for things like JSR (Jump to SubRoutine, which is more like the x86's CALL). The instructions work like this: INSTRUCTION SRC,DEST much unlike Intel x86 syntax. Here's some examples to get you started:
    [code]
    move.l #$12345678,D1 ;Overwrite all 32 bits of D1 with $12345678.
    move.b $B0BB1,A4 ;Get the byte at mem location $B0BB1 and put it in the lowest byte of A4.
    move.w A7,$5432 ;Save the stack pointer's low word to mem location $5432.
    [/code]
    One thing that's annoying is that the processor causes an exception if the vars aren't at least word aligned if they're larger than a byte.
  • MrTrimbleMrTrimble Member Posts: 35
    Does the RISC nature of the PowerPC make it more fun to deal with... or does it give you a headacke?

    I know that the Intel cpus is internaly RISC,.. but you never see that.

    Do you have acces to the real internals of the PPC or is it like the x86 with its layer to protect you from the horrible truth.?
  • blipblip Member Posts: 756
    RISC always give me a headache. Sorry, I don't know much more about 68ks.
Sign In or Register to comment.