• Description:
    Just an inlined assembly, read some 68k or ppc assembler documentation to learn more about this stuff.

  • History:
    • 0.15:
      • inline assembler can be used in more confortable way
      • You are able to use constants, variables and more in your assembler source
      • You can also use normal PowerD comments.
    • 0.18:
      • You can define the ASM/ENDASM keywords outside the procedures.
    • 0.20:
      • You are able to use arguments like (obj.item,ax), where obj is an object, item is the obj's item, and ax is an address register.
      • You can use constant expressions, where the constants could be used


  • Limitations:
    This feature requires sth like complete assembler reader. (Assembler writer is already contained in PowerD). I supported as much instructions and their addressing modes as I know, but these things requires lots of numbers and tables, so if You will find an error, please report.

  • Syntax:
    PowerD knows two ways of assembler usage in it's source. First way starts with ASM and ends with ENDASM keyword. Assembler code can be used only between these two keywords. Else some systax errors will appear. Second way is assembler-only procedure. Such procedure starts with APROC and ends with ENDPROC keyword.
      ASM
        here should be your assembler routines
      ENDASM
    
      APROC compute(d0:LONG,d1:LONG,d2:LONG)(LONG)
        here should be your assembler routines
      ENDPROC
    
  • PowerD known instructions:
    PowerD knows all the 68k instructions except some supervisor, mmu and some rare fpu instructions. If You find, something missing, please let me know, and I will fix/add it.

  • PowerD known addressing modes:
    PowerD used only 020 addressing modes, so obsolete modes like 123(a0) have to be changed to (123,a0). PowerD knows all 68k addressing modes. When addressing local PowerD variables, they have to be used alone, while global variables can be used much more comfortable ways:
      move.l  lvar,a0
      move.l  d2,lvar
      addi.l  #1,lvar
    
      move.l  ([gvar,pc],d0.w*8),d0
      move.l  ([gvar]),d0
    
    


  • Simple object offsets:
    To make Your inlined assembly more readable, You can replace Your direct offsets by it's object.item equivalents, so You can from 0.20a2 use:
      OBJECT myobj
        x,y
    
      DEF ptr:PTR TO myobj
    
      APROC main()
        move.l  ptr,a0
        move.l  (myobj.y,a0),d0
      ENDPROC
    

    instead of:
      OBJECT myobj
        x,y
    
      DEF ptr:PTR TO myobj
    
      APROC main()
        move.l  ptr,a0
        move.l  (4,a0),d0
      ENDPROC