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

Contents of /public/pc/tools/osdk/main/Osdk/_final_/lib2/istring.s

Parent Directory Parent Directory | Revision Log Revision Log


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


1 ; String routines #1
2
3 ;
4 ; isalpha(c)
5 ;
6 _isalpha
7 ldy #0
8 lda (sp),y ;low byte of c
9 tax
10 lda ctype,x
11 and #$03 ;_U | _L
12 beq isalpha1
13 jmp true
14 isalpha1
15 jmp false
16
17 ;
18 ; isupper(c)
19 ;
20 _isupper
21 ldy #0
22 lda (sp),y ;low byte of c
23 tax
24 lda ctype,x
25 and #$01 ;_U
26 beq isupper1
27 jmp true
28 isupper1
29 jmp false
30
31
32
33 ;
34 ; islower(c)
35 ;
36 _islower
37 ldy #0
38 lda (sp),y ;low byte of c
39 tax
40 lda ctype,x
41 and #$02 ;_L
42 beq islower1
43 jmp true
44 islower1
45 jmp false
46 ;
47 ; isdigit(c)
48 ;
49 _isdigit
50 ldy #0
51 lda (sp),y ;low byte of c
52 tax
53 lda ctype,x
54 and #$04 ;_N
55 beq isdigit1
56 jmp true
57 isdigit1
58 jmp false
59 ;
60 ; isxdigit(c)
61 ;
62 _isxdigi
63 ldy #0
64 lda (sp),y ;low byte of c
65 tax
66 lda ctype,x
67 and #$44 ;_N | _X
68 beq isxdigit1
69 jmp true
70 isxdigit1
71 jmp false
72 ;
73 ; isspace(c)
74 ;
75 _isspace
76 ldy #0
77 lda (sp),y ;low byte of c
78 tax
79 lda ctype,x
80 and #$08 ;_S
81 beq isspace1
82 jmp true
83 isspace1
84 jmp false
85 ;
86 ; ispunct(c)
87 ;
88 _ispunct
89 ldy #0
90 lda (sp),y ;low byte of c
91 tax
92 lda ctype,x
93 and #$10 ;_P
94 beq ispunct1
95 jmp true
96 ispunct1
97 jmp false
98 ;
99 ; isalnum(c)
100 ;
101 _isalnum
102 ldy #0
103 lda (sp),y ;low byte of c
104 tax
105 lda ctype,x
106 and #$07 ;_U | _L | _N
107 beq isalnum1
108 jmp true
109 isalnum1
110 jmp false
111 ;
112 ; isprint(c)
113 ;
114 _isprint
115 ldy #0
116 lda (sp),y ;low byte of c
117 tax
118 lda ctype,x
119 and #$17 ;_P | _U | _L | _N
120 beq isprint1
121 jmp true
122 isprint1
123 jmp false
124 ;
125 ; iscntrl(c)
126 ;
127 _iscntrl
128 ldy #0
129 lda (sp),y ;low byte of c
130 tax
131 lda ctype,x
132 and #$20 ;_C
133 beq iscntrl1
134 jmp true
135 iscntrl1
136 jmp false
137 ;
138 ; isascii(c)
139 ;
140 _isascii
141 ldy #0
142 lda (sp),y ;low byte of c
143 and #$80 ;0 if <= 127
144 eor #$80 ;invert
145 beq isascii1
146 jmp true
147 isascii1
148 jmp false

  ViewVC Help
Powered by ViewVC 1.1.26