1 /** A bad z80 peephole optimizer rule created invalid asm
4 // Based on code sample under GPL 2.0 or later
11 #pragma disable_warning 85
13 void vdu_sprite_position_set16( uint8_t id
, uint8_t tile
, uint8_t x
, uint8_t y
, uint8_t colour
) {}
15 ///< Show patch - set tiles
16 uint8_t vdu_patch_crop_impl( uint8_t id
, int8_t col
, int8_t row
,
17 int8_t width
, int8_t offset
, const uint8_t *counts
, const uint8_t *colours
,
18 int8_t cols
, int8_t rows
, uint8_t tile_offset
, bool zoom
) {
31 vdu_sprite_position_set16( id
++, tile_offset
, px
, py
, *colours
++ ); // The bad asm happened in code for passing parameters here.
49 vdu_patch_crop_impl(0, 0, 0, 0, 0, &c
, &c
, 1, 1, 0, 0);