Applied patch #2762516
[fw/sdcc] / device / lib / z80 / mod.s
1         .area   _CODE
2
3 __moduchar_rrx_s::
4         ld      hl,#2+1
5         add     hl,sp
6
7         ld      e,(hl)
8         dec     hl
9         ld      l,(hl)
10
11         ;; Fall through
12 __moduchar_rrx_hds::
13         call    __divu8
14
15         ex      de,hl
16
17         ret
18
19 __moduint_rrx_s::
20         pop     af
21         pop     hl
22         pop     de
23         push    de
24         push    hl
25         push    af
26
27         ;; Fall through
28 __moduint_rrx_hds::
29         call    __divu16
30
31         ex      de,hl
32
33         ret
34
35 __moduschar_rrx_s::
36         ld      hl,#2+1
37         ld      d, h
38         add     hl,sp
39
40         ld      e,(hl)
41         dec     hl
42         ld      l,(hl)
43
44         ld      a,l             ; Sign extend
45         rlca
46         sbc     a
47         ld      h,a
48
49         call    __div16
50
51         ex      de,hl
52
53         ret
54