Changeset 8325447 in buchla-68k for lib700/uldiv.s


Ignore:
Timestamp:
08/07/2017 02:04:35 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
27c8d40
Parents:
84c0125
Message:

Removed _ prefix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib700/uldiv.s

    r84c0125 r8325447  
    33| Version 2 -- 1987-06-08 -- D.N. Lynx Crowe
    44| Lifted from the Alcyon C library by disassembly so I could fix a bug -
    5 |       _uldivr must be in the bss segment so the code will work in PROM.
     5|       uldivr must be in the bss segment so the code will work in PROM.
    66
    77|       long
     
    1919                .text
    2020
    21                 .xdef   _uldiv,_uldivr
     21                .xdef   uldiv,uldivr
    2222
    2323DIVIDEND        =       8
    2424DIVISOR         =       12
    2525
    26 _uldiv:         link    a6,#0                   | Link stack frames
     26uldiv:          link    a6,#0                   | Link stack frames
    2727                movem.l d3-d7,-(a7)             | Save registers
    2828                move.l  DIVIDEND(a6),d7         | d7 = DIVIDEND
     
    3131                bne     notdzero                | Jump if not
    3232
    33                 move.l  #0x80000000,_uldivr     | Force error result
     33                move.l  #0x80000000,uldivr      | Force error result
    3434                move.l  #0x80000000,d0          | ... by dividing
    3535                divu    #0,d0                   | ... by zero
     
    3939                bls     notunflo                | Jump if not
    4040
    41                 move.l  d7,_uldivr              | Remainder = dividend
     41                move.l  d7,uldivr               | Remainder = dividend
    4242                clr.l   d0                      | Quotient = 0
    4343                bra     ulexit                  | Exit
     
    8181                bra     divloop3                | Loop for next bit
    8282
    83 setreslt:       move.l  d7,_uldivr              | Store remainder
     83setreslt:       move.l  d7,uldivr               | Store remainder
    8484                move.l  d5,d0                   | Put quotient in d0
    8585
     
    9292                .even
    9393
    94 _uldivr:        .ds.l   1
     94uldivr:         .ds.l   1
    9595
    9696                .end
Note: See TracChangeset for help on using the changeset viewer.