Cygwin: mmap: use 64K pages for bookkeeping, second attempt
[newlib-cygwin.git] / newlib / libc / machine / w65 / sdivhi3.S
blob7958f11e777aa605ea285eaf4af05cbca7a758a5
1         .global ___sdivhi3
3 ___sdivhi3:
4         lda     <r4
5         ldx     <r5             
7         ldy     #0              !flag positive result
8         rol     a
9         ror     a
10         bpl     L10
12         iny                     !flag negative result
13         eor     #0xFFFF
14         inc     a
16 L10:    pha
17         txa
18         bpl     L20
20         dey                     !flag negative/positive result
21         eor     #0xFFFF
22         inc     a
23         tax
25 L20:    pla
26         phy
27         jsr     >udv
28         ply
29         beq     Lend            !if positive result
31         eor     #0xFFFF         !negate result
32         inc     a
34 Lend:   sta     <r0
35         rtl