here is how I setup SIO/2, for IM 2 mode interrupts (Receive & Transmit)
SIO_A_TAB:
defb 00011000B ;WR0 Channel reset
defb 00010100B ;Wr0 Pointer R4 + reset ex st int
defb 11000100B ;Wr4 /64, async mode, 1 stop bit, no parity
defb 00000011B ;WR0 Pointer R3
defb 11100001B ;WR3 8 bit, Auto enables, Receive enable
defb 00000101B ;WR0 Pointer R5
defb 11101010B ;WR5 DTR, 8 bit, Transmit enable, RTS
defb 00010001B ;WR0 Pointer R1 + reset ex st int
defb 00011010B ;WR1 interrupt on all RX characters, TX Int enable
SIO_A_END: ;parity error is not a Special Receive condition
SIO_B_TAB:
defb 00011000B ;WR0 Channel reset
defb 00000010B ;WR0 Pointer R2
defb 00010000B ;WR2 interrupt address = 10H
defb 00010100B ;Wr0 Pointer R4 + reset ex st int
defb 11000100B ;Wr4 /64, async mode, 1 stop bit, no parity
defb 00000011B ;WR0 Pointer R3
defb 11000000B ;WR3 8 bit
defb 00000101B ;WR0 Pointer R5
defb 01100000B ;WR5 8 bit
defb 00010001B ;WR0 Pointer R1 + reset ex st int
defb 00000100B ;WR1 no INTS on channel B, status affects INT vector
SIO_B_END: ;INTs: BTX,BE/SC,BRX,BSRC,ATX,AE/SC,ARX,ASRC
;
; SIO (async)
;
; Init SIO
;
ld hl,SIO_A_TAB
ld c,SIO_A_C ;SIO_A
ld b,SIO_A_END-SIO_A_TAB
otir
;HL=SIO_B_TAB
ld c,SIO_B_C ;SIO_B
ld b,SIO_B_END-SIO_B_TAB
otir
;
It works well in my RTM/Z80 system...