Skip to navigation

Elite on the BBC Micro

Save and load: JAMESON [Master version]

Name: JAMESON [Show more] Type: Subroutine Category: Save and load Summary: Restore the default JAMESON commander
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * BEGIN calls JAMESON * SVE calls JAMESON
.JAMESON LDY #96 \ We are going to copy the default commander at DEFAULT% \ over the top of the last saved commander at NA%, so \ set a counter to copy 97 bytes .JAMESL LDA DEFAULT%,Y \ Copy the Y-th byte of DEFAULT% to the Y-th byte of STA NA%,Y \ NA% DEY \ Decrement the loop counter BPL JAMESL \ Loop back until we have copied the whole commander LDY #7 \ Set NAMELEN2 to 7, the length of the commander name STY NAMELEN2 \ "JAMESON" RTS \ Return from the subroutine