source: trunk/libs/newlib/src/newlib/libc/machine/w65/udivhi3.S @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 223 bytes
Line 
1        .global ___udivhi3
2
3___udivhi3:
4        stz     <r0
5        ldy     #1
6        ldx     <r4
7        lda     <r5
8       
9div1:   
10        asl     a
11        bcs     div2
12        iny
13        cpy     #17
14        bne     div1
15
16div2:   ror     a
17
18div4:   pha
19        txa
20        sec
21        sbc     1,s
22        bcc     div3
23        tax
24
25div3:   rol     <r0
26        pla
27        lsr     a
28        dey
29        bne     div4
30        rtl
Note: See TracBrowser for help on using the repository browser.