News for hackers. Stuff that matters.
Re:Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 ... by nicklaf on Sunday July 02, 2017 @07:48PM (#14684927)
Some people still care! Chuck Moore's colorForth has this inplementation of an IDE driver in just five lines of code:

  bsy 1f7 p@ 80 and if bsy ; then ; 
  rdy  1f7 p@ 8 and if 1f0 a! 256 ; then rdy ; 
  sector 1f3 a! swap p!+ /8 p!+ /8 p!+ /8 e0 or p!+ drop p!+ drop 4 * ; 
  read 20 sector 256 for rdy insw next drop ; 
  write bsy 30 sector 25 6 for rdy outsw next drop ;
comments

  p@ read 8-bit port 
  p!+ write 8-bit port, increment port 
  insw read n words from port 
  outsw write n words to port 
  /8 shift right 8 bits
  bsy wait till busy bit clear 
  rdy wait till data-ready bit set 
  sector set logical sector and command 
  read read 256 sectors 
  write write 256 sectors
https://web.archive.org/web/20160304043631/http://www.colorf...

There are no comments on this comment yet.