.SetFilename LDY #0 ; Set Y = 0 to use as a character counter .name1 LDA filename,Y ; Copy the Y-th character of filename to the Y-th STA comnam,Y ; character of comnam INY ; Increment the character counter CPY #4 ; Loop back until we have copied all four characters of BNE name1 ; filename to comnam RTS ; Return from the subroutineName: SetFilename [Show more] Type: Subroutine Category: Loader Summary: Set the filename in comnam to ELB1Context: See this subroutine in context in the source code References: This subroutine is called as follows: * Elite loader calls SetFilename
[X]
Variable comnam (category: Save and load)
The filename of the first file to load, padded out with spaces to a fixed size of 30 characters for the rfile routine
[X]
Variable filename (category: Save and load)
The filename of the second file to load
[X]
Label name1 is local to this routine