1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include "sleep.h" void usleep(uint16_t microseconds) { __asm pop hl loop: ld bc, #SLEEP_UNIT unit: nop dec bc jr nz, unit dec hl jr nz,loop __endasm; }