Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #317

Re: Serial terminal

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!xlned.com!feeder3.xlned.com!news.astraweb.com!border5.a.newsrouter.astraweb.com!not-for-mail
Subject Re: Serial terminal
Newsgroups comp.sys.acorn.programmer
From James Peacock <j.peacock.news@googlemail.com>
X-Editor EmailEdit 1.36
Date Fri, 20 May 2011 10:35:57 +0100
Message-ID <328146d651.james@iyonix.lan> (permalink)
References <9Oh*KpqDt@news.chiark.greenend.org.uk> <4dd4222b$0$310$14726298@news.sunsite.dk> <-Oh*qMqDt@news.chiark.greenend.org.uk> <9Oh*G0qDt@news.chiark.greenend.org.uk> <4dd5a0ea$0$14694$ba4acef3@reader.news.orange.fr>
User-Agent Messenger-Pro/4.24 (MsgServe/3.27) (RISC-OS/5.17) NewsHound/v1.50-32
Lines 50
Organization Unlimited download news at news.astraweb.com
NNTP-Posting-Host 610c2fa4.news.astraweb.com
X-Trace DXC=;Qai31;LDBUaaSDeVe\e2]L?0kYOcDh@ZBK2jREKf`gZFPCECm<j0<P`a_RdIa<0fR2=Q^RF<K<BTSV;Dl][bJBV8dW9en6T_NVPMG@In4dOUR
Xref x330-a1.tempe.blueboxinc.net comp.sys.acorn.programmer:317

Show key headers only | View raw


Rick Murray wrote:

> On 18/05/2011 23:05, Theo Markettos wrote:
> 
>> Does OS_SerialOp have sensible defaults on later OSs?  It must be a long
>> while since anyone wired an 'Acorn' cable.
> 
> When I wrote my little terminal prog, I loaded and used the serial
> blockdrivers. Not much help to you, I know, but I got fed up of SerialOp
> doing different things to what I expected...

I've used the following to talk to a beagle board's debug terminal 
before. It worked on RISC OS 5, can't test it on anything earlier, 
you'll probably need to remove the 'sleep' in port$ and change 
'Serial1'.

James


port_in%=0
port_out%=0
ON ERROR ON ERROR OFF:PROCclose:PROCerror:END

port$="Devices#sleep;baud=115200;data=8;stop=1;noparity;nohandshake:$.Serial1"
port_in%=OPENIN(port$)
port_out%=OPENOUT(port$)

IF port_in%=0 ERROR 1,"Can't open for input"
IF port_out%=0 ERROR 1,"Can't open for output"

REPEAT
  IF EXT#port_in%=0 THEN
    k% = INKEY(1)
    IF k%>=0 BPUT#port_out%,k%
  ELSE
    PRINT CHR$(BGET#port_in%);
  ENDIF
UNTIL FALSE
END

DEF PROCclose
IF port_in%<>0 CLOSE#port_in%:port_in%=0
IF port_out%<>0 CLOSE#port_out%:port_out%=0
ENDPROC

DEF PROCerror
PRINT "Error: ";REPORT$;" at line ";ERL
ENDPROC

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-18 19:27 +0100
  Re: Serial terminal Alex Macfarlane Smith <nospam@archifishal.co.uk> - 2011-05-18 20:46 +0100
    Re: Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-18 21:04 +0100
      Re: Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-18 22:05 +0100
        Re: Serial terminal Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-05-20 00:59 +0200
          Re: Serial terminal "Ste (news)" <steve@revi11.plus.com> - 2011-05-20 00:43 +0100
          Re: Serial terminal James Peacock <j.peacock.news@googlemail.com> - 2011-05-20 10:35 +0100
            Re: Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-20 17:44 +0100
  Re: Serial terminal jgharston <jgh@arcade.demon.co.uk> - 2011-05-20 01:25 -0700
    Re: Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-20 16:23 +0100

csiph-web