/[projet1]/public/pc/tools/osdk/main/Osdk/_final_/lib2/tstring.s
Defence Force logotype

Annotation of /public/pc/tools/osdk/main/Osdk/_final_/lib2/tstring.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1154 - (hide annotations)
Sun Aug 10 18:19:54 2014 UTC (5 years, 7 months ago) by dbug
File size: 564 byte(s)


1 dbug 1154 ;
2     ; toupper(c)
3     ;
4     _toupper
5     ldy #0
6     lda (sp),y ;low byte of c
7     tax
8     lda ctype,x
9     and #$02 ;_L
10     beq toupper1 ;skip if not lower-case
11     sec
12     txa ;original char
13     sbc #$20 ;force upper case
14     tax
15     toupper1
16     lda #0
17     rts
18    
19     ;
20     ; tolower(c)
21     ;
22     _tolower
23     ldy #0
24     lda (sp),y ;low byte of c
25     tax
26     lda ctype,x
27     and #$01 ;_U
28     beq tolower1 ;skip if not upper-case
29     clc
30     txa ;original char
31     adc #$20 ;force lower case
32     tax
33     tolower1
34     lda #0
35     rts
36    
37     ;
38     ; toascii(c)
39     ;
40     _toascii
41     ldy #0
42     lda (sp),y ;low byte of c
43     and #$7f
44     tax
45     lda #0
46     rts
47    

  ViewVC Help
Powered by ViewVC 1.1.26