2 Some source code extracted from the ColecoVision / Sega 8-bit game Io.
3 This file has been included in the tests, since it uses some z80 peephole rules
4 not used elsewhere in the regression tests.
21 void f16_2(uint16_t i
)
31 uint16_t assemble(uint8_t i
, uint8_t j
)
33 return(j
| ((uint16_t)i
<< 8));
36 #ifndef __SDCC_pdk14 // Lack of memory
37 // Sequence of function calls with stack parameters close to stack end.
38 void callsequencestack(uint16_t i
, uint16_t j
, uint8_t k
)
46 // Sequence of function calls with stack parameters far from stack end.
47 void callsequencestack2(uint32_t dummy1
, uint16_t i
, uint16_t j
, uint8_t k
, uint32_t dummy2
)
57 // Sequence of function calls with stack parameters far from stack end.
58 void callsequencestack3(uint32_t dummy1
, uint8_t i
, uint8_t j
, uint8_t k
, uint32_t dummy2
)
60 callsequencestack(assemble(i
, j
), assemble(j
, i
), k
);
61 callsequencestack2(dummy1
, assemble(i
, j
), assemble(j
, i
), k
, dummy2
);
64 // Sequence of function calls with with literals parameters
65 void callsequencelit(void)
71 callsequencestack(0x55aa, 0xaa55, 0x5a);
72 callsequencestack2(0, 0x55aa, 0xaa55, 0x5a, 0);
73 callsequencestack(assemble(0x55,0xaa), assemble(0xaa,0x55), 0x5a);
74 callsequencestack3(0, 0x55, 0xaa, 0x5a, 0);
86 void setflags(struct flags
*f
)
93 // Test a bit in a location accessed stough struct / by pointer
116 #ifndef __SDCC_pdk14 // Lack of memory