Skip to navigation

BBC Micro Elite

Universe: STORE (6502SP version)

Name: STORE [View in context] Type: Subroutine Category: Universe Summary: Copy the ship data block at INWK back to the K% workspace
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