home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / atari / st / 18648 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.1 KB

  1. Path: sparky!uunet!spool.mu.edu!uwm.edu!zazen!uwrf.edu!ph9991_imm
  2. From: ph9991_imm@rivers.acc.uwrf.edu
  3. Newsgroups: comp.sys.atari.st
  4. Subject: Re: Serial Connection
  5. Message-ID: <1992Dec18.165004.502@rivers>
  6. Date: 18 Dec 92 16:50:04 -0600
  7. References: <H.ea.TbbYu2JZmGM@yonder.equinox.gen.nz>
  8. Organization: University of Wisconsin - River Falls
  9. Lines: 45
  10.  
  11. In article <H.ea.TbbYu2JZmGM@yonder.equinox.gen.nz>, craig@yonder.equinox.gen.nz (Craig Shore) writes:
  12. > This was posted locally by someone without net access, 
  13. >  i'm forwarding it here for him.
  14. > =================================================================
  15. > Path: yonder.equinox.gen.nz!equinox!Mark_Andrews
  16. > From: Mark_Andrews@equinox.gen.nz (Mark Andrews)
  17. > Newsgroups: equinox.atari
  18. > Subject: Serial connection.
  19. > Distribution: world
  20. > Message-ID: <Mark_Andrews.5tyk@equinox.gen.nz>
  21. > Date: 17 Dec 92 17:02:43 +1200
  22. > Organization: Equinox Networks
  23. > A complete stranger came up to me today and asked me how to access the
  24. > serial port on an Atari using GW Basic.  Not surprising I didn't know, but
  25. > I thought someone here might be able to help.
  26. > Aparently he wants to connect some sort of relay device to his RS-232 port,
  27. > he has a prgram written in GW Basic for use on an IBM.  It does something
  28. > like:
  29. > OPEN comms1
  30. > What is the equivilent device name for the Atari or will he have to be
  31. > crude and poke at addresses?
  32.  
  33.   If he's planning on using ST basic, (but this should work in other
  34. dialects) use this statement:
  35. OPEN "O",filenumber,"AUX:"
  36. where the "O" represents Output file, filenumber is an integer number used
  37. to identify the file. If he plans on inputting data, use "I" instead.
  38.  
  39. Another way to do this in ST basic is to use the INP and OUT statements.
  40. OUT 1,N% will output a byte (if 0<=N%<=255) to the RS-232 port. To read the
  41. port use
  42. IREADY%=INP(-1) 
  43. if the value is .not. zero there is a byte available and then use 
  44. IDATA%=INP(1)
  45. to get the byte. if you do not use the IREADY%
  46. check, THE SYSTEM WILL HANG until there is a byte available. (This disables
  47. any keyboard [Ctrl-C] or AES events)
  48.  
  49. Larry Imm
  50. --
  51. larry.o.imm@uwrf.edu
  52.