f



BASIC - using VDU in RISC OS 5.22

Hi,
I have built a bare bones serial terminal using BASIC that converts
escape sequences (as far as necessary) that FreeBSD on a Pi Zero
sends back. I am just simulating with VDU commands on this machine
what is actually happening on FreeBSD/csh/termcap/VT100.
While line editing (character by character), there are some helpful
info's sent like /E[7D to say to move/delete 7 chars. All the cursor
keys, ctrl keys, home and end are fine. The messiest job is the delete
to end of line (^K) where I have to provoke the length info I need by
inserting and deleting a character first. ^K seems to be implemented by
the line editor module for our usual F12 methods but I am wondering if I
have missed a VDU method to do this.(!Edit doesn't overstrike with ^K
though, a similar problem). It is not a time critical job (while typing)
so things could be worse.
I tried fathoming out the cursor position stuff from the PRM's but got
nothing useful on the output. Example needed I think.

In general useage I have had to slow the keyboard auto repeat slightly
as holding the space bar down while scrolling with more caused serial
line corruption. I still found some occasional VDU errors, so I am
trying

 REPEAT <serial input/VDU output until no more serial>
  SYS"OS_Byte",218,0,255 TO ,vd%
  IF vd%=0 THEN
  <keyboard input/serial output>
  ENDIF
 UNTIL k%=3

 in the hope that making sure the vdu queue is empty before
doing more work may clean up the problem. (so far so good)

Thanks for any help or tips in this area.
 Ron M.

0
Ron
8/10/2016 1:01:01 AM
comp.sys.acorn.programmer 2499 articles. 0 followers. Post Follow

5 Replies
179 Views

Similar Articles

[PageSpeed] 39

On 10/08/2016 12:43, Ron wrote:
> Hi,
> I have built a bare bones serial terminal using BASIC that converts
> escape sequences (as far as necessary) that FreeBSD on a Pi Zero
> sends back. I am just simulating with VDU commands on this machine
> what is actually happening on FreeBSD/csh/termcap/VT100.

Good stuff.

> While line editing (character by character), there are some helpful
> info's sent like /E[7D to say to move/delete 7 chars. All the cursor
> keys, ctrl keys, home and end are fine. The messiest job is the delete
> to end of line (^K) where I have to provoke the length info I need by
> inserting and deleting a character first. ^K seems to be implemented by
> the line editor module for our usual F12 methods but I am wondering if I
> have missed a VDU method to do this.

VDU 23,8 is ringing a bell (not literally, that's VDU 7).

---druck

0
druck
8/10/2016 8:09:06 PM
In message <nog1lb$cah$1@dont-email.me>
          druck <news@druck.org.uk> wrote:

> On 10/08/2016 12:43, Ron wrote:
> > Hi,
> > I have built a bare bones serial terminal using BASIC that converts
> > escape sequences (as far as necessary) that FreeBSD on a Pi Zero
> > sends back. I am just simulating with VDU commands on this machine
> > what is actually happening on FreeBSD/csh/termcap/VT100.
> 
> Good stuff.
> 
> > While line editing (character by character), there are some helpful
> > info's sent like /E[7D to say to move/delete 7 chars. All the cursor
> > keys, ctrl keys, home and end are fine. The messiest job is the delete
> > to end of line (^K) where I have to provoke the length info I need by
> > inserting and deleting a character first. ^K seems to be implemented by
> > the line editor module for our usual F12 methods but I am wondering if I
> > have missed a VDU method to do this.
> 
> VDU 23,8 is ringing a bell (not literally, that's VDU 7).
> 
> ---druck
> 
I've just had a look in the Zap Taskwindow source, I see that it has an
emulated text window set using VDU 28 (with offsets from the whole TW) 
This possibly explains why a ZapTW will respond to the VDU 11 (upline).
Other editor's TW's are translating only horizontal cmds.
I think the singletasking F12 might be like a blank canvas and allow
most VDU commands to work. 
It may be possible to virtualise vi and other textual programs, but
we already have Nettle and I think you (druck) released a terminal too?

I think the VDU 'delete to end' would only make sense if it deleted to the
end of the text window, (to work on long wrapped cmds) Wether it would
work in all types of F12 TW's would be the thing.

Ron M.
0
Ron
8/11/2016 1:01:01 AM
druck wrote:
> VDU 23,8 is ringing a bell (not literally, that's VDU 7).

Yes, VDU 23,8 - Clear text block:
http://beebwiki.mdfs.net/VDU_23#VDU_23.2C8_-_Clear_block

jgh
0
jgh
8/12/2016 10:00:15 PM
> Yes, VDU 23,8 - Clear text block:
> http://beebwiki.mdfs.net/VDU_23#VDU_23.2C8_-_Clear_block

The documentation isn't very clear, here are some simple examples:
VDU 23,8,5,6|  deletes from the cursor to the end of the same line
VDU 23,8,4,5|  deletes from the start of the line to the cursor
VDU 23,8,4,6|  deletes from the start to the end of the line the cursor is on
VDU 23,8,0,5|  deletes from (0,0) to the cursor position
VDU 23,8,5,10| deletes from cursor position to end of viewport

jgh
0
jgh
8/12/2016 10:11:57 PM
In message <a294a650-aeb9-4e72-b7ff-50f57f825825@googlegroups.com>
          jgh@mdfs.net wrote:

> > Yes, VDU 23,8 - Clear text block:
> > http://beebwiki.mdfs.net/VDU_23#VDU_23.2C8_-_Clear_block
>
> The documentation isn't very clear, here are some simple examples:
> VDU 23,8,5,6|  deletes from the cursor to the end of the same line
> VDU 23,8,4,5|  deletes from the start of the line to the cursor
> VDU 23,8,4,6|  deletes from the start to the end of the line the cursor is on
> VDU 23,8,0,5|  deletes from (0,0) to the cursor position
> VDU 23,8,5,10| deletes from cursor position to end of viewport
>
> jgh

Thank you,I can see that it works in F12 or Wimptask now.
Ron M.
0
Ron
8/14/2016 10:03:18 PM
Reply: