|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 435 (0x1b3) Types: TextFile Notes: UNIX file Names: »strcpy.s«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code └─⟦f4b8d8c84⟧ UNIX Filesystem └─ ⟦this⟧ »libc/gen/strcpy.s«
/ Segmented Z8001 Coherent string library / Copy one string to another (s2 to s1) / strcpy(s1, s2) / char *s1, *s2; .globl strcpy_ .globl SS strcpy_: ldm r2, SS|4(r15), $4 / rr2 = s1, rr4 = s2 subl rr0, rr0 / r0 = count, r1 = NULL cpirb rl1, (rr4), r0, eq / Scan string for NULL neg r0 / r0 = string length sub r5, r0 / rr4 back to beg. of s2 ldirb (rr2), (rr4), r0 / Copy string ldl rr0, SS|4(r15) / rr0 = s1 ret