]> git.sur5r.net Git - cc65/blob - libsrc/common/tolower.s
Removed unused stuff
[cc65] / libsrc / common / tolower.s
1 ;
2 ; Ullrich von Bassewitz, 02.06.1998
3 ;
4 ; int tolower (int c);
5 ;
6
7         .export         _tolower
8         .import         __ctype, __cdiff
9
10 _tolower:
11         tay                     ; Get C into Y
12         lda     __ctype,y       ; Get character classification
13         and     #$02            ; Is this an upper case char?
14         beq     L1              ; Jump if no
15         tya                     ; Get char back into A
16         sec
17         sbc     __cdiff         ; make lower case char
18         rts                     ; CC are set
19
20 L1:     tya                     ; Get char back into A
21         rts                     ; CC are set
22