home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / language / as / source / HelpAs next >
Encoding:
Text File  |  1994-05-23  |  61.6 KB  |  1,396 lines

  1. %ltorg
  2. Usage:     ltorg
  3. Summary:   Tells the assembler that it is okey to place literals at this
  4.            position. An ltorg is inserted at the end of all areas but it 
  5.            can be necessary to insert ltorgs at other positions in the file
  6.            as there must not be more than 4095 bytes between any use of a
  7.            litarate load (e.g., ldr r0,=31415) and the closest literate area.
  8.  
  9. %lnk
  10. Usage:     lnk filename
  11. Summary:   The assembler switches input to the given file. The rest of the
  12.            current file is ignored.
  13.  
  14. %get
  15. Usage:     get filename 
  16. Summary:   The assembler switches input to the new file, and returns to
  17.            the old file afterwords. The result is as if the new file, up
  18.            to a terminating 'end', was textually inserted at the position
  19.            of 'get'. 
  20.  
  21. %end
  22. Usage:     end 
  23. Summary:   Stop the assembler from interpreting the rest of the file.
  24.  
  25. %bin
  26. Usage:     bin filename
  27. Summary:   The assembler includes the contents of the file in the object
  28.            file. No check is done of the contents of the file.
  29.  
  30. %rn
  31. Usage:     <Identifier> rn <Expression>
  32. Summary:   The identifier can now be used as a cpu register in future
  33.            instructions. The expression must be in the interval 0 to 15
  34.            inclusive.
  35.  
  36. %fn
  37. Usage:     <Identifier> rn <Expression>
  38. Summary:   The identifier can now be used as a fpu register in future
  39.            instructions. The expression must be in the interval 0 to 7
  40.            inclusive
  41.  
  42. %cn
  43. Usage:     <Identifier> rn <Expression>
  44. Summary:   The identifier can now be used as a coprocessor register in
  45.            future instructions. The expression must be in the interval 
  46.            0 to 15 inclusive.
  47.  
  48. %equ
  49. Usage:     <Identifier> equ <Expression>
  50. Summary:   Defines an numerical identifier. '*' is a short form of equ.
  51.  
  52. %*
  53. Usage:     <Identifier> * <Expression>
  54. Summary:   Defines an numerical identifier. '*' is a short form of equ.
  55.  
  56. %dcb
  57. Usage:          dcb <Expression> {,<Expression>}*
  58. Summary:   Dcb defines one or more bytes. String constants are allowed as
  59.            expressions, which causes the characters of the string to be
  60.            loaded in consecutive bytes. '=' is a short form of dcb.
  61.  
  62. %=
  63. Usage:          = <Expression> {,<Expression>}*
  64. Summary:   '=' defines one or more bytes. String constants are allowed as
  65.            expressions, which causes the characters of the string to be
  66.            loaded in consecutive bytes. '=' is a short form of dcb.
  67.            (See ldr and str for alternative use of '='.)
  68.  
  69. %dcw
  70. Usage:          dcw <Expression> {,<Expression>}*
  71. Summary:   Dcw defines one or more 16-bits word. String constants can not
  72.            contain more than two characters and are converted to 16-bits
  73.            integers, 1:st character + (2:nd character << 8).
  74.  
  75. %dcd
  76. Usage:          dcd <Expression> {,<Expression>}*
  77. Summary:   Dcw defines one or more 32-bits word. String constants can not
  78.            contain more than four characters and are converted to 32-bits
  79.            integers, 1:st character + (2:nd character << 8) + (3:rd
  80.            character << 16) + (4:th character << 24).
  81.            '&' is a short form of dcd.
  82.  
  83. %&
  84. Usage:          & <Expression> {,<Expression>}*
  85. Summary:   '&' defines one or more 32-bits word. String constants can not
  86.            contain more than four characters and are converted to 32-bits
  87.            integers, 1:st character + (2:nd character << 8) + (3:rd
  88.            character << 16) + (4:th character << 24).
  89.            '&' is a short form of dcd.
  90.  
  91. %dcfs
  92. Usage:          dcfs <FloatExpression> {,<FloatExpression>}*
  93. Summary:   Dcfs defines one or more 32-bits floats.
  94.  
  95. %dcfd
  96. Usage:          dcfd <FloatExpression> {,<FloatExpression>}*
  97. Summary:   Dcfd defines one or more 64-bits floats.
  98.  
  99. %dcfe
  100. Usage:          dcfe <FloatExpression> {,<FloatExpression>}*
  101. Summary:   Dcfe defines one or more 96-bits floats.
  102. Note:      Dcfe is not implemented!
  103.  
  104. %dcfp
  105. Usage:          dcfp <FloatExpression> {,<FloatExpression>}*
  106. Summary:   Dcfp defines one or more 96-bits packed decimal floats.
  107. Note:      Dcfp is not implemented!
  108.  
  109. %area
  110. Usage:          area <Identifier> {,Attributes}*
  111. Summary:   Area selects a new area for storage. If the identifier is new
  112.            then a new area will be defined with the selected attributes.
  113.            It is not necessary to give the attributes if an old area is
  114.            reselected. Currently implemented attributes are:
  115.            CODE      This area is for code, this is only for the linker.
  116.            DATA      This area is for data, this is only for the linker.
  117.            NOINIT    This area is for zero initsialized data. The assembler
  118.                      will check that this is true.
  119.            READONLY  This area is read only, this is only for the linker.
  120.  
  121. %CODE
  122. Usage:          area <Identifier> , CODE {,<Attributes>}*
  123. Summary:   This tells the linker that this area contains code.
  124.            Other attributes are DATA,NOINIT and READONLY.    
  125.  
  126. %DATA
  127. Usage:          area <Identifier> , DATA {,<Attributes>}*
  128. Summary:   This tells the linker that this area contains data.
  129.            Other attributes are CODE,NOINIT and READONLY.    
  130.  
  131. %NOINIT
  132. Usage:          area <Identifier> , NOINIT {,<Attributes>}*
  133. Summary:   This tells the linker that this area contains zero initsialized
  134.            data. The assembler will check that this is true.
  135.            Other attributes are CODE,DATA and READONLY.    
  136.  
  137. %READONLY
  138. Usage:          area <Identifier> , READONLY {,<Attributes>}*
  139. Summary:   This tells the linker that this area is read only.
  140.            Other attributes are CODE,DATA and NOINIT.
  141.     
  142.  
  143. %align
  144. Usage:          align <Expression>
  145. Summary:   Align moves the next item in the current area to an address which
  146.            is an even multiplier of the expression. Note that the linker
  147.            does not support bigger alignment than four.
  148. Note:      The pad bytes are NOT set to zero! No default value exist as in
  149.            Acorn's assembler and it is not possible to give an offset.
  150.  
  151. %%
  152. Usage:          % <Expression>
  153. Summary:   '%' reserves the given numbers of bytes in the current area.
  154. Note:      The bytes are NOT set to zero!
  155.  
  156. %entry
  157. Usage:          entry
  158. Summary:   This is the entry point for the finished program. 
  159.  
  160. %^
  161. Usage:          ^ <Expression>
  162. Summary:   '^' sets the storage counter used in '#' for laying out areas.
  163. Note:      It is not possible to create register relative addresses as in 
  164.            Acorn's assembler.
  165. %#
  166. Usage:     <Identifier> # <Expression>
  167. Summary:   '#' sets the identifier equal to the storage counter, and then
  168.            increments the counter with the expression. The expression must
  169.            be positive.
  170.  
  171. %{VAR}
  172. Usage:     Don't, use @ instead.
  173. Summary:   This is a synonym for @ in Acorn's assembler it is not availible
  174.            in this assembler.
  175.  
  176. %{PC}
  177. Usage:     Don't, use . instead.
  178. Summary:   This is a synonym for . in Acorn's assembler it is not availible
  179.            in this assembler.
  180.  
  181. %.
  182. E.g:       CurrentPosition *  .  ; Gets the current position in the current area
  183. Summary:   ',' returns the current position in the current area.
  184.  
  185. %@
  186. E.g:       FillArea   # 10-@     ; Makes the storage counter equal to 10,
  187.                                  ; or gives an error if it already is larger.
  188. Summary:   '@' returns the current value of the storage counter.
  189.  
  190. %globl
  191. Usage:          globl <Identifier>
  192. Summary:   Globl instructs the assembler, and the linker, to keep this symbol
  193.            in the object file. Globl is also used to introduce an identifier 
  194.            which is defined in another assembler file. The later usage is
  195.            not compulsary as the assembler treats all undefined identifier as
  196.            introduced by globl. This behaviour may however change.
  197. Note:      Globl will probably be removed in future versions, use export, if the
  198.            identifier is defined in this assembler file, and import if it is not.
  199.  
  200. %export
  201. Usage:          export <Identifier>
  202. Summary:   Export instructs the assembler, and the linker, to keep this symbol
  203.            in the object file.
  204.  
  205. %import
  206. Usage:          import <Identifier> {, WEAK }
  207. Summary:   Import is used to introduce an identifier which is defined in
  208.            another assembler file. It is not compulsary as the assembler
  209.            treats all undefined identifier as if they where imported. But
  210.            it is nice for people who read the code, and the assembler may
  211.            demand it in future versions.
  212.            The attribute WEAK makes the reference a weak symbol i.e., it's
  213.            not an error if the symbol isn't resolved during linking.
  214.  
  215. %Cond
  216. Usage:     Don't
  217. Summary:   This is only a short description of the condition codes.
  218.            All instructons can take a condition code. the condition code is
  219.            written directly after the mnemonic and before options, if it is
  220.            present, e.g.:
  221.              addeq         add  if equal.
  222.              orrgts        or if greater than, and update flags.
  223.              bcs           branch if carry set.
  224.              ldmneib       load multiple, with increment before, if not equal.
  225.            The instruction will be executed if the conition is true.
  226.            The possible conditions are:  and they are true if:
  227.                al     Always,            always.
  228.                nv     Never,             never, this condition code should not be used!
  229.                                          Use mov r0,r0 if a no-operation is needed.
  230.                eq     Equal,             Z is set.
  231.                ne     Not Equal,         Z is cleared.
  232.                vs     Overflow,          V is set.
  233.                vc     No overflow,       V is cleared.
  234.                mi     Minus,             N is set.
  235.                pl     Plus,              N is cleared.
  236.                cs     Carry set,         C is set.
  237.                cc     Carry clear,       C is cleared.
  238.                hi     Higher,            C is set and Z is cleared.
  239.                ls     Lower or same,     C is cleared or Z is set. 
  240.                ge     Greater or equal,  N is cleared and V is cleared,
  241.                                                or N is set and V is set.
  242.                lt     Less,              N is set and V is cleared,
  243.                                                or N is cleared and V is set.
  244.                gt     Greater,           'ge' is true and Z is cleared. 
  245.                le     Less or equal,     'lt' is true or Z is set. 
  246.                hs     Higher or same,    'cs' is true.
  247.                lo     Lower              'cc' is true.
  248.            If no condition is given then 'al' (Always) is assumed.
  249.  
  250. %ShiftOp
  251. Usage:     Don't
  252. Summary:   This is only a short description of the possible shift operations.
  253.            It is sometimes possible to shift the right operand in an instruction.
  254.            The shift amount is a 5 bit constant or, in some instructions, the
  255.            contents of the lowest byte in a register. E.g.:
  256.              r0,lsl #1     shift r0 left one step.
  257.              r2,ror r1     rotate r2 right the number of step given in lowest
  258.                            byte in r1.
  259.              r3,rrx        rotate r3, extended with the carry, right one step.
  260.            Possible shifts are:             Number of steps (if constant):
  261.                lsl  Logical   shift left      0 to 31
  262.                lsr  Logical   shift right     0 to 32
  263.                asl  Atitmetic shift left      0 to 32
  264.                asr  Aritmetic shift right     0 to 32
  265.                ror  Rotate rigth              0 to 31
  266.                rrx  Rotate right extended     Always 1 step.
  267.            For a description of how the shift is done see the shift
  268.            operation in question.
  269.  
  270. %lsl
  271. E.g.:           adds r1,r2,r3,lsl #2  ; r1 = r2+r3<<2 = r2+r3*4
  272. Summary:  Lsl shifts a register left inserting zeroes at the right end:
  273.              C<--bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb<--0
  274.           The last bit moved out from the register is inserted in the carry
  275.           if the main instruction does not affect the carry and the s-option
  276.           is given, e.g., the lsl in the example will not set the carry as add
  277.           sets the carry itself. The number of steps can be from 0 to 31
  278.           inclusive.
  279.           It is sometimes possible to shift by the context of a register:
  280.             adds r1,r2,r3,lsl r4
  281.           Only the eigth lowest bits in the register are used allowing shifts
  282.           of up to 255 steps.
  283. Note:     Lsl is identical to asl.
  284.  
  285. %lsr
  286. E.g.:           adds r1,r2,r3,lsr #2  ; r1 = r2+r3>>2 = r2+r3/4 (if r3 is unsigned)
  287. Summary:  Lsr shifts a register right inserting zeroes at the left end:
  288.              0-->bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb-->C
  289.           The last bit moved out from the register is inserted in the carry
  290.           if the main instruction does not affect the carry and the s-option
  291.           is given, e.g., the lsr in the example will not set the carry as add
  292.           sets the carry itself. The number of steps can be from 0 to 32
  293.           inclusive.
  294.           It is sometimes possible to shift by the context of a register:
  295.             adds r1,r2,r3,lsr r4
  296.           Only the eigth lowest bits in the register are used allowing shifts
  297.           of up to 255 steps.
  298.  
  299. %asl
  300. E.g.:           adds r1,r2,r3,lsl #2  ; r1 = r2+r3<<2 = r2+r3*4
  301. Summary:  Asl shifts a register left inserting zeroes at the right end:
  302.              C<--bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb<--0
  303.           The last bit moved out from the register is inserted in the carry
  304.           if the main instruction does not affect the carry and the s-option
  305.           is given, e.g., the asl in the example will not set the carry as add
  306.           sets the carry itself. The number of steps can be from 0 to 32
  307.           inclusive.
  308.           It is sometimes possible to shift by the context of a register:
  309.             adds r1,r2,r3,asl r4
  310.           Only the eigth lowest bits in the register are used allowing shifts
  311.           of up to 255 steps.
  312. Note:     Asl is identical to lsl.
  313.  
  314. %asr
  315. E.g.:           adds r1,r2,r3,asr #2  ; r1 = r2+r3>>>2
  316. Summary:  Asr shifts a register right inserting copies of the highest bit at
  317.           the left end, i.e., the n most significants bits becomes equal to
  318.           bit 31:
  319.              /--\
  320.              \->bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb--->C
  321.           The last bit moved out from the register is inserted in the carry
  322.           if the main instruction does not affect the carry and the s-option
  323.           is given, e.g., the asr in the example will not set the carry as add
  324.           sets the carry itself. The number of steps can be from 0 to 32
  325.           inclusive.
  326.           It is sometimes possible to shift by the context of a register:
  327.             adds r1,r2,r3,asr r4
  328.           Only the eigth lowest bits in the register are used allowing shifts
  329.           of up to 255 steps.
  330.  
  331. %ror
  332. E.g.:           adds r1,r2,r3,ror #2
  333. Summary:  Ror rotates the register right:
  334.              /-----------------------------------\
  335.              \->bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb--->C
  336.           The last bit moved out from the register is inserted in the carry
  337.           if the main instruction does not affect the carry andthe s-option
  338.           is given, e.g., the ror in the example will not set the carry as add
  339.           sets the carry itself. The number of steps can be from 0 to 31
  340.           inclusive.
  341.           It is sometimes possible to rotate by the context of a register:
  342.             adds r1,r2,r3,ror r4
  343.           Only the eigth lowest bits in the register are used allowing
  344.           rotates of up to 255 steps.
  345.  
  346. %rrx
  347. E.g.:           adds r1,r2,r3,rrx
  348. Summary:  Rr rotates the register extended by the carry one step right:
  349.              /-----------------------------------------\
  350.              \->bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb--->C--/
  351.           The lowest bit is inserted in the carry if the main instruction
  352.           does not affect the carry and the s-option is given, e.g.,
  353.           the rrx in the example will not set the carry as add sets the
  354.           carry itself.
  355.  
  356. %Core3Op
  357. Usage:     Don't
  358. Summary:   This is only a short description of some cpu instructions.
  359. Syntax:    <Core3Op><Cond><Sflag> <Dst>,<Lhs>,<Rhs>
  360.            where
  361.            <Core3Op> is one of:                    which can update the following flags:
  362.                add     <Dst> = <Lhs> +  <Rhs>          NCVZ
  363.                adc     <Dst> = <Lhs> +  <Rhs> +  C     NCVZ
  364.                sub     <Dst> = <Lhs> -  <Rhs>          NCVZ
  365.                sbc     <Dst> = <Lhs> -  <Rhs> - ~C     NCVZ
  366.                rsb     <Dst> = <Rhs> -  <Lhs>          NCVZ
  367.                rsc     <Dst> = <Rhs> -  <Lhs> - ~C     NCVZ
  368.                eor     <Dst> = <Lhs> ^  <Rhs>          NZ   and <Rhs> can update C
  369.                orr     <Dst> = <Lhs> |  <Rhs>          NZ   and <Rhs> can update C
  370.                and     <Dst> = <Lhs> &  <Rhs>          NZ   and <Rhs> can update C
  371.                bic     <Dst> = <Lhs> & ~<Rhs>          NZ   and <Rhs> can update C
  372.            <Cond>  see Cond.
  373.            <Sflag> is one of:
  374.                s               Flags are updated according to the result.
  375.                        (empty) No flag is updated.
  376.            <Dst> and <Lhs> are registers, (identifiers defined with 'rn').
  377.            <Rhs> is one of:
  378.                #<Expression>   An integer which is possible to express as an 8 bit value
  379.                                rotated an even numbers of bits. The assembler will change
  380.                                the mnemonic, if necessary, to achieve this. Mnemonics that
  381.                                are changed are add/sub, adc/sbc and and/bic.
  382.                Register
  383.                Register,rrx                       see rrx
  384.                Register,<ShiftOp> #<Expression>   see ShiftOp
  385.                Register,<ShiftOp> Register        see ShiftOp
  386.  
  387.  
  388. %CoreCmp   
  389. Usage:     Don't
  390. Summary:   This is only a short description of some cpu instructions.
  391. Syntax:    <CoreCmp><Cond><Sflag><Pflag> <Lhs>,<Rhs>
  392.            where
  393.            <CoreCmp> is one of:              which updates the following flags:
  394.                cmp     <Lhs> - <Rhs>                   NCVZ 
  395.                cmn     <Lhs> + <Rhs>                   NCVZ 
  396.                tst     <Lhs> & <Rhs>                   NZ   and <Rhs> can update C
  397.                teq     <Lhs> ^ <Rhs>                   NZ   and <Rhs> can update C
  398.            <Cond>  see Cond.
  399.            <Sflag> is not used, flags are always uppdated according to the result.
  400.                An 's' can be given but it is ignored.
  401.            <Pflag> is one of:
  402.                p               The result of the operation is moved to the
  403.                                PSR, i.e., the NCVZ flags are set from the top
  404.                                four bits of the result. In modes other than
  405.                                the user mode the NCVZIF flags are set from
  406.                                the top six bits and the mode bits are set
  407.                                from the two lowest bits. 
  408.                        (empty) The flags are updated according to the result of
  409.                                the operation
  410.  
  411.            <Dst> and <Lhs> are registers, (identifiers defined with 'rn').
  412.            <Rhs> is one of:
  413.                #<Expression>   An integer which is possible to express as an 8 bit value
  414.                                rotated an even numbers of bits. The assembler will change
  415.                                the mnemonic, if necessary, to achieve this. Mnemonics that
  416.                                are changed are cmp/cmn.
  417.                Register
  418.                Register,rrx                       see rrx
  419.                Register,<ShiftOp> #<Expression>   see ShiftOp
  420.                Register,<ShiftOp> Register        see ShiftOp
  421.  
  422. %add
  423. E.g.:           add r0,r1,r2
  424. Summary:   Add.
  425. See:       Core3Op
  426.  
  427. %adc
  428. E.g.:           adc r0,r1,r2
  429. Summary:   Add with carry.
  430. See:       Core3Op
  431.  
  432. %syb
  433. E.g.:           sub r0,r1,r2
  434. Summary:   Subtract.
  435. See:       Core3Op
  436.  
  437. %sbc
  438. E.g.:           sbc r0,r1,r2
  439. Summary:   Subtract with carry.
  440. See:       Core3Op
  441.  
  442. %rsb
  443. E.g.:           rsb r0,r1,r2
  444. Summary:   Reverse subtract.
  445. See:       Core3Op
  446.  
  447. %rsc
  448. E.g.:           rsc r0,r1,r2
  449. Summary:   Reverse subtract with carry.
  450. See:       Core3Op
  451.  
  452. %eor
  453. E.g.:           eor r0,r1,r2
  454. Summary:   Bitwise exclusive or.
  455. See:       Core3Op
  456.  
  457. %orr
  458. E.g.:           orr r0,r1,r2
  459. Summary:   Bitwise or. Acorn choosed this spelling!
  460. See:       Core3Op
  461.  
  462. %and
  463. E.g.:           and r0,r1,r2
  464. Summary:   Bitwise and.
  465. See:       Core3Op
  466.  
  467. %bic
  468. E.g.:           bic r0,r1,r2
  469. Summary:   Bit clear, this is an and where the right operand is inverted.
  470. See:       Core3Op
  471.  
  472. %mvn
  473. E.g.:           mvn r0,r1
  474. Summary:   Move not, i.e., the source operand is inverted.
  475. Syntax:    mvn<Cond><Sflag> <Dst>,<Rhs>
  476.            Mvn updates the N and Z flags if the Sflag is given, <Rhs> can
  477.            update the carry.
  478.            <Cond>  see Cond.
  479.            <Sflag> is one of:
  480.                s               Flags are updated according to the result.
  481.                        (empty) No flag is updated.
  482.            <Dst> is a register, (identifiers defined with 'rn').
  483.            <Rhs> is one of:
  484.                #<Expression>   An integer which is possible to express as an 8 bit value
  485.                                rotated an even numbers of bits. The assembler will change
  486.                                the mnemonic, if necessary, to a mov to achieve this.
  487.                Register
  488.                Register,rrx                       see rrx
  489.                Register,<ShiftOp> #<Expression>   see ShiftOp
  490.                Register,<ShiftOp> Register        see ShiftOp
  491.  
  492.  
  493. %mov
  494. E.g.:           mov r0,r1
  495. Summary:   Move, can also be used for shifts (,if you can not integrate the
  496.            shift in another instruction):
  497.             mov r0,r1,lsl #2
  498. Syntax:    mov<Cond><Sflag> <Dst>,<Rhs>
  499.            Mov updates the N and Z flags if the Sflag is given, <Rhs> can
  500.            update the carry.
  501.            <Cond>  see Cond.
  502.            <Sflag> is one of:
  503.                s               Flags are updated according to the result.
  504.                        (empty) No flag is updated.
  505.            <Dst> is a register, (identifiers defined with 'rn').
  506.            <Rhs> is one of:
  507.                #<Expression>   An integer which is possible to express as an 8 bit value
  508.                                rotated an even numbers of bits. The assembler will change
  509.                                the mnemonic, if necessary, to a mvn to achieve this.
  510.                Register
  511.                Register,rrx                       see rrx
  512.                Register,<ShiftOp> #<Expression>   see ShiftOp
  513.                Register,<ShiftOp> Register        see ShiftOp
  514.  
  515. %tst
  516. E.g.:           tst r0,r1
  517. Summary:   Test, a bitwise and where the result isn't saved.
  518. See:       CoreCmp
  519.  
  520. %teq
  521. E.g.:           teq r0,r1
  522. Summary:   Test if equal, a bitwise exclusive or where the result isn't
  523.            saved.
  524. See:       CoreCmp
  525.  
  526. %cmp
  527. E.g.:           cmp r0,r1
  528. Summary:   Compare, a subtraction where the result isn't saved.
  529. See:       CoreCmp
  530.  
  531. %cmn
  532. E.g.:           cmn r0,r1
  533. Summary:   Compare negated, i.e., the second operand is negated before
  534.            comparasion. Cmn is an addition where the result isn't saved.
  535. See:       CoreCmp
  536.  
  537. %mul
  538. E.g.:           mul r0,r1,r2
  539. Summary:   Integer multiplication. The destination and the left operand
  540.            must be different, the assembler will change the order of the
  541.            operands to achieve this.
  542. Syntax:    mul<Cond><Sflag> <Dst>,<Lhs>,<Rhs>
  543.            <Cond>  see Cond.
  544.            <Sflag> is one of:
  545.                s               The NZ flags are updated according to the result,
  546.                                and the carry is undefined.
  547.                        (empty) No flag is updated.
  548.            <Dst>,<Lhs> and <Rhs> are registers, (identifiers defined with 'rn').
  549.  
  550. %mla
  551. E.g.:           mla r0,r1,r2,r4   ; r0 = r1*r2+r4
  552. Summary:   Integer multiplication with accumulator. The destination and the
  553.            left operand of the multiplication must be different, the
  554.            assembler will change the order of the operands to achieve this.
  555. Syntax:    mla<Cond><Sflag> <Dst>,<Lhs>,<Rhs>,Acc
  556.            <Cond>  see Cond.
  557.            <Sflag> is one of:
  558.                s               The NZ flags are updated according to the result,
  559.                                and the carry is undefined.
  560.                        (empty) No flag is updated.
  561.            <Dst>,<Lhs>,<Rhs> and <Acc> are registers, (identifiers defined with 'rn').
  562.  
  563. %b
  564. E.g.:           beq label10
  565. Summary:   This is the branch instruction.
  566. Syntax:    b<Cond>  <Destination>
  567.            b<Cond> #<Expression>
  568.            <Cond>  see Cond.
  569.            <Destination>
  570.              The assembler will calculate the offset to the destination and take
  571.              care of prefetch if no '#' is given.
  572.            <Expression>
  573.              The expression is treated as the byte offset that should be added
  574.              to the pc. Only even multiples of four are allowed.
  575.            Undefined identifiers are allowed in both forms.
  576.  
  577. %bl
  578. E.g.:           bl label10
  579. Summary:   This is the branch with link instruction. The address of the next
  580.            instruction is saved in cpu register 14, and the execution continues
  581.            at the given destiniation.
  582. Syntax:    bl<Cond>  <Destination>
  583.            bl<Cond> #<Expression>
  584.            <Cond>  see Cond.
  585.            <Destination>
  586.              The assembler will calculate the offset to the destination and take
  587.              care of prefetch if no '#' is given.
  588.            <Expression>
  589.              The expression is treated as the byte offset that should be added
  590.              to the pc. Only even multiples of four are allowed.
  591.            Undefined identifiers are allowed in both forms.
  592.  
  593. %swi
  594. E.g.:           swi 256+'a'
  595. Summary:   Software interrupt. The address of the next instruction is saved in
  596.            cpu register svc-14, and the execution continues at 0x00000008 with
  597.            the I flag set and the svc mode selected. This instruction is used
  598.            for system calls.
  599. Syntax:    swi<Cond> <Expression>
  600.            <Cond>  see Cond.
  601.            the expression can be any 24-bit integer.
  602.  
  603. %swp
  604. E.g.:           swpb r0,r1,[r2]
  605. Summary:   Swap is used to implement looks on multi processor computers.
  606. Syntax:    swp<Cond><Bflag> <Dst>,<Src>,[<Addr>]
  607.            <Cond>  see Cond.
  608.            <Bflag>
  609.                b               This is a byte operation. The value is zero extended.
  610.                        (empty) This is a 32-bits operation.
  611.            <Dst>,<Src> and <Addr> are registers, (identifiers defined with 'rn').
  612.            The semantic is: 
  613.              mov                  <temp>,<Src>
  614.              ldr<Cond><Bflag>     <Dst>, [<Addr>]
  615.              str<Cond><Bflag>     <temp>,[<Addr>]
  616.            with a lock signal set on the buss so that other cpus can detect that an
  617.            atomic operation is under progress.
  618. Note:      Not availible on ARM2.
  619.  
  620. %adr:
  621. E.g.:           adr r0,CloseLabel
  622. Summary:   This is a syntesized instruction which is used to put the address of a
  623.            label into a register. The assembler generates either:
  624.              add r0,pc,#Offset
  625.            or
  626.              sub r0,pc,#Offset
  627.            depending on the relative position of the instruction and the label.
  628. Syntax:    add<Cond> <Dst>,<Position>
  629.            <Cond>  see Cond.
  630.            <Position> is a label in the same area as the instruction. The range
  631.            is limited to the positions that can be generated by adding/subtracting
  632.            an 8-bits value rotated by an even number of steps to/from the pc.
  633.  
  634. %ldm:
  635. E.g.:           ldm sp!,{r0-r4,pc}
  636. Summary:   This instruction loads multiple registers. It is normaly used to pop
  637.            from stacks, but is also useful for copying memory.
  638. Syntax:    ldm<Cond><Direction>   <Addr><!flag>,<RegisterList><^flag>
  639.            <Cond>  see Cond.
  640.            <Direction> is one of:
  641.              ib   increment <Addr>, before first load.
  642.              ia   increment <Addr>, after first load.
  643.              db   decrement <Addr>, before first load.
  644.              da   decrement <Addr>, after first load.
  645.              fd   use a  full  descending stack, same as ia.
  646.              ed   use an empty descending stack, same as ib.
  647.              fa   use a  full  ascending  stack, same as da.
  648.              ea   use an empty ascending  stack, same as db.
  649.            <Addr> is a register, (identifiers defined with 'rn').
  650.            <!flag>
  651.                !               <Addr> = <Addr> + 4*number of registers, if increment,
  652.                                       = <Addr> - 4*number of registers, if decrement.
  653.                        (empty) Do not change <Addr>
  654.            <RegisterList> is a comma separated list of registers inside braces or a '#'
  655.                           followed by a 16-bits integer expression.
  656.            <^flag>
  657.                    ^      If pc is loaded then the CZNV will be updated. If the cpu is in
  658.                           a non-user mode then the CZNVIF and the mode bits will be updated.
  659.                           If a non-user mode is selected and the pc is not loaded then the '^'
  660.                           means that it is the user registers that are loaded.
  661.                   (empty) Only the address part of the pc is updated.
  662.  
  663. %stm:
  664. E.g.:           stm sp!,{r0-r4,pc}
  665. Summary:   This instruction stores multiple registers. It is normaly used to push
  666.            on stacks, but is also useful for copying memory.
  667. Syntax:    stm<Cond><Direction>   <Addr><!flag>,<RegisterList><^flag>
  668.            <Cond>  see Cond.
  669.            <Direction> is one of:
  670.              ib   increment <Addr>, before first store.
  671.              ia   increment <Addr>, after first store.
  672.              db   decrement <Addr>, before first store.
  673.              da   decrement <Addr>, after first store.
  674.              fd   use a  full  descending stack, same as db.
  675.              ed   use an empty descending stack, same as da.
  676.              fa   use a  full  ascending  stack, same as ib.
  677.              ea   use an empty ascending  stack, same as ia.
  678.            <Addr> is a register, (identifiers defined with 'rn').
  679.            <!flag>
  680.                !               <Addr> = <Addr> + 4*number of registers, if increment,
  681.                                       = <Addr> - 4*number of registers, if decrement.
  682.                        (empty) Do not change <Addr>
  683.            <RegisterList> is a comma separated list of registers inside braces or a '#'
  684.                           followed by a 16-bits integer expression.
  685.            <^flag>
  686.                    ^      No meaning in user mode, but in non-user mode means that it is
  687.                           the user registers that are stored.
  688.                   (empty) Use the current modes register.
  689.  
  690. %ldr
  691. E.g.:           ldr r0,[r1,r2,lsl #2]   ; Loads the r2'th word from the table at r1 into r0.
  692. Summary:   The load instruction has many possibilities so the following
  693.            description might be a bit complicated.
  694. Syntax:    ldr<Cond><Bflag><Tflag>  <Dst>,<Address><!flag>
  695.            <Cond>  see Cond.
  696.            <Bflag>
  697.                b               This is a byte operation. The value is zero extended.
  698.                        (empty) This is a 32-bits operation, the value read is rotated so
  699.                                that the byte pointed at ends up in the low byte of <Dst>.
  700.            <Tflag>
  701.                t               Make a user mode bus cycle even if in a non-user mode.
  702.                                This flag is only allowed if the address is a post
  703.                                inc/decrement.
  704.                        (empty) Use the bus cycle for the current mode.
  705.            <Dst> is a register, (identifiers defined with 'rn').
  706.            <Address>
  707.              The <Tflag> is allowed in 1 to 5 but not in the others.
  708.              The <!flag> is allowed in 6 to 9 but not in the others.
  709.              10 and 11 is syntetic sugare for pc relative addressing. 
  710.               1 [ <Addr> ]      
  711.                                     indirect register. 
  712.               2 [ <Addr> ],#<Offset>
  713.                                     indirect register with immediate post inc/decrement. 
  714.               3 [ <Addr> ],<+/-> <RegOffset>
  715.               4 [ <Addr> ],<+/-> <RegOffset>, rrx
  716.               5 [ <Addr> ],<+/-> <RegOffset>,<ShiftOp> #<Expression>
  717.                                     indirect register with register post inc/decrement. 
  718.               6 [ <Addr>,#<Offset> ]
  719.                                     indirect register with immediate pre inc/decrement. 
  720.               7 [ <Addr>,<+/-> <RegOffset> ]
  721.               8 [ <Addr>,<+/-> <RegOffset>, rrx ]
  722.               9 [ <Addr>,<+/-> <regOffset>, <ShiftOp> #<Expression> ]
  723.                                     indirect register with register pre inc/decrement.
  724.              10 <Expr>
  725.                                     Translated into [pc,#<Offset>] where <Expr> = pc+<Offset>
  726.                                     compensated for prefetching.
  727.              11 =<Expr>
  728.                                     Translated into a [pc,#<Offset>] pointing at a word in a
  729.                                     literal area  (see ltorg) containing <Expr>. The assembler
  730.                                     tries to share constants if possible.
  731.            <Addr> and <RegOffset> are registers, (identifiers defined with 'rn').
  732.            <+/-> a plus or minus sign, or nothing which means plus.
  733.            <Offset>                 is an expression which value fits in a 12-bit constant
  734.                                     with a sign bit ,-4095 to +4095 inclusive.
  735.            rrx             see rrx.
  736.            <ShiftOp>       see ShiftOp.
  737.            <!flag>
  738.                !               <Addr> = <Addr> <+/-> Offset
  739.                                This flag is only allowed if the address is a pre
  740.                                inc/decrement. The <Addr> register is always updated
  741.                                if the <Address> is a post inc/decrement.
  742.                        (empty) Do not update the <Addr> register unless the <Address>
  743.                                is a post inc/decrement.
  744.  
  745. %str
  746. E.g.:           str r0,[r1,r2,lsl #2]   ; Store r0 at the r2'th word in the table at r1.
  747. Summary:   The store instruction has many possibilities so the following
  748.            description might be a bit complicated.
  749. Syntax:    str<Cond><Bflag><Tflag>  <Src>,<Address><!flag>
  750.            <Cond>  see Cond.
  751.            <Bflag>
  752.                b               This is a byte operation. The top 24-bits in <Src> are 
  753.                                ignored.
  754.                        (empty) This is a 32-bits operation, the two lowes bits of the
  755.                                address are ignored.
  756.            <Tflag>
  757.                t               Make a user mode bus cycle even if in a non-user mode.
  758.                                This flag is only allowed if the address is a post
  759.                                inc/decrement.
  760.                        (empty) Use the bus cycle for the current mode.
  761.            <Src> is a register, (identifiers defined with 'rn').
  762.            <Address>
  763.              The <Tflag> is allowed in 1 to 5 but not in the others.
  764.              The <!flag> is allowed in 6 to 9 but not in the others.
  765.              10 is syntetic sugare for pc relative addressing. 
  766.               1 [ <Addr> ]      
  767.                                     indirect register. 
  768.               2 [ <Addr> ],#<Offset>
  769.                                     indirect register with immediate post inc/decrement. 
  770.               3 [ <Addr> ],<+/-> <RegOffset>
  771.               4 [ <Addr> ],<+/-> <RegOffset>, rrx
  772.               5 [ <Addr> ],<+/-> <RegOffset>,<ShiftOp> #<Expression>
  773.                                     indirect register with register post inc/decrement. 
  774.               6 [ <Addr>,#<Offset> ]
  775.                                     indirect register with immediate pre inc/decrement. 
  776.               7 [ <Addr>,<+/-> <RegOffset> ]
  777.               8 [ <Addr>,<+/-> <RegOffset>, rrx ]
  778.               9 [ <Addr>,<+/-> <regOffset>, <ShiftOp> #<Expression> ]
  779.                                     indirect register with register pre inc/decrement.
  780.              10 <Expr>
  781.                                     Translated into [pc,#<Offset>] where <Expr> = pc+<Offset>
  782.                                     compensated for prefetching.
  783.            <Addr> and <RegOffset> are a registers, (identifiers defined with 'rn').
  784.            <+/-> a plus or minus sign, or nothing which means plus.
  785.            <Offset>                 is an expression which value fits in a 12-bit constant
  786.                                     with a sign bit ,-4095 to +4095 inclusive.
  787.            rrx         see rrx.
  788.            <ShiftOp>   see ShiftOp.
  789.            <!flag>
  790.                !               <Addr> = <Addr> <+/-> Offset
  791.                                This flag is only allowed if the address is a pre
  792.                                inc/decrement. The <Addr> register is always updated
  793.                                if the <Address> is a post inc/decrement.
  794.                        (empty) Do not update the <Addr> register unless the <Address>
  795.                                is a post inc/decrement.
  796.  
  797. %Float3Op
  798. Usage:     Don't
  799. Summary:   This is only a short description of some fpu instructions.
  800. Syntax:    <Float3Op><Cond><Prec><Round> <Dst>,<Lhs>,<Rhs>
  801.            where
  802.            <Float3Op> is one of:
  803.                adf     <Dst> = <Lhs>  +  <Rhs>
  804.                suf     <Dst> = <Lhs>  -  <Rhs>
  805.                rsf     <Dst> = <Rhs>  -  <Lhs>
  806.                muf     <Dst> = <Lhs>  *  <Rhs>
  807.                dvf     <Dst> = <Lhs>  /  <Rhs>
  808.                rdf     <Dst> = <Rhs>  /  <Lhs>
  809.                pow     <Dst> = <Lhs> **  <Rhs>
  810.                rpw     <Dst> = <Rhs> **  <Lhs>
  811.                rmf     <Dst> = <Lhs> mod <Rhs>
  812.                fml     <Dst> = <Lhs>  *  <Rhs>       fast multiplication
  813.                fdv     <Dst> = <Lhs>  /  <Rhs>       fast division
  814.                frd     <Dst> = <Rhs>  /  <Lhs>       fast reverse division
  815.                pol     <Dst> = arctan(<Lhs> / <Rhs>)
  816.            <Cond>  see Cond.
  817.            <Prec> is one of:
  818.                s               Single   precision (32-bit float).
  819.                d               Double   precision (64-bit float).
  820.                e               Extended precision (96-bit float).
  821.            <Round> is one of:
  822.                p               Round to plus infinity.
  823.                m               Round to minus infinity.
  824.                z               Round to zero.
  825.                       (empty)  Round to nearest.
  826.            <Dst> and <Lhs> are fpu registers, (identifiers defined with 'fn').
  827.            <Rhs> is one of:
  828.                #<FloatExpression>   Must evaluate to one of 0.0 1.0 2.0 3.0 4.0 5.0 10.0 or 0.5
  829.                <FpuRegister>        Identifier defined with 'fn'.
  830.  
  831. %Float2Op
  832. Usage:     Don't
  833. Summary:   This is only a short description of some fpu instructions.
  834. Syntax:    <Float2Op><Cond><Prec><Round> <Dst>,<Rhs>
  835.            where
  836.            <Float2Op> is one of:
  837.                mvf     <Dst> =     <Rhs>
  838.                mnf     <Dst> =    - <Rhs>
  839.                abs     <Dst> = abs( <Rhs>)
  840.                rnd     <Dst> = rnd( <Rhs>)     <Rhs> is rounded to an integer.
  841.                sqt     <Dst> = sqr( <Rhs>)     Square root
  842.                log     <Dst> = log( <Rhs>)     Log base 10.
  843.                lgn     <Dst> = lgn( <Rhs>)     Log base e.
  844.                exp     <Dst> = e ** <Rhs>
  845.                sin     <Dst> = sin( <Rhs>)
  846.                cos     <Dst> = cos( <Rhs>)
  847.                tan     <Dst> = tan( <Rhs>)
  848.                asn     <Dst> = asn( <Rhs>)
  849.                acs     <Dst> = acs( <Rhs>)
  850.                atn     <Dst> = atn( <Rhs>)
  851.            <Cond>  see Cond.
  852.            <Prec> is one of:
  853.                s               Single   precision (32-bit float).
  854.                d               Double   precision (64-bit float).
  855.                e               Extended precision (96-bit float).
  856.            <Round> is one of:
  857.                p               Round to plus infinity.
  858.                m               Round to minus infinity.
  859.                z               Round to zero.
  860.                       (empty)  Round to nearest.
  861.            <Dst> is a fpu register, (identifiers defined with 'fn').
  862.            <Rhs> is one of:
  863.                #<FloatExpression>   Must evaluate to one of 0.0 1.0 2.0 3.0 4.0 5.0 10.0 or 0.5
  864.                <FpuRegister>        Identifier defined with 'fn'.
  865.  
  866. %adf
  867. E.g.:           adfs f0,f1,f2
  868. Summary:   Floating point addition.
  869. See:       Float3Op
  870.  
  871. %suf
  872. E.g.:           sufs f0,f1,f2
  873. Summary:   Floating point subtraction.
  874. See:       Float3Op
  875.  
  876. %rsf
  877. E.g.:           rsfs f0,f1,#10.0
  878. Summary:   Reverse floating point subtraction.
  879. See:       Float3Op
  880.  
  881. %muf
  882. E.g.:           mufs f0,f1,f2
  883. Summary:   Floating point multiplication.
  884. See:       Float3Op
  885.  
  886. %dvf
  887. E.g.:           dvfs f0,f1,f2
  888. Summary:   Floating point division.
  889. See:       Float3Op
  890.  
  891. %rdf
  892. E.g.:           rdfs f0,f1,#1.0
  893. Summary:   Reverse floating point division.
  894. See:       Float3Op
  895.  
  896. %pow
  897. E.g.:           pows f0,f1,f2
  898. Summary:   Floating point power operation.
  899. See:       Float3Op
  900.  
  901. %rpw
  902. E.g.:           rpws f0,f1,#10.0
  903. Summary:   Raise a float point constant to the power of a floating point
  904.            register.
  905. See:       Float3Op
  906.  
  907. %rmf
  908. E.g.:           rmfs f0,f1,f2
  909. Summary:   Floating point reminder.
  910. See:       Float3Op
  911.  
  912. %fml
  913. E.g.:           fmls f0,f1,f2
  914. Summary:   Fast floating point multiplication.
  915. See:       Float3Op
  916.  
  917. %fdv
  918. E.g.:           fdvs f0,f1,f2
  919. Summary:   Fast floating point division.
  920. See:       Float3Op
  921.  
  922. %frd
  923. E.g.:           frds f0,f1,#1.0
  924. Summary:   Fast reverse floating point division.
  925. See:       Float3Op
  926.  
  927. %pol
  928. E.g.:           pols f0,f1,f2
  929. Summary:   Float cartesian coordinate to angle.
  930. See:       Float3Op
  931.  
  932. %mvf
  933. E.g.:           mvfs f0,#1.0
  934. Summary:   Floating point move.
  935. See:       Float2Op
  936.  
  937. %mnf
  938. E.g.:           mnfs f0,#1.0
  939. Summary:   Floating point negated move, i.e., the second operand is negated.
  940. See:       Float2Op
  941.  
  942. %abs
  943. E.g.:           abss f0,#1.0
  944. Summary:   Floating point absolute value.
  945. See:       Float2Op
  946.  
  947. %rnd
  948. E.g.:           rnds f0,#1.0
  949. Summary:   Round floating value to integer, result in a floating point
  950.            register. Use fix if the integer should be in a cpu register.
  951. See:       Float2Op fix
  952.  
  953. %sqt
  954. E.g.:           sqts f0,#1.0
  955. Summary:   Floating point square root.
  956. See:       Float2Op
  957.  
  958. %log
  959. E.g.:           logs f0,#1.0
  960. Summary:   Floating point log base 10.
  961. See:       Float2Op
  962.  
  963. %lgn
  964. E.g.:           lgns f0,#1.0
  965. Summary:   Floating point log base e.
  966. See:       Float2Op
  967.  
  968. %exp
  969. E.g.:           exps f0,#1.0
  970. Summary:   E raised to the power of a floating point register, or floating
  971.            point constant.
  972. See:       Float2Op
  973.  
  974. %sin
  975. E.g.:           sins f0,#1.0
  976. Summary:   Floating point sine.
  977. See:       Float2Op
  978.  
  979. %cos
  980. E.g.:           coss f0,#1.0
  981. Summary:   Floating point cosine.
  982. See:       Float2Op
  983.  
  984. %tan
  985. E.g.:           tans f0,#1.0
  986. Summary:   Floating point tangent.
  987. See:       Float2Op
  988.  
  989. %asn
  990. E.g.:           asns f0,#1.0
  991. Summary:   Inverse floating point sine.
  992. See:       Float2Op
  993.  
  994. %acs
  995. E.g.:           acss f0,#1.0
  996. Summary:   Inverse floating point cosine.
  997. See:       Float2Op
  998.  
  999. %atn
  1000. E.g.:           atns f0,#1.0
  1001. Summary:   Inverse floating point tangent.
  1002. See:       Float2Op
  1003.  
  1004. %FloatCmp
  1005. Usage:     Don't
  1006. Summary:   This is only a short description of some fpu instructions.
  1007. Note:      I'm not sure that this is correct! This is how the assembler
  1008.            treats the instructions, but it is possible that a precision
  1009.            is needed. 
  1010. Syntax:    <FloatCmp><Cond><Prec><Round> <Lhs>,<Rhs>
  1011.            where
  1012.            <FloatCmp> is one of:
  1013.                cmf     <Lhs> - <Rhs>
  1014.                cmfe    <Lhs> - <Rhs>  Generates an exception if unorded.
  1015.                cnf     <Lhs> + <Rhs>
  1016.                cnfe    <Lhs> + <Rhs>  Generates an exception if unorded.
  1017.            <Cond>  see Cond.
  1018.            <Lhs> is a fpu register, (identifiers defined with 'fn').
  1019.            <Rhs> is one of:
  1020.                #<FloatExpression>   Must evaluate to one of 0.0 1.0 2.0 3.0 4.0 5.0 10.0 or 0.5
  1021.                <FpuRegister>        Identifier defined with 'fn'.
  1022.  
  1023. %cmf
  1024. E.g.:           cmf f0,#1.0
  1025. Summary:   Floating point compare.
  1026. See:       FloatCmp cmfe
  1027.  
  1028. %cmfe
  1029. E.g.:           cmfe f0,#1.0
  1030. Summary:   Floating point compare. Cmfe raises an exception if the operands are
  1031.            unorded.
  1032. See:       FloatCmp cmf
  1033.  
  1034. %cnf
  1035. E.g.:           cnf f0,#1.0
  1036. Summary:   Floating point negated compare, i.e., the second operand is negated.
  1037. See:       FloatCmp cnfe
  1038.  
  1039. %cnfe
  1040. E.g.:           cnfe f0,#1.0
  1041. Summary:   Floating point negated compare, i.e., the second operand is
  1042.            negated. Cnfe raises an exception if the operands are unorded.
  1043. See:       FloatCmp cnf
  1044.  
  1045. %fix
  1046. E.g.:           fixsz r0,f0
  1047. Summary:   Fix rounds a floating points value to an integer and stores
  1048.            the result in a cpu register. Use rnd if the result should be
  1049.            stored in a floating point number.
  1050. Syntax:    fix<Cond><Prec><Round> <Dst>,<Rhs>
  1051.            <Cond>  see Cond.
  1052.            <Prec> is one of:
  1053.                s               Single   precision (32-bit float).
  1054.                d               Double   precision (64-bit float).
  1055.                e               Extended precision (96-bit float).
  1056.            <Round> is one of:
  1057.                p               Round to plus infinity.
  1058.                m               Round to minus infinity.
  1059.                z               Round to zero.
  1060.                       (empty)  Round to nearest.
  1061.            <Dst> is a cpu register, (identifiers defined with 'rn').
  1062.            <Rhs> is one of:
  1063.                #<FloatExpression>   Must evaluate to one of 0.0 1.0 2.0 3.0
  1064.                                     4.0 5.0 10.0 or 0.5
  1065.                <FpuRegister>        Identifier defined with 'fn'.
  1066.  
  1067. %flt
  1068. E.g.:           fltsz f0,r0
  1069. Summary:   Flt converts an integer in a cpu register to a float and stores
  1070.            the result in a fpu register.
  1071. Syntax:    flt<Cond><Prec><Round> <Dst>,<Rhs>
  1072.            <Cond>  see Cond.
  1073.            <Prec> is one of:
  1074.                s               Single   precision (32-bit float).
  1075.                d               Double   precision (64-bit float).
  1076.                e               Extended precision (96-bit float).
  1077.            <Round> is one of:
  1078.                p               Round to plus infinity.
  1079.                m               Round to minus infinity.
  1080.                z               Round to zero.
  1081.                       (empty)  Round to nearest.
  1082.            <Dst> is a fpu register, (identifiers defined with 'fn').
  1083.            <Rhs> is a cpu register, (identifiers defined with 'rn').
  1084.  
  1085. %rfs
  1086. E.g.:           rfs r0
  1087. Summary:   Rfs copies the fpu's status register into a cpu register. The
  1088.            status register contains the following flags:
  1089.              bit  0:  IVO invalid operation.
  1090.              bit  1:  DVZ divide by zero.
  1091.              bit  2:  OFL overflow.
  1092.              bit  3:  UFL underflow.
  1093.              bit  4:  INX inexact
  1094.              bit  5 to bit 15 Unused, read as zero.
  1095.              bit 16:  IVO mask, set means interrupt enabled.
  1096.              bit 17:  DVZ mask, set means interrupt enabled.
  1097.              bit 18:  OFL mask, set means interrupt enabled.
  1098.              bit 19:  UFL mask, set means interrupt enabled.
  1099.              bit 20 to bit 23 Unused, read as zero.
  1100.              bit 24 to bit 31 System id, where bit 31 set means floating point
  1101.                               hardware, read only. 
  1102. Syntax:    rfs<Cond> <Dst>
  1103.            <Cond>  see Cond.
  1104.            <Dst> is a cpu register, (identifiers defined with 'rn').
  1105.  
  1106. %wfs
  1107. E.g.:           wfs r0
  1108. Summary:   Wfs updates the fpu's status register with the value of a cpu
  1109.            register. The status register contains the following flags:
  1110.              bit  0:  IVO invalid operation.
  1111.              bit  1:  DVZ divide by zero.
  1112.              bit  2:  OFL overflow.
  1113.              bit  3:  UFL underflow.
  1114.              bit  4:  INX inexact
  1115.              bit  5 to bit 15 Unused, read as zero.
  1116.              bit 16:  IVO mask, set means interrupt enabled.
  1117.              bit 17:  DVZ mask, set means interrupt enabled.
  1118.              bit 18:  OFL mask, set means interrupt enabled.
  1119.              bit 19:  UFL mask, set means interrupt enabled.
  1120.              bit 20 to bit 23 Unused, read as zero.
  1121.              bit 24 to bit 31 System id, where bit 31 set means floating point
  1122.                               hardware, read only. 
  1123. Syntax:    wfs<Cond> <Src>
  1124.            <Cond>  see Cond.
  1125.            <Src> is a cpu register, (identifiers defined with 'rn').
  1126.  
  1127. %rfc
  1128. E.g.:           rfc r0
  1129. Summary:   Rfc is a privileged instruction that reads the fpu's control register. An
  1130.            attempt to use it in user mode will cause a trap. I have no information about
  1131.            what the control register contains.
  1132. Syntax:    rfc<Cond> <Dst>
  1133.            <Cond>  see Cond.
  1134.            <Dst> is a cpu register, (identifiers defined with 'rn').
  1135.  
  1136.  
  1137. %wfc
  1138. E.g.:           wfc r0
  1139. Summary:   Wfc is a privileged instruction that updates the fpu's control register. An
  1140.            attempt to use it in user mode will cause a trap. I have no information about
  1141.            what the control register contains.
  1142. Syntax:    rfc<Cond> <Dst>
  1143.            <Cond>  see Cond.
  1144.            <Dst> is a cpu register, (identifiers defined with 'rn').
  1145.  
  1146. %ldf
  1147. E.g.:          ldfs f0,[r0,#16]
  1148. Summary:   Ldf loads floating point values.
  1149. Syntax:    ldf<Cond><Prec> <Dst>,<Address><!flag>
  1150.            <Cond>  see Cond.
  1151.            <Prec> is one of:
  1152.                s               Single   precision (32-bit float).
  1153.                d               Double   precision (64-bit float).
  1154.                e               Extended precision (96-bit float).
  1155.                p               Packed decimal     (96-bit bcd-float).
  1156.            <Dst> is a fpu register, (identifiers defined with 'fn').
  1157.            <Address>
  1158.              The <!flag> is allowed in the last last variants but not in the others.
  1159.              [ <Addr> ]      
  1160.                                     indirect register. 
  1161.              [ <Addr> ],#<Offset>
  1162.                                     indirect register with immediate post inc/decrement. 
  1163.              [ <Addr>,#<Offset> ]
  1164.                                     indirect register with immediate pre inc/decrement. 
  1165.            <Addr> is a registers, (identifiers defined with 'rn').
  1166.            <Offset> is an expression which value fits 10-bit constant with a
  1167.                     sign bit where the two lowes bits set to zero ,-1020 to
  1168.                     +1020 inclusive but only multiples of four.
  1169.            <!flag>
  1170.                !               <Addr> = <Addr> + Offset, if increment,
  1171.                                       = <Addr> - Offset, if decrement.
  1172.                                This flag is only allowed if the address is a pre
  1173.                                inc/decrement. The <Addr> register is always updated
  1174.                                if the <Address> is a post inc/decrement.
  1175.                        (empty) Do not update the <Addr> register unless the <Address>
  1176.                                is a post inc/decrement.
  1177.  
  1178. %stf
  1179. E.g.:           stfs f0,[r0,#16]
  1180. Summary:   Stf stores floating point values. The rounding mode is always round
  1181.            to nearest, use a mvf before if another rounding mode is needed.
  1182. Syntax:    stf<Cond><Prec> <Src>,<Address><!flag>
  1183.            <Cond>  see Cond.
  1184.            <Prec> is one of:
  1185.                s               Single   precision (32-bit float).
  1186.                d               Double   precision (64-bit float).
  1187.                e               Extended precision (96-bit float).
  1188.                p               Packed decimal     (96-bit bcd-float).
  1189.            <Src> is a fpu register, (identifiers defined with 'fn').
  1190.            <Address>
  1191.              The <!flag> is allowed in the last last variants but not in the others.
  1192.              [ <Addr> ]      
  1193.                                     indirect register. 
  1194.              [ <Addr> ],#<Offset>
  1195.                                     indirect register with immediate post inc/decrement. 
  1196.              [ <Addr>,#<Offset> ]
  1197.                                     indirect register with immediate pre inc/decrement. 
  1198.            <Addr> is a registers, (identifiers defined with 'rn').
  1199.            <Offset> is an expression which value fits 10-bit constant with a
  1200.                     sign bit where the two lowes bits set to zero ,-1020 to
  1201.                     +1020 inclusive but only multiples of four.
  1202.            <!flag>
  1203.                !               <Addr> = <Addr> + Offset, if increment,
  1204.                                       = <Addr> - Offset, if decrement.
  1205.                                This flag is only allowed if the address is a pre
  1206.                                inc/decrement. The <Addr> register is always updated
  1207.                                if the <Address> is a post inc/decrement.
  1208.                        (empty) Do not update the <Addr> register unless the <Address>
  1209.                                is a post inc/decrement.
  1210.  
  1211. %ldc
  1212. E.g.:           ldc 10,c0,[r0,#16]
  1213. Summary:   Ldc loads a value to a coprocessor register. The fpu is coprocessor 1 so
  1214.            use ldf instead of ldc 1.
  1215. Syntax:    ldc<Cond><Lflag> <Cop><Dst>,<Address><!flag>
  1216.            <Cond>  see Cond.     
  1217.            <Cop> is the number of the coprocessor:
  1218.                 1 is the fpu.
  1219.               2-14   don't know if they are assign to anything. 
  1220.                15 is cache control on an ARM3.
  1221.            <Lflag> is one of:  (Note it is the coprocessor that decides what this flag means.)
  1222.                l          This is a long transfer.
  1223.                   (empty) This is a short transfer.
  1224.            <Dst> is a coprocessor register, (identifiers defined with 'cn').
  1225.            <Address>
  1226.              The <!flag> is allowed in the last variant but not in the others.
  1227.              [ <Addr> ]      
  1228.                                     indirect register. 
  1229.              [ <Addr> ],#<Offset>
  1230.                                     indirect register with immediate post inc/decrement. 
  1231.              [ <Addr>,#<Offset> ]
  1232.                                     indirect register with immediate pre inc/decrement. 
  1233.            <Addr> is a register, (identifiers defined with 'rn').
  1234.            <Offset> is an expression which value fits 10-bit constant with a
  1235.                     sign bit where the two lowes bits set to zero ,-1020 to
  1236.                     +1020 inclusive but only multiples of four.
  1237.            <!flag>
  1238.                !               <Addr> = <Addr> + Offset, if increment,
  1239.                                       = <Addr> - Offset, if decrement.
  1240.                                This flag is only allowed if the address is a pre
  1241.                                inc/decrement. The <Addr> register is always updated
  1242.                                if the <Address> is a post inc/decrement.
  1243.                        (empty) Do not update the <Addr> register unless the <Address>
  1244.                                is a post inc/decrement.
  1245.  
  1246. %stc
  1247. E.g.:           stc 10,c0,[r0,#16]
  1248. Summary:   Stc stores a value from a coprocessor register. The fpu is coprocessor 1 so
  1249.            use stf instead of stc 1.
  1250. Syntax:    stc<Cond><Lflag> <Cop><Src>,<Address><!flag>
  1251.            <Cond>  see Cond.
  1252.            <Lflag> is one of:  (Note it is the coprocessor that decides what this flag means.)
  1253.                l          This is a long transfer.
  1254.                   (empty) This is a short transfer.
  1255.            <Cop> is the number of the coprocessor:
  1256.                 1 is fpu.
  1257.               2-14   don't know if they are assign to anything. 
  1258.                15 is cache control on an ARM3.
  1259.            <Src> is a coprocessor register, (identifiers defined with 'cn').
  1260.            <Address>
  1261.              The <!flag> is allowed in the last variant but not in the others.
  1262.              [ <Addr> ]      
  1263.                                     indirect register. 
  1264.              [ <Addr> ],#<Offset>
  1265.                                     indirect register with immediate post inc/decrement. 
  1266.              [ <Addr>,#<Offset> ]
  1267.                                     indirect register with immediate pre inc/decrement. 
  1268.            <Addr> is a register, (identifiers defined with 'rn').
  1269.            <Offset> is an expression which value fits 10-bit constant with a
  1270.                     sign bit where the two lowes bits set to zero ,-1020 to
  1271.                     +1020 inclusive but only multiples of four.
  1272.            <!flag>
  1273.                !               <Addr> = <Addr> + Offset
  1274.                                This flag is only allowed if the address is a pre
  1275.                                inc/decrement. The <Addr> register is always updated
  1276.                                if the <Address> is a post inc/decrement.
  1277.                        (empty) Do not update the <Addr> register unless the <Address>
  1278.                                is a post inc/decrement.
  1279.  
  1280. %cdp
  1281. E.g.:           cdp  2,3,c0,c1,c2
  1282. Summary    Cdp is the coprocessor data instruction. Do not use it for coprocessor 1
  1283.            as the fpu has its own mnemonics.
  1284. Syntax:    cdp<Cond> <Cop>,<Operator>,<Dst>,<Rhs>,<Lhs> or
  1285.            cdp<Cond> <Cop>,<Operator>,<Dst>,<Rhs>,<Lhs>,<Info>
  1286.            <Cond>  see Cond.
  1287.            <Cop> is the number of the coprocessor:
  1288.                 1     is the fpu.
  1289.               2-14   don't know if they are assign to anything. 
  1290.                15     is cache control on an ARM3.
  1291.            <Opcode> is the number of this opcode, 0 to 15 inclusive.
  1292.            <Dst>,<Rhs> and <Lhs> are coprocessor register, (identifiers defined with 'cn').
  1293.            <Info> is the optional additional information field, 0 to 7 inclusive.
  1294.                   It is set to zero if it is omitted.
  1295.  
  1296. %mrc
  1297. E.g.:           mrc  2,3,r0,c1,c2
  1298. Summary    Mrc moves a value from the cpu to the coprocessor. Do not use it
  1299.            for coprocessor 1 as the fpu has its own mnemonics.
  1300. Syntax:    mrc<Cond> <Cop>,<Operator>,<Dst>,<Rhs>,<Lhs> or
  1301.            mrc<Cond> <Cop>,<Operator>,<Dst>,<Rhs>,<Lhs>,<Info>
  1302.            <Cond>  see Cond.
  1303.            <Cop> is the number of the coprocessor:
  1304.                 1     is the fpu.
  1305.               2-14   don't know if they are assign to anything. 
  1306.                15     is cache control on an ARM3 see CachOp.
  1307.            <Opcode> is the number of this opcode, 0 to 7 inclusive.
  1308.            <Dst> is a cpu register, (identifiers defined with 'rn').
  1309.            <Rhs> and <Lhs> are coprocessor register, (identifiers defined with 'cn').
  1310.            <Info> is the optional additional information field, 0 to 7 inclusive.
  1311.                   It is set to zero if it is omitted.
  1312.  
  1313. %mcr
  1314. E.g.:           mcr  2,3,r0,c1,c2
  1315. Summary    Mcr moves a value from the coprocessor to the cpu. Do not use it
  1316.            for coprocessor 1 as the fpu has its own mnemonics.
  1317. Syntax:    mrc<Cond> <Cop>,<Operator>,<Dst>,<Rhs>,<Lhs> or
  1318.            mrc<Cond> <Cop>,<Operator>,<Dst>,<Rhs>,<Lhs>,<Info>
  1319.            <Cond>  see Cond.
  1320.            <Cop> is the number of the coprocessor:
  1321.                 1     is the fpu.
  1322.               2-14   don't know if they are assign to anything. 
  1323.                15     is cache control on an ARM3 see CachOp.
  1324.            <Opcode> is the number of this opcode, 0 to 7 inclusive.
  1325.            <Dst> is a cpu register, (identifiers defined with 'rn').
  1326.            <Rhs> and <Lhs> are coprocessor register, (identifiers defined with 'cn').
  1327.            <Info> is the optional additional information field, 0 to 7 inclusive.
  1328.                   It is set to zero if it is omitted.
  1329.  
  1330. %CachOp
  1331. Usage:     Don't
  1332. Summary:   This is only a short description of how to control the cache on
  1333.            an ARM3. The information is taken from one article by Andrew Mell
  1334.            (Message-ID: <9108160241.AA17682@mole.gnu.ai.mit.edu>) and one by
  1335.            Michael Hardy (Message-ID: <9189@acorn.co.uk>).
  1336.            I have assumed that c0 and c1 are defined as coprocessor registers
  1337.            0 and 1.
  1338. Note:      According to my knowledge the maximum coprocessor register is 15 not 31 as
  1339.            stated in Mell's article but I might be wrong.
  1340.            I also wonder if there are any mnemonic specified for this operations.
  1341.  
  1342.                mrc<Cond> 15,0,arm-register,control-register,c0
  1343.                                                         writes to the cache controller
  1344.                mcr<Cond> 15,0,arm-register,control-register,c0
  1345.                                                         reads from the cache controller
  1346.  
  1347.                The control registers are:
  1348.  
  1349.                register 0: 32 bit processor identity field
  1350.                            bit 31-24 : Designer (41h = Acorn)
  1351.                            bit 23-16 : Manufacturer (56h = vlsi)
  1352.                            bit 15-8  : Part type (03h = arm3)
  1353.                            bit 7-0   : Revision (0 = revision 0)
  1354.  
  1355.                register 1: cache flush
  1356.                            writing any value to this register flushes the cache
  1357.                            so an ultrafast cache flush is "mrc 15,0,r0,c1,c0".
  1358.  
  1359.                register 2: cache control (3 bit register)
  1360.                            bit 0: high = cache on , low = cache off
  1361.                            bit 1: high = shared supervisor/user address space
  1362.                                   low  = separate supervisor/user address space
  1363.                            bit 2: high = select monitor mode
  1364.                              for program tracing with a logic analyser
  1365.                              leave it low
  1366.                            bit 3-31 : reserved
  1367.  
  1368.                register 3: cacheable areas register (32 bits)
  1369.                   If bit n is set then the 2MBytes starting at n*2MBytes are
  1370.                   cacheable.
  1371.                   The default value stored is &FC007FFF, so ROM, the RAM
  1372.                   disc and logical non-screen RAM are  cacheable, but I/O
  1373.                   space, physical memory and logical screen  memory are not.
  1374.  
  1375.                register 4: updateable areas register (32 bits)
  1376.                   If bit n is set then the 2MBytes starting at n*2MBytes are
  1377.                   updateable.
  1378.                   The default value stored is &00007FFF, so logical
  1379.                   non-screen RAM is updateable,  but ROM/CAM/DAG, I/O space,
  1380.                   physical memory and logical screen memory are  not.
  1381.  
  1382.  
  1383.                register 5: disruptive areas register (32 bits)
  1384.                   If bit n is set then the 2MBytes starting at n*2MBytes are
  1385.                   disruptive.
  1386.                   The default value stored is &F0000000, so the CAM map is
  1387.                   disruptive, but  ROM/DAG, I/O space, physical memory and
  1388.                   logical memory are not. This causes  automatic flushing
  1389.                   whenever MEMC's page mapping is altered, which allows 
  1390.                   programs written for the ARM2 (including RISC OS itself)
  1391.                   to run unaltered, but at  the expense of unnecessary
  1392.                   flushing on page swaps.
  1393.  
  1394.                register 6-31: reserved
  1395.  
  1396.