annotate lib/alib/parsnstr.a @ 2765:0bd16cca86b7

Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
author drencor-xeen
date Thu, 17 Jan 2013 11:03:26 -0600
parents 7d70b7e1cb21
children aaba193af04f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1 * Parse sign bit terminated string to convert it to a
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
2 * null terminated string. Note: if X and Y are the same
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
3 * the existing string will be overwritten -- don't do this
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4 * with psects...
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6 * OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8 * ENTRY: X=start of sign bit terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9 * Y=buffer for null terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11 * EXIT: D=string size (not including null)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12 * All other regs (except cc) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15 nam Parse sign-bit terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16 ttl Assembler Library Module
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
18
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
19 psect PARSNSTR,0,0,0,0,0
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
22 PARSNSTR:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23 pshs x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24 lbsr STRHCPY copy string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25 tfr y,x point to moved string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26 lbsr STRHLEN find length of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27 pshs d size
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28 leax d,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 lda ,-x get final byte
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30 anda #%01111111 clear sign bit
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31 clrb add null terminator
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32 std ,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33 puls d,x,pc
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
36 endsect
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
37