added i2c controller tests

This commit is contained in:
Dennis Gunia
2022-12-20 19:29:01 +01:00
parent fabb402f6b
commit 265342e7f7
21 changed files with 6803 additions and 3371 deletions

View File

@@ -0,0 +1,37 @@
;------------------------------------------------------------------------------
; beep
;
; Beeps the speaker
; DE sets duration
;------------------------------------------------------------------------------
beep:
push AF
push BC
push DE
LD A,0x08
OUT (CS_PIO_AD), A
LD BC, 0x28
CALL beep_pause
LD A,0x00
OUT (CS_PIO_AD), A
LD BC, 0x24
CALL beep_pause
DEC DE
ld A,D
or E
jr NZ, beep
pop de
pop bc
pop af
ret
beep_pause:
NEG ; 8 T-states
NEG ; 8 T-states
NEG ; 8 T-states
NEG ; 8 T-states
DEC BC ; 6 T-states
LD A,C ; 9 T-states
OR B ; 4 T-states
JP NZ,beep_pause ; 10 T-states
RET ; Pause complete, RETurn