Ok, but just so I am clear, when should I do this? before or after the select?
Code:
.Z80
ASEG
ORG 0100H
.PHASE 0100H
.1797 EQU 0E0H ;Base address
WCTRL EQU .1797+5 ;SASI (Winchester) control/status port
WDATA EQU .1797+6 ;SASI (Winchester) Data port
TEST:
LD A,0FEh ; set Data 0 here ???
OUT (WDATA),A ;
LD A,5
OUT (WCTRL),A ; set the -SEL
IN A,(WCTRL) ; read status
JR TEST ; loop