Changeset 4f508e6 in buchla-68k for iolib/setsr.s


Ignore:
Timestamp:
07/01/2017 02:34:46 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
08e1da1
Parents:
f40a309
Message:

Converted assembly language files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • iolib/setsr.s

    rf40a309 r4f508e6  
    1 *
    2 * setsr.s -- Set processor status register
    3 * -------    -----------------------------
    4 * Version 1 -- 1988-06-29 -- D.N. Lynx Crowe
    5 *
    6 *       short
    7 *       setsr(arg);
    8 *       short arg;
    9 *
    10 *       Sets processor status register to 'arg'.
    11 *       Returns old status register value.
    12 *
    13 *       Assumes you are in supervisor mode.
    14 *       You get a Privelege Violation TRAP if you aren't.
    15 *
    16 *       Coded for speed -- this is as fast as you can get.
    17 *       No error checking is done -- assumes you know what you're doing.
    18 *
     1
     2| setsr.s -- Set processor status register
     3| -------    -----------------------------
     4| Version 1 -- 1988-06-29 -- D.N. Lynx Crowe
     5
     6|       short
     7|       setsr(arg);
     8|       short arg;
     9
     10|       Sets processor status register to 'arg'.
     11|       Returns old status register value.
     12
     13|       Assumes you are in supervisor mode.
     14|       You get a Privelege Violation TRAP if you aren't.
     15
     16|       Coded for speed -- this is as fast as you can get.
     17|       No error checking is done -- assumes you know what you're doing.
     18
    1919                .text
    20 *
     20
    2121                .xdef   _setsr
    22 *
    23 _setsr:         move.w  sr,d0                   * Get current sr
    24                 move.w  4(sp),sr                * Set new sr
    25                 rts                             * Return to caller
    26 *
     22
     23_setsr:         move.w  sr,d0                   | Get current sr
     24                move.w  4(sp),sr                | Set new sr
     25                rts                             | Return to caller
     26
    2727                .end
Note: See TracChangeset for help on using the changeset viewer.