]> git.sur5r.net Git - cc65/blobdiff - libsrc/plus4/ksetnam.s
no TGI_ERR_NO_MEM or TGI_ERR_NO_IOCB anymore: replaced by TGI_ERR_NO_RES
[cc65] / libsrc / plus4 / ksetnam.s
index 1d1297cdf4f47d9a5dd6a9faef59b068856c0957..90a08c25b2effc57ad730e5f85d23d5e473b3684 100644 (file)
 
 .proc   SETNAM
 
-; Limit the length of the name and store it into the zero page
+; Store the length of the name into the zero page
 
-        cmp     #16+1
-        bcc     @L1
-        lda     #16                     ; Use a maximum of 16 chars
-@L1:    sta     FNAM_LEN
+       sta     FNAM_LEN
 
 ; Check if we have to copy the name to low memory
 
         stx     TMPPTR
         sty     TMPPTR+1                ; Store pointer to name in TMPPTR
 
-; Copy the given name into DOS_FN1
+; Copy the given name into FNBUF.
 
         ldy     #$00
 @L2:    lda     (TMPPTR),y
-        sta     DOS_FN1,y
+        sta     FNBUF,y
         iny
         cpy     FNAM_LEN
         bne     @L2
 
 ; Load the new parameters for the low memory buffer
 
-        ldx     #<DOS_FN1
-        ldy     #>DOS_FN1
+        ldx     #<FNBUF
+        ldy     #>FNBUF
 
 ; Instead of banking in the ROM, store the values directly into the zeropage
 
-@L3:    stx     FNAM_ADR
-        sty     FNAM_ADR+1
+@L3:    stx     FNAM
+        sty     FNAM+1
 
 ; Return to caller