home *** CD-ROM | disk | FTP | other *** search
- In lha-old
- Out !Run
- Type Absolute
- Ver 1.00d
-
- @ &A590
- ; ro_to_generic
- ; > r0 -> string
- ; < r0 unchanged, string modified
- ; exchange . and /
- MOV r4,r0 ; r4->string
- ; Skipped a R6=0
- MOV r5,#0 ; offset within string
- B $eoloop ; do as a while loop
- $loop
- LDRB r0,[r4,r5] ; get byte
- CMP r0,#ASC(".") ; is it . ?
- CMPNE r0,#ASC("/") ; how about / instead ?
- EOREQ r0,r0,#ASC(".") EOR ASC("/") ; if either swap them (nice code ;-)
- STREQB r0,[r4,r5] ; store back
- CMP r0,#ASC(":") ; is it colon ? if so, ignore before
- BNE $notcolon
- ADD r0,r4,r5 ; r0=current position
- ADD r1,r0,#1 ; r1=next position
- MOV r0,r4 ; r0=start of string
- BL &1270C ; strcpy
- MOV r5,#0 ; start again through this substring
- $notcolon
- ADD r5,r5,#1
- $eoloop
- MOV r0,r4 ; get start of string
- BL &12750 ; r0 = strlen
- CMP r0,r5 ; are we at end ?
- BHI $loop ; if so, exit
- $exit
- LDMDB r11,{r4-r7,r11,r13,pc}^ ; return
-
- @ &9E58
- MOVEQ r0,#ASC("/") ; RO extensions are /, not _ now
- ; (for ms->ro)
- @ &9f3c
- MOVEQ r0,#ASC("/") ; RO extensions are /, not _ now
- ; (for generic->ro)
-
-