Changeset 4f508e6 in buchla-68k for lib700/jumpto.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
  • lib700/jumpto.s

    rf40a309 r4f508e6  
    1 * ------------------------------------------------------------------------------
    2 * jumpto.s -- miscellaneous ROMP support functions
    3 * Version 4 -- 1987-10-14 -- D.N. Lynx Crowe
    4 *
    5 *       WARNING:
    6 *       --------
    7 *               These functions, in general, assume supervisor mode and
    8 *               'sane' arguments, so no error checking is done.
    9 *
    10 *       halt()
    11 *
    12 *               Brings the processor to a grinding halt.  Requires external
    13 *               reset to restart things.  Use only for catastrophic hard halts.
    14 *
    15 *       jumpto(addr)
    16 *       long addr;
    17 *
    18 *               Jumps to 'addr'.  No error check is done on 'addr'.
    19 *
    20 *       rjumpto(addr)
    21 *       long addr;
    22 *
    23 *               Performs the 68000 'RESET' command, then jumps to 'addr'.
    24 *               No error check is made on 'addr'.
    25 *
    26 *       sjumpto(addr, stack)
    27 *       long addr, stack;
    28 *
    29 *               Sets a7 to 'stack', then jumps to 'addr'.
    30 *               No error check is done on 'addr'.
    31 *
    32 *       xreset()
    33 *
    34 *               Performs the 68000 'RESET' command.  This is very dangerous,
    35 *               and should be used with extreme care regarding such
    36 *               things as interrupts, device initialization, vectors,
    37 *               and sundry other reset-related things.
    38 *
    39 * ------------------------------------------------------------------------------
     1| ------------------------------------------------------------------------------
     2| jumpto.s -- miscellaneous ROMP support functions
     3| Version 4 -- 1987-10-14 -- D.N. Lynx Crowe
     4
     5|       WARNING:
     6|       --------
     7|               These functions, in general, assume supervisor mode and
     8|               'sane' arguments, so no error checking is done.
     9
     10|       halt()
     11
     12|               Brings the processor to a grinding halt.  Requires external
     13|               reset to restart things.  Use only for catastrophic hard halts.
     14
     15|       jumpto(addr)
     16|       long addr;
     17
     18|               Jumps to 'addr'.  No error check is done on 'addr'.
     19
     20|       rjumpto(addr)
     21|       long addr;
     22
     23|               Performs the 68000 'RESET' command, then jumps to 'addr'.
     24|               No error check is made on 'addr'.
     25
     26|       sjumpto(addr, stack)
     27|       long addr, stack;
     28
     29|               Sets a7 to 'stack', then jumps to 'addr'.
     30|               No error check is done on 'addr'.
     31
     32|       xreset()
     33
     34|               Performs the 68000 'RESET' command.  This is very dangerous,
     35|               and should be used with extreme care regarding such
     36|               things as interrupts, device initialization, vectors,
     37|               and sundry other reset-related things.
     38
     39| ------------------------------------------------------------------------------
    4040                .text
    41 *
     41
    4242                .xdef   _halt,_jumpto,_rjumpto,_sjumpto,_xreset
    43 *
     43
    4444                .page
    45 *
    46 _halt:          stop    #$2700                  * stop dead, interrupts disabled
    47                 jmp     _halt                   * stay stopped if stepped thru
    48 *
    49 _jumpto:        movea.l 4(a7),a0                * get jump address
    50                 jmp     (a0)                    * go to the jump address
    51 *
    52 _rjumpto:       reset                           * reset external devices
    53                 movea.l 4(a7),a0                * get jump address
    54                 jmp     (a0)                    * go to the jump address
    55 *
    56 _sjumpto:       movea.l 4(a7),a0                * get jump address
    57                 movea.l 8(a7),a7                * set stack pointer
    58                 jmp     (a0)                    * go to the jump address
    59 *
    60 _xreset:        reset                           * reset external devices
    61                 rts                             * return to caller
    62 *
     45
     46_halt:          stop    #0x2700                 | stop dead, interrupts disabled
     47                jmp     _halt                   | stay stopped if stepped thru
     48
     49_jumpto:        movea.l 4(a7),a0                | get jump address
     50                jmp     (a0)                    | go to the jump address
     51
     52_rjumpto:       reset                           | reset external devices
     53                movea.l 4(a7),a0                | get jump address
     54                jmp     (a0)                    | go to the jump address
     55
     56_sjumpto:       movea.l 4(a7),a0                | get jump address
     57                movea.l 8(a7),a7                | set stack pointer
     58                jmp     (a0)                    | go to the jump address
     59
     60_xreset:        reset                           | reset external devices
     61                rts                             | return to caller
     62
    6363                .end
Note: See TracChangeset for help on using the changeset viewer.