These are needed to run Fuzix reliably
code is called via push af call foo pop af
+Note: This patch is now mostly obsolete. Feature #1 is mostly integrated
+into the mainstream SDCC. Feature #2 is only needed for the ZX128 and has
+not yet been ported to a recent compiler
+
+
+
+SDLTRS:
+ Corrects the handling of the IFF flags on interrupt delivery and
+when you do a RETI, which has a subtle difference to a RET. Without these
+fixes Fuzix will crash at random on the emulator.
+
+ For more information on the Z80 IFF flags see section 5.3 of Z80
+Documented: http://www.z80.info/zip/z80-documented.pdf
--- /dev/null
+diff -u --recursive sdltrs_1_1_0/src/z80.c sdltrs_1_1_0.ac/src/z80.c
+--- sdltrs_1_1_0/src/z80.c 2010-02-14 00:38:36.000000000 +0000
++++ sdltrs_1_1_0.ac/src/z80.c 2015-05-30 02:44:06.958734734 +0100
+@@ -1348,6 +1348,7 @@
+ REG_SP -= 2;
+ mem_write_word(REG_SP, REG_PC);
+ z80_state.iff1 = 0;
++ z80_state.iff2 = 0;
+ switch (z80_state.interrupt_mode) {
+ case 0:
+ /* REG_PC = get_irq_vector() & 0x38; */
+@@ -2880,6 +2882,7 @@
+
+ case 0x4D: /* reti */
+ /* no support for alerting peripherals, just like ret */
++ z80_state.iff1 = z80_state.iff2;
+ REG_PC = mem_read_word(REG_SP);
+ REG_SP += 2;
+ T_COUNT(14);