2 ; Ullrich von Bassewitz, 22.11.2002
4 ; SETNAM replacement function
11 ; This function is special in that the name must reside in low memory,
12 ; otherwise it is not accessible by the ROM code.
14 .segment "LOWCODE" ; Must go into low memory
18 ; Store the length of the name into the zero page
22 ; Check if we have to copy the name to low memory
24 cmp #$00 ; Length zero?
25 beq @L3 ; Yes: Copying not needed
26 cpy #$00 ; Is the name in low memory?
27 bpl @L3 ; Yes: Copying not needed
29 ; Store the length and the pointer to the name
32 sty TMPPTR+1 ; Store pointer to name in TMPPTR
34 ; Copy the given name into FNBUF.
43 ; Load the new parameters for the low memory buffer
48 ; Instead of banking in the ROM, store the values directly into the zeropage