typedef uint16_t irqflags_t;
extern void out(uint8_t addr, uint8_t val);
-extern uint8_t in(uint8_t addr);
+extern uint8_t in(uint8_t addr) __z88dk_fastcall;
/* Z80 binaries start with a JP */
#define EMAGIC 0xc3 /* Header of executable */
ld a, (0)
call map_save_kernel
- ;
- ; FIXME: re-implement sanity checks and add a stack one
- ;
-
- ; We need the kernel mapped for the IRQ handling
- call map_kernel_di
cp #0xC3
call nz, null_pointer_trap
push bc
jp (hl)
+;
+; Use z88dk_fastcall for in.
+;
_in:
- pop hl
- pop bc
- push bc
- push hl
+ ld c,l
in l, (c)
ret