Recently I issued the third Z80 programming challenge for the ZX Spectrum:
This time the challenge is to write the shortest code to display a masked 16×16 pixel sprite. The routine should be called with the address of the sprite data in one register and the X and Y screen coordinates in another. There’s no need to save the screen area being overwritten or set the colours / attributes. This is somewhat trickier than previous challenges but more likely to be of practical use.
The deadline is Monday 30th March, midday (GMT).
Target: under 125 bytes.
- The X and Y coordinates are in pixels with 0,0 at the top left.
- The sprite needs to be clipped if it goes over the screen edge.
- Sprite data can be formatted however you like within 64 bytes.
- Programs must return. The
RET
instruction is included in the size. - So everyone has a fair chance comment with the code size not code.
- There are no prizes, just the chance to show off your coding skills.
Solutions can be emailed to digital.wilderness@googlemail.com or posted here after the deadline.
thanks to JM @ http://www.retroprogramming.com/