Skip to navigation


Loader: LoadGMAFile

[Commodore 64 version, Disk Loader 2]

Name: LoadGMAFile [Show more] Type: Subroutine Category: Loader Summary: Load a specific GMA file
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * Elite GMA loader (Part 2 of 4) calls LoadGMAFile * Elite GMA loader (Part 3 of 4) calls LoadGMAFile * Elite GMA loader (Part 4 of 4) calls LoadGMAFile

Arguments: A The number of the GMA file to load * For the GMA85 NTSC variant: as an ASCII character * For the GMA86 PAL variant: as an integer
.LoadGMAFile JSR SetUpGMAFile ; Configure the filename parameters to load the GMA file ; whose number is in A LDA #1 ; Call the Kernal's SETLFS function to set the file LDX #8 ; parameters as follows: LDY #1 ; JSR KERNALSETLFS ; * A = logical number 1 ; ; * X = device number 8 (disk) ; ; * Y = secondary address 1 LDA #0 ; Call the Kernal's LOAD function to load the GMA file JSR KERNALLOAD ; as follows: ; ; * A = 0 to initiate a load operation ; ; So this loads the specified GMA file from disk RTS ; Return from the subroutine