Skip to navigation

Universe: STORE

[6502 Second Processor version]

Name: STORE [Show more] Type: Subroutine Category: Universe Summary: Copy the ship data block at INWK back to the K% workspace
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * DEMON calls STORE

Arguments: INF The ship data block in the K% workspace to copy INWK to
.STORE LDY #NI%-1 \ Set a counter in Y so we can loop through the NI% \ bytes in the ship data block .DML2 LDA INWK,Y \ Load the Y-th byte of INWK and store it in the Y-th STA (INF),Y \ byte of INF DEY \ Decrement the loop counter BPL DML2 \ Loop back for the next byte, until we have copied the \ last byte from INWK back to INF RTS \ Return from the subroutine