added i2c controller tests
This commit is contained in:
@@ -40,12 +40,8 @@ VDP_MEM equ 0x80
|
||||
PROG_ROM_START equ 0x0100
|
||||
PROG_MEM_START equ 04000h
|
||||
|
||||
IO_PIO_0_A_D equ 0x60
|
||||
IO_PIO_0_A_C equ 0x61
|
||||
IO_PIO_0_B_D equ 0x62
|
||||
IO_PIO_0_B_C equ 0x63
|
||||
|
||||
IO_PIO_1_A_D equ 0x64 ;PS2
|
||||
IO_PIO_1_A_C equ 0x65
|
||||
IO_PIO_1_B_D equ 0x66
|
||||
IO_PIO_1_B_C equ 0x67
|
||||
CS_PIO_BD .EQU 0xF5
|
||||
CS_PIO_BC .EQU 0xF7
|
||||
CS_PIO_AD .EQU 0xF4
|
||||
CS_PIO_AC .EQU 0xF6
|
||||
|
||||
37
OperatingSystem/monitor_v2/include/beep.s
Normal file
37
OperatingSystem/monitor_v2/include/beep.s
Normal 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
|
||||
@@ -125,7 +125,7 @@ MSG_CLEAR:
|
||||
A_RTS_OFF:
|
||||
ld a,005h ;write into WR0: select WR5
|
||||
out (CS_SIO_A_C),A
|
||||
ld a,068h ;DTR inactiveh, TX 8bit, BREAK off, TX on, RTS inactive
|
||||
ld a,068h ;DTR inactive, TX 8bit, BREAK off, TX on, RTS inactive
|
||||
out (CS_SIO_A_C),A
|
||||
ret
|
||||
A_RTS_ON:
|
||||
|
||||
Reference in New Issue
Block a user