Thanks for everyone for help this code has replaced hardware it’s apart of something I am planning to have fun with (autocorrelation and matched filter)
I have built this project years ago using microcontroller Z80 and a lot of logic integrated circuits