* Uses Format-Lib "PROCS.FOR"    rev. 1.4 (05/99)*
       PRINT  0              No listing          *
*------------------------------------------------*
*      Format collection PROCS.FOR               *
*      ---------------------------               *
*                                                *
*      04/97  1.1  Derived form COMFORM          *
*      10/97  1.2  PPC-cmpl corrected            *1/2
*      12/98  1.3  PRODEC ans Handbuch angep.(Wo)*1/3
*      05/99  1.4  less Space in P8090(PPC)  (Wo)*1/4
*                  some comments corrected       *1/4
*------------------------------------------------*
*
      .IF_PROCTYPE  M68K
*------------------------------------------------*
*..... Procedure exit ...........................*
PROCEX FORMAT              ; no parameter      *
/  01001010101011011111111111110000 tst.l -16(a5)
/  0110011000001010          bne.s  $+12
/  00100000011011011111111111111000 movea.l -8(a5)
/  00101010011011011111111111110100 movea.l -12 ..
/  0100111011010000          jmp  (a0)           *
/  0100111001001100          retn                *
/  e
*------------------------------------------------*
*..... Procedure declaration ....................*
PRODEC FORMAT a,a            wspsize,parcnt      *
/      #A=#1#A+16#A+18       wspsize+FLVA bilden *1/3
/      0010001000111100#A(0:31) move.l =#1+..,d1 *1/3
/      1101001010001010      add.l a2,d1         *
/      1011011111000001      cmpa.l d1,a3        *
/      0110001100010010      bls.b $+$14         *1/4
/      1100010101001101      exg  a2,a5          *
/      0010101010001011      move.l a3,(a5)      *
/      01001011111011010000000000010010 lea 18(a5)
/      0100001010011101      clr.l (A5)+         *1/4
/      0010101011001010      move.l a2,(A5)+     *
/      0010101011011111      move.l (A7)+,(A5)+  *1/4
/      0100001010011101      clr.l (A5)+         *1/4
/      0110000000000110      bra.b  $+8          *
/      01001110101011101111111101100000 jsr ..(a6)
/      #A=0#A-#2             -parcount           *1/3
/      #A(16:31)             DC -parcount        *
/      e                     end this format     *
*------------------------------------------------*
*..... Procedure declaration P80/P90 environm. ..*
P8090  FORMAT a,a            wspsize,parcnt      *
/      #A=#1#A-#2            A=wspsz-flag9       *
/      0010001000111100#A(0:31) move.l =#1-#2,d1 *1/4
/      1101001010001010      add.l a2,d1         *
/      1011011111000001      cmpa.l d1,a3        *
/      0110001100010010      bls.b $+$14         *1/4
/      1100010101001101      exg  a2,a5          *
/      0010101010001011      move.l a3,(a5)      *
/      01001011111011010000000000010010 lea 18(a5)
/      0100001010011101      clr.l (A5)+         *1/4
/      0010101011001010      move.l a2,(A5)+     *
/      0010101011011111      move.l (A7)+,(A5)+  *1/4
/      0100001010011101      clr.l (A5)+         *1/4
/      0110000000000110      bra.b  $+8          *
/      01001110101011101111111101100000 jsr ..(a6)
/      #A=0#A-#2             -FLAG9              *
/      #A(16:31)             DC -FLAG9           *
/      #A-30#A-4             -FLAG9-FLVA (34)    *
/      0100101111101101#A(16:31) LEA -FLVA-FLAG9.*
/      e                     end this format     *
*------------------------------------------------*
*----- QP8090 -Format ---------------------------*
*..... Quick proc entry in P80/90 environment ...*
QP8090 FORMAT   a,a          WSPSZ,FLAG9         *
/      #A=#2#A-#1#A+31#A+2#A>0  FLAG9-WSPSZ+33>0 ?
/      0010010010001101      move.l a5,(a2)      *
/      #A=0#A-#2             (-FLAG9)            *
/      0100101111101010#A(16:31) lea ..(A2),A5   *
/      e
*------------------------------------------------*
*----- QX8090 -Format ---------------------------*
*..... Quick proc exit in P80/90 environment ... *
QX8090 FORMAT  a             FLAG9               *
/      0010111000101101#1(16:31) move.l FLAG9,D7 *
/      0110011100000100      beq.b $+6           *
/      0010101001000111      movea.l d7,a5       *
/      0100111001110101      rts                 *
/      0100111001001100      retn                *
/      e
*------------------------------------------------*
*....  Signature check ..........................*
SIGCHK FORMAT a              Signature check     *
/      1011000010111100#1(0:31)  cmp.l =#1,D0    *
/      0101011011000000      sne d0              *
/      0100100010000000      ext d0              *
/      0100000110000000      chk d0,d0           *
/      e                     close format        *
*------------------------------------------------*
*..... Procedure exit P80/90 environment ........*
X8090  FORMAT  a             FLAG9 is para       *
/      #A=#1#A+18           -16+FLVA+FLAG9       *
/      0100101010101101#1(16:31)  tst.l FLAG9(A5)*
/      0110011100010100      beq.b  $+22         *
/      0100101010101101#A(16:31) tst.l ...(A5)   *
/      0110011000001010      bne.b $+12          *
/      #A+8                  now (-8+FLVA+FLAG9) *
/      0010000001101101#A(16:31) movea.l ..,a0   *
/      #A-4                  now (-12+FLVA+FLAG9)*
/      0010101001101101#A(16:31) movea.l ..,a5   *
/      0100111011010000      jmp  (a0)           *
/      #A+12                 now (FLVA+FLAG9)    *
/      0100101111101101#A(16:31) lea ..,a5       *
/      0100111001001100      retn                *
/  e
*------------------------------------------------*
      .FIN

       PAGE
      .IF_PROCTYPE   MPC601                       
*------------------------------------------------*
*..... Procedure exit ...........................*
PROCEX FORMAT                ; no parameter      *
/  10000011111011011111111111110000 lwz r31,.... 
/  00110111111111110000000000000000 addic. r31,=0
/  01000000100000100000000000010100 bne $+20     *
/  10000001000011011111111111111000 lwz a0,prtnad*
/  10000001101011011111111111110100 lwz a5,....  *
/  01111101000010000000001110100110 mtlr a0      *
/  01001110100000000000000000100000 blr          *
/  00111011110000000100000010110000 retn 1st     *
/  01000100000000000000000000000010 retn 2 nd    *
/  e
*------------------------------------------------*
*..... Procedure declaration ....................*
PRODEC FORMAT a,a            wspsize,parcnt      *
/ 01111111111010000000001010100110  mflr r31     *
/ 01001000000000000000000000001001  bl $+8       *
/ #A=#1#A+16#A+20#A(0:31)           wspsize+FLVA *1/3
/ 01111100001010000000001010100110  mflr d1      *
/ 10000000001000010000000000000000  lwz d1,(d1)  *
/ 01111100001000010101001000010100  add d1,a2    *
/ 01111100000010110000100001000000  cmpl a3,d1   *1/2
/ 01000000100000010000000000100100  ble $+36     *
/ 10010001011010100000000000000000  stw a3,(a2)  *
/ 00111011110000000000000000000000  li r30,=0    *
/ 10010011110010100000000000010100  stw r30,TIDO..
/ 10010001101010100000000000011000  stw a5,wlold..
/ 10010011111010100000000000011100  stw r31,prtnad..
/ 10010011110010100000000000100000  stw r30,bwio..
/ 00111001101010100000000000100100  addi a5,a2,=flva
/ 01001000000000000000000000010100  b $+20       *
/ 00111011110011101111111101100000  la r30,pentr 
/ 01111111110010000000001110100110  mtlr r30     *
/ 01001110100000000000000000100001  blrl         *
/ #A=0#A-#2                         -parcnt      *1/3
/ 0000000000000000#A(16:29)00       DC 0,-parcnt *1/3
/      e
*------------------------------------------------*
*..... Procedure declaration in mixed P8090 env..*
P8090  FORMAT a,a            wspsize,parcnt      *
/ 01111111111010000000001010100110  mflr r31     *
/ #A=#1#A-#2                        A=wspsz-flag9*1/4
/ 0011110000100000#A(0:15)          lis d1,=#Ah  *1/4
/ 0110000000100001#A(16:31)         ori d1,=#Al  *1/4
/ 01111100001000010101001000010100  add d1,a2    *
/ 01111100000010110000100001000000  cmpl a3,d1   *1/2
/ 01000000100000010000000000100100  ble $+36     *
/ 10010001011010100000000000000000  stw a3,(a2)  *
/ 00111011110000000000000000000000  li r30,=0    *
/ 10010011110010100000000000010100  stw r30,TIDO..
/ 10010001101010100000000000011000  stw a5,wlold..
/ 10010011111010100000000000011100  stw r31,prtnad..
/ 10010011110010100000000000100000  stw r30,bwio..
/ #A=0#A-#2                         -FLAG9       *1/4
/ 0011100110101010#A(16:31)         addi a5,a2,=-fl
/ 01001000000000000000000000011000  b $+24       *
/ 00111011110011101111111101100000  la r30,pentr 
/ 01111111110010000000001110100110  mtlr r30     *
/ 01001110100000000000000000100001  blrl         *
/ 0000000000000000#A(16:31)         DC 0,-FLAG9  *
/ #A=0#A-30#A-6#A-#2                -FLVA-FLAG9  *
/ 0011100110101101#A(16:31)         addi a5,=... *
/      e
*------------------------------------------------*
*..... Quick proc entry in mixed environment ....*
QP8090 FORMAT a,a            wspsz,FLAG9         *
/ #A=#2#A-#1#A+31#A+2#A>0       FLAG9-WSPSZ+33>0 ?
/ 10010001101010100000000000000000  stw a5,(a2)  *
/ #A=0#A-#2                         (-FLAG9)     *
/ 0011100110101010#A(16:31)         addi a5,a2,=..
/ 01111111111010000000001010100110  mflr r31     *
/ #A=#2#A+4                         (FLAG9+4)    *
/ 1001001111101101#A(16:31)         stw r31,..(a5)
/ e
*------------------------------------------------*
*....  Quick proc exit in mixed environment .....*
QX8090 FORMAT  a             para: FLAG9         *
/ #A=#1#A+4                  (FLAG9+4)           *
/ 1000001111101101#A(16:31)  lwz r31,FLAG9+4(a5) *
/ 01111111111010000000001110100110  mtlr r31     *
/ 1000000110101101#1(16:31)  lwz a5,FLAG9(a5)    *
/ 01001110100000000000000000100000  blr          *
/ e
*------------------------------------------------*
*....  Signature check ..........................*
SIGCHK FORMAT a              Signature check     *
/      0011111111100000#1(0:15)  lis r31,= ...   *
/      0110001111111111#1(16:31) ori r31,= ...   *
/      01111111011111110000000000001000 tw $1B   *
/      e                     close format        *
*------------------------------------------------*
*..... Procedure exit mixed P8090 environment....*
X8090 FORMAT  a                  parameter:FLAG9 *
/  #A=20#A+#1                    (TIDO+FLAG9)    *
/  1000001111101101#A(16:31)        lwz r31,.... 
/  00110111111111110000000000000000 addic. r31,=0
/  01000000100000100000000000010100 bne $+20     *
/  #A+8                          (PRTNAD+FLAG9)  *
/  1000000100001101#A(16:31)        lwz a0,prtnad*
/  #A-4                          (WLOLD+FLAG9)   *
/  1000000110101101#A(16:31)        lwz a5,....  *
/  01111101000010000000001110100110 mtlr a0      *
/  01001110100000000000000000100000 blr          *
/  #A=#1#A+30#A+6                   FLAG9+FLVA   *
/  0011100110101101#A(16:31)        addi a5,=... *
/  00111011110000000100000010110000 retn 1st     *
/  01000100000000000000000000000010 retn 2 nd    *
/  e
*------------------------------------------------*
       .FIN         
