well i have two calc one runs CheckServer while the other runs CheckHost
When executed Check host routine executes and then exits while the CheckServer routine gets stuck at CheckServer1.
Any idea to why this is happening??? Am i checking the right bits???
Code: Select all
CheckServer:
ld a,3 ; Set tip low, ring low
out (0),a
CheckServer1:
in a,(0)
bit 0,a ; Check tip
jr z,CheckServer1 ;tip is not yet high wait till high
jp exit
CheckHost:
in a,(0)
bit 0,a ; Check tip
jr nz,CheckHost ;wait till low
CheckHost1:
ld a,2 ; Set tip high, ring low
out (0),a
jp exit