home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 December / Ahoy_Magazine_85-12_1985_Double_L.d64 / commhs (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  501b  |  20 lines

  1. 0 rem << commhs - handshake with ibm
  2. 1 rem - commodore program -
  3. 2 rem     -- commhs --
  4. 3 rem rupert report #24
  5. 4 rem the ibm connection
  6. 5 rem
  7. 9 rem 1200 baud, 8 bits/chr, 1 stop bit, no parity
  8. 10 open 2,2,0,chr$(8)+chr$(0)
  9. 20 cr$=chr$(13)
  10. 25 rem  clear the receive buffer
  11. 30 get#2,r$ : if st<>8 or st<>0 then 30
  12. 35 rem  =-=  main loop  =-=
  13. 40 get#2,r$ : if r$="" then 40
  14. 50 m$=m$+r$
  15. 60 print r$;: if r$=cr$ then gosub 80
  16. 70 goto 40
  17. 75 rem - transmit handshake message -
  18. 80 t$="message #"+str$(val(m$))+" received"
  19. 90 print#2,t$ : m$="" : return
  20.