Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"A dirty mind is a joy forever." -- Randy Kunkee


devel / comp.sys.acorn.programmer / Re: Problem returning from WGET from within an assembler prog

SubjectAuthor
* Problem returning from WGET from within an assembler progBob Latham
`* Re: Problem returning from WGET from within an assembler progBob Latham
 +* Re: Problem returning from WGET from within an assembler progHarriet Bazley
 |+- Re: Problem returning from WGET from within an assembler progBob Latham
 |`* Re: Problem returning from WGET from within an assembler progBob Latham
 | +* Re: Problem returning from WGET from within an assembler progSteve Fryatt
 | |`* Re: Problem returning from WGET from within an assembler progBob Latham
 | | +* Re: Problem returning from WGET from within an assembler progKevin Wells
 | | |+* Re: Problem returning from WGET from within an assembler progDavid Higton
 | | ||`- Re: Problem returning from WGET from within an assembler progBob Latham
 | | |`* Re: Problem returning from WGET from within an assembler progBob Latham
 | | | `* Re: Problem returning from WGET from within an assembler progKevin Wells
 | | |  `- Re: Problem returning from WGET from within an assembler progKevin Wells
 | | `* Re: Problem returning from WGET from within an assembler progHarriet Bazley
 | |  +- Re: Problem returning from WGET from within an assembler progBob Latham
 | |  `- Re: Problem returning from WGET from within an assembler progdruck
 | `* Re: Problem returning from WGET from within an assembler progTheo
 |  `- Re: Problem returning from WGET from within an assembler progBob Latham
 `* Re: Problem returning from WGET from within an assembler progSteve Fryatt
  `- Re: Problem returning from WGET from within an assembler progBob Latham

1
Problem returning from WGET from within an assembler prog

<59d5e28a96bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=111&group=comp.sys.acorn.programmer#111

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Problem returning from WGET from within an assembler prog
Date: Fri, 08 Apr 2022 12:07:09 +0100
Organization: None
Lines: 23
Message-ID: <59d5e28a96bob@sick-of-spam.invalid>
X-Trace: individual.net AYoP9R/9GRvDqq20f62ttgj5b6zYa2jIN3T0cMtvqg2p7V3IQl
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:6yX7GBtevNrkjUVtdFcNH6bPrHA=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Fri, 8 Apr 2022 11:07 UTC

Hi,

I've written a program that works as two separate chunks but I cannot
find a way to add the chunks together.

My little program (assembler and not wimp) firstly uses WGET to down
load a file from the interweb. This is done in a subroutine where SWI
"OS_CLI" R0 points at a string with WGET in it and the file downloads
no problem. When it returns from the subroutine, the program then
*should* use the downloaded data to produce another angle on the data.

The two parts work fine apart but I can't join them together. It's
that the cpu isn't returning from the subroutine in the way I
expected and seems determined to stop the whole thing with "press
space bar" etc. it will not carry on with my program.

I know there is something I'm not understanding here, could someone
enlighten me please.

Thanks.

Bob.

Re: Problem returning from WGET from within an assembler prog

<59d600739fbob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=113&group=comp.sys.acorn.programmer#113

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Fri, 08 Apr 2022 17:33:51 +0100
Organization: None
Lines: 13
Message-ID: <59d600739fbob@sick-of-spam.invalid>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org>
X-Trace: individual.net 27Xg0bCFH6A09EC7t41xQQii94NRDTLuJTnydvRUNxz4QwyS3Y
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:mtHK5XoyYU2qslDTXMF9Kkk0Pyg=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Fri, 8 Apr 2022 16:33 UTC

In article <t2p8ka$1db3$1@gioia.aioe.org>,
Steve Drain <steve@kappa.me.uk> wrote:

> I woud guess Wimp_StartTask rather OS_CLI to avoid overwriting
> your application space.

Thanks Steve. That gives me something to read up about.

I don't understand what overwrites the application space though.

Bob.

Re: Problem returning from WGET from within an assembler prog

<6a8503d659.harriet@bazleyfamily.co.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=114&group=comp.sys.acorn.programmer#114

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: harriet@bazleyfamily.co.uk (Harriet Bazley)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Fri, 08 Apr 2022 18:07:23 +0100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <6a8503d659.harriet@bazleyfamily.co.uk>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid>
Injection-Info: reader02.eternal-september.org; posting-host="51d3ad1f09e25813f6f76f3aebdecf66";
logging-data="16567"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SVjIjHf4iaz0wxU1AVlLWH5D1pN5wvs4="
User-Agent: Messenger-Pro/8.04 (MsgServe/8.04) (RISC-OS/5.29) NewsHound/v1.53-32 RC1
Cancel-Lock: sha1:z9lZQJpSFOtxIMU+CHYFaX9DDqs=
X-Clacks-Overhead: GNU Terry Pratchett
 by: Harriet Bazley - Fri, 8 Apr 2022 17:07 UTC

On 8 Apr 2022 as I do recall,
Bob Latham wrote:

> In article <t2p8ka$1db3$1@gioia.aioe.org>,
> Steve Drain <steve@kappa.me.uk> wrote:
>
> > I woud guess Wimp_StartTask rather OS_CLI to avoid overwriting
> > your application space.
>
> Thanks Steve. That gives me something to read up about.
>
> I don't understand what overwrites the application space though.

As I understand it, when you use OSCLI to start a new application
directly then control never returns to the original program - you are
executing the equivalent of a GOTO rather than a PROC.

(Unless, apparently, you have a 'quit handler':
http://www.verycomputer.com/24_f48d3602910d170e_1.htm )

Wimp_StartTask launches it as an independent task with its own Wimpslot,
etc (although it also means that your program won't wait for this new
task to return before continuing on with its own next instruction - and
in the case of a wget command, I imagine that the result might
potentially take quite a while).

--
Harriet Bazley == Loyaulte me lie ==

Abstinence makes the heart grow fonder.

Re: Problem returning from WGET from within an assembler prog

<mpro.ra19d101wzpa503r2.news@stevefryatt.org.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=115&group=comp.sys.acorn.programmer#115

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!aioe.org!wUBOHGVSkkz9PTvSBH1HKg.user.46.165.242.75.POSTED!not-for-mail
From: news@stevefryatt.org.uk (Steve Fryatt)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Fri, 8 Apr 2022 19:15:06 +0100
Organization: Aioe.org NNTP Server
Lines: 30
Message-ID: <mpro.ra19d101wzpa503r2.news@stevefryatt.org.uk>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org>
<59d600739fbob@sick-of-spam.invalid>
Content-Type: text/plain; charset=us-ascii
Injection-Info: gioia.aioe.org; logging-data="15775"; posting-host="wUBOHGVSkkz9PTvSBH1HKg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Messenger-Pro/2.73.6.4252 (Qt/5.12.8) (Linux-x86_64)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Steve Fryatt - Fri, 8 Apr 2022 18:15 UTC

On 8 Apr, Bob Latham wrote in message
<59d600739fbob@sick-of-spam.invalid>:

> In article <t2p8ka$1db3$1@gioia.aioe.org>,
> Steve Drain <steve@kappa.me.uk> wrote:
>
> > I woud guess Wimp_StartTask rather OS_CLI to avoid overwriting
> > your application space.
>
> Thanks Steve. That gives me something to read up about.
>
> I don't understand what overwrites the application space though.

WGet, which is an application that you've just started in application space.

RISC OS is a single tasking operating system with a thin veneer of fake
multi-tasking applied on top by the Wimp. As far as all of the non-Wimp bits
of the OS are concerned, applications reside at 0x8000. Since there can only
be one application at 0x8000 at a time, the act of launching WGet overwrites
and completely obliterates your application. This is why the subroutine can
never return: by that point, your application doesn't exist any more.

As Harriet notes, there are some messy work-arounds: either the old
Arthur-era one of shifting memory around, or the RISC OS-era one of passing
the problem to the Wimp.

--
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/

Re: Problem returning from WGET from within an assembler prog

<59d60e89e5bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=116&group=comp.sys.acorn.programmer#116

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!paganini.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Fri, 08 Apr 2022 20:07:43 +0100
Organization: None
Lines: 25
Message-ID: <59d60e89e5bob@sick-of-spam.invalid>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid> <mpro.ra19d101wzpa503r2.news@stevefryatt.org.uk>
X-Trace: individual.net 1Dud+DlaoQ1Y3/2SEj+CkQnDoUbXcrfhQxksT1S6bxG+0ixrxh
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:4j33cMnm4BVjwVSp/Ut4niOusTA=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Fri, 8 Apr 2022 19:07 UTC

In article <mpro.ra19d101wzpa503r2.news@stevefryatt.org.uk>,
Steve Fryatt <news@stevefryatt.org.uk> wrote:

> WGet, which is an application that you've just started in
> application space.

> RISC OS is a single tasking operating system with a thin veneer of
> fake multi-tasking applied on top by the Wimp. As far as all of the
> non-Wimp bits of the OS are concerned, applications reside at
> 0x8000. Since there can only be one application at 0x8000 at a
> time, the act of launching WGet overwrites and completely
> obliterates your application. This is why the subroutine can never
> return: by that point, your application doesn't exist any more.

> As Harriet notes, there are some messy work-arounds: either the old
> Arthur-era one of shifting memory around, or the RISC OS-era one of
> passing the problem to the Wimp.

Thanks Steve,

Much appreciated.

Bob.

Re: Problem returning from WGET from within an assembler prog

<59d60e593dbob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=117&group=comp.sys.acorn.programmer#117

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Fri, 08 Apr 2022 20:05:39 +0100
Organization: None
Lines: 23
Message-ID: <59d60e593dbob@sick-of-spam.invalid>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid> <6a8503d659.harriet@bazleyfamily.co.uk>
X-Trace: individual.net QNs7BmXQDEPiRm9gvJseMQD6+5Mbtrorp9DzDOwt1D9Vqo6S1x
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:3bkQn13KwR07zeIaNv5fcSPDCek=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Fri, 8 Apr 2022 19:05 UTC

In article <6a8503d659.harriet@bazleyfamily.co.uk>,
Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:

> As I understand it, when you use OSCLI to start a new application
> directly then control never returns to the original program - you
> are executing the equivalent of a GOTO rather than a PROC.

> (Unless, apparently, you have a 'quit handler':
> http://www.verycomputer.com/24_f48d3602910d170e_1.htm )

> Wimp_StartTask launches it as an independent task with its own
> Wimpslot, etc (although it also means that your program won't wait
> for this new task to return before continuing on with its own next
> instruction - and in the case of a wget command, I imagine that the
> result might potentially take quite a while).

Thanks for that. I really have got something to chew on now.

Cheers,

Bob.

Re: Problem returning from WGET from within an assembler prog

<59d6672366bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=118&group=comp.sys.acorn.programmer#118

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sat, 09 Apr 2022 12:15:28 +0100
Organization: None
Lines: 20
Message-ID: <59d6672366bob@sick-of-spam.invalid>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid> <6a8503d659.harriet@bazleyfamily.co.uk>
X-Trace: individual.net nbLeJ0+T4tl2OxXSSJq6/gD30f5bQZ0yBqCm7htfohM9/RcLpw
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:r1xj/wY97T1J1xffaKew6a2E98E=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sat, 9 Apr 2022 11:15 UTC

In article <6a8503d659.harriet@bazleyfamily.co.uk>,
Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:

> Wimp_StartTask launches it as an independent task with its own
> Wimpslot, etc (although it also means that your program won't wait
> for this new task to return before continuing on with its own next
> instruction - and in the case of a wget command, I imagine that the
> result might potentially take quite a while).

Naively I tried this with fingers crossed.

I get an error..

'Invalid Wimp operation in this context.'

Clearly this is way beyond my understanding.

Bob.

Re: Problem returning from WGET from within an assembler prog

<mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=119&group=comp.sys.acorn.programmer#119

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!aioe.org!wUBOHGVSkkz9PTvSBH1HKg.user.46.165.242.75.POSTED!not-for-mail
From: news@stevefryatt.org.uk (Steve Fryatt)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sat, 9 Apr 2022 14:10:44 +0100
Organization: Aioe.org NNTP Server
Lines: 22
Message-ID: <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org>
<59d600739fbob@sick-of-spam.invalid> <6a8503d659.harriet@bazleyfamily.co.uk>
<59d6672366bob@sick-of-spam.invalid>
Content-Type: text/plain; charset=us-ascii
Injection-Info: gioia.aioe.org; logging-data="28996"; posting-host="wUBOHGVSkkz9PTvSBH1HKg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Messenger-Pro/2.73.6.4252 (Qt/5.12.8) (Linux-x86_64)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Steve Fryatt - Sat, 9 Apr 2022 13:10 UTC

On 9 Apr, Bob Latham wrote in message
<59d6672366bob@sick-of-spam.invalid>:

> 'Invalid Wimp operation in this context.'

Ah. Wimp_StartTask must be called from a Wimp application which is already
calling Wimp_Poll.

I think your options are either to look at the Arthur way of doing stuff
(fiddle with the environment and shift things around in memory) or do
without WGet.

If you're using RISC OS 5, could you use the built-in HTTP fetcher? As a
module called by SWIs, that might run as part of your application (I don't
know; I've not looked at how it works, so I'm not sure if it expects to be
called from a polling application or not). If so, that would sidestep the
problem of launching a separate task to do the fetching.

--
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/

Re: Problem returning from WGET from within an assembler prog

<RJg*ahgLy@news.chiark.greenend.org.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=120&group=comp.sys.acorn.programmer#120

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!aioe.org!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED!not-for-mail
From: theom+news@chiark.greenend.org.uk (Theo)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: 09 Apr 2022 14:15:47 +0100 (BST)
Organization: University of Cambridge, England
Lines: 26
Message-ID: <RJg*ahgLy@news.chiark.greenend.org.uk>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid> <6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid>
NNTP-Posting-Host: chiark.greenend.org.uk
X-Trace: chiark.greenend.org.uk 1649510149 6218 212.13.197.229 (9 Apr 2022 13:15:49 GMT)
X-Complaints-To: abuse@chiark.greenend.org.uk
NNTP-Posting-Date: Sat, 9 Apr 2022 13:15:49 +0000 (UTC)
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/3.16.0-11-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Sat, 9 Apr 2022 13:15 UTC

Bob Latham <bob@sick-of-spam.invalid> wrote:
> In article <6a8503d659.harriet@bazleyfamily.co.uk>,
> Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:
>
> > Wimp_StartTask launches it as an independent task with its own
> > Wimpslot, etc (although it also means that your program won't wait
> > for this new task to return before continuing on with its own next
> > instruction - and in the case of a wget command, I imagine that the
> > result might potentially take quite a while).
>
> Naively I tried this with fingers crossed.
>
> I get an error..
>
> 'Invalid Wimp operation in this context.'
>
>
> Clearly this is way beyond my understanding.

Wimp_StartTask only works if you're already in a Wimp task. That might be a
desktop app, or a command line app running in a TaskWindow. If you are
outside the desktop the Wimp isn't running so you can't launch other tasks.

Try your code in a Taskwindow?

Theo

Re: Problem returning from WGET from within an assembler prog

<59d68649a5bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=121&group=comp.sys.acorn.programmer#121

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sat, 09 Apr 2022 17:55:42 +0100
Organization: None
Lines: 33
Message-ID: <59d68649a5bob@sick-of-spam.invalid>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid> <6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>
X-Trace: individual.net km8JG3+rxeYJQu3v+Q+aLwWJQl4Vi3UNWXoISWt3I8pGZsW9tD
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:nm6zxIVRTTRzw4yjS4ErQmHloZA=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sat, 9 Apr 2022 16:55 UTC

In article <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>,
Steve Fryatt <news@stevefryatt.org.uk> wrote:
> On 9 Apr, Bob Latham wrote in message
> <59d6672366bob@sick-of-spam.invalid>:

> > 'Invalid Wimp operation in this context.'

> Ah. Wimp_StartTask must be called from a Wimp application which is
> already calling Wimp_Poll.

> I think your options are either to look at the Arthur way of doing
> stuff (fiddle with the environment and shift things around in
> memory) or do without WGet.

> If you're using RISC OS 5, could you use the built-in HTTP fetcher?
> As a module called by SWIs, that might run as part of your
> application (I don't know; I've not looked at how it works, so I'm
> not sure if it expects to be called from a polling application or
> not). If so, that would sidestep the problem of launching a
> separate task to do the fetching.

Thanks Steve.

I did look into that but quickly realised this is beyond my baby
steps.

Must admit, it surprises me that fetching a file from the net is so
difficult to do.

Thanks again.

Bob.

Re: Problem returning from WGET from within an assembler prog

<59d6865a36bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=122&group=comp.sys.acorn.programmer#122

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sat, 09 Apr 2022 17:56:26 +0100
Organization: None
Lines: 37
Message-ID: <59d6865a36bob@sick-of-spam.invalid>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid> <6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <RJg*ahgLy@news.chiark.greenend.org.uk>
X-Trace: individual.net tf9/n6A9kYazxNDqsB2d3woSygjuNokQyse7vWRhGCqgEZlhjY
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:ShfexLu+nM9JEHh+/qEOqhFsv7A=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sat, 9 Apr 2022 16:56 UTC

In article <RJg*ahgLy@news.chiark.greenend.org.uk>,
Theo <theom+news@chiark.greenend.org.uk> wrote:
> Bob Latham <bob@sick-of-spam.invalid> wrote:
> > In article <6a8503d659.harriet@bazleyfamily.co.uk>,
> > Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:
> >
> > > Wimp_StartTask launches it as an independent task with its own
> > > Wimpslot, etc (although it also means that your program won't wait
> > > for this new task to return before continuing on with its own next
> > > instruction - and in the case of a wget command, I imagine that the
> > > result might potentially take quite a while).
> >
> > Naively I tried this with fingers crossed.
> >
> > I get an error..
> >
> > 'Invalid Wimp operation in this context.'
> >
> >
> > Clearly this is way beyond my understanding.

> Wimp_StartTask only works if you're already in a Wimp task. That
> might be a desktop app, or a command line app running in a
> TaskWindow. If you are outside the desktop the Wimp isn't running
> so you can't launch other tasks.

> Try your code in a Taskwindow?

Thanks for the information.

Cheers,

Bob.

> Theo

Re: Problem returning from WGET from within an assembler prog

<13d593d659.Kevin@Kevsoft>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=123&group=comp.sys.acorn.programmer#123

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!aioe.org!yBIfwlcYvPp0VbqA9SeaOg.user.46.165.242.75.POSTED!not-for-mail
From: kev@kevsoft.co.uk (Kevin Wells)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sat, 09 Apr 2022 20:23:39 +0100
Organization: Aioe.org NNTP Server
Lines: 50
Message-ID: <13d593d659.Kevin@Kevsoft>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid>
<6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>
<59d68649a5bob@sick-of-spam.invalid>
Injection-Info: gioia.aioe.org; logging-data="52766"; posting-host="yBIfwlcYvPp0VbqA9SeaOg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Messenger-Pro/8.05wpb1 (MsgServe/8.05) (RISC-OS/5.29) NewsHound/v1.52-32
X-Notice: Filtered by postfilter v. 0.9.2
 by: Kevin Wells - Sat, 9 Apr 2022 19:23 UTC

In message <59d68649a5bob@sick-of-spam.invalid>
Bob Latham <bob@sick-of-spam.invalid> wrote:

>In article <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>,
> Steve Fryatt <news@stevefryatt.org.uk> wrote:
>> On 9 Apr, Bob Latham wrote in message
>> <59d6672366bob@sick-of-spam.invalid>:
>
>> > 'Invalid Wimp operation in this context.'
>
>> Ah. Wimp_StartTask must be called from a Wimp application which is
>> already calling Wimp_Poll.
>
>> I think your options are either to look at the Arthur way of doing
>> stuff (fiddle with the environment and shift things around in
>> memory) or do without WGet.
>
>> If you're using RISC OS 5, could you use the built-in HTTP fetcher?
>> As a module called by SWIs, that might run as part of your
>> application (I don't know; I've not looked at how it works, so I'm
>> not sure if it expects to be called from a polling application or
>> not). If so, that would sidestep the problem of launching a
>> separate task to do the fetching.
>
>Thanks Steve.
>
>I did look into that but quickly realised this is beyond my baby
>steps.
>
>Must admit, it surprises me that fetching a file from the net is so
>difficult to do.

From BASIC wget is easy to fetch files from the internet I use the
followiong:

SYS "Wimp_StartTask", "wget ...

Whilst fetching the computer is single tasking,
>
>Thanks again.
>
>Bob.
>

--
Kev Wells
http://kevsoft.co.uk/ https://ko-fi.com/kevsoft
carpe cervisium
24 hours in a day and 24 beers in a case. Hmmm..

Re: Problem returning from WGET from within an assembler prog

<44569fd659.DaveMeUK@BeagleBoard-xM>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=124&group=comp.sys.acorn.programmer#124

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dave@davehigton.me.uk (David Higton)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sat, 09 Apr 2022 22:29:18 +0100
Organization: Home
Lines: 51
Message-ID: <44569fd659.DaveMeUK@BeagleBoard-xM>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid>
<6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>
<59d68649a5bob@sick-of-spam.invalid> <13d593d659.Kevin@Kevsoft>
Injection-Info: reader02.eternal-september.org; posting-host="fecfd7079ce9f7f5fdf3aa2171b7366b";
logging-data="2604"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183+nvrCo0Nq+d24pqLZ7HaAy0LBg3enPo="
User-Agent: Messenger-Pro/8.03 (MsgServe/8.01) (RISC-OS/5.29) NewsHound/v1.54
Cancel-Lock: sha1:PpNEq3pd/rjdU8EEgozvgb8bJ5A=
 by: David Higton - Sat, 9 Apr 2022 21:29 UTC

In message <13d593d659.Kevin@Kevsoft>
Kevin Wells <kev@kevsoft.co.uk> wrote:

> In message <59d68649a5bob@sick-of-spam.invalid>
> Bob Latham <bob@sick-of-spam.invalid> wrote:
>
> > In article <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>,
> > Steve Fryatt <news@stevefryatt.org.uk> wrote:
> > > On 9 Apr, Bob Latham wrote in message
> > > <59d6672366bob@sick-of-spam.invalid>:
> >
> > > > 'Invalid Wimp operation in this context.'
> >
> > > Ah. Wimp_StartTask must be called from a Wimp application which is
> > > already calling Wimp_Poll.
> >
> > > I think your options are either to look at the Arthur way of doing
> > > stuff (fiddle with the environment and shift things around in memory)
> > > or do without WGet.
> >
> > > If you're using RISC OS 5, could you use the built-in HTTP fetcher? As
> > > a module called by SWIs, that might run as part of your application (I
> > > don't know; I've not looked at how it works, so I'm not sure if it
> > > expects to be called from a polling application or not). If so, that
> > > would sidestep the problem of launching a separate task to do the
> > > fetching.
> >
> > Thanks Steve.
> >
> > I did look into that but quickly realised this is beyond my baby steps.
> >
> > Must admit, it surprises me that fetching a file from the net is so
> > difficult to do.
>
> From BASIC wget is easy to fetch files from the internet I use the
> followiong:
>
> SYS "Wimp_StartTask", "wget ...
>
> Whilst fetching the computer is single tasking,

Similarly, my UpdCaCert app launches curl by means of Wimp_StartTask,
and the resukt single-tasks for a few seconds.

So it's not difficult, really, but you do need to know some important
bits of information. One is that you can't do Wimp operations except
from a registered Wimp task; another is that, in most cases, you can't
just do *OSCLI for an app because the new app will wipe out the app that
launched it.

David

Re: Problem returning from WGET from within an assembler prog

<59d6dc7625bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=125&group=comp.sys.acorn.programmer#125

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sun, 10 Apr 2022 09:36:57 +0100
Organization: None
Lines: 23
Message-ID: <59d6dc7625bob@sick-of-spam.invalid>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid> <6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk> <59d68649a5bob@sick-of-spam.invalid> <13d593d659.Kevin@Kevsoft>
X-Trace: individual.net xgFPt+mGSqiyPlGM2G06gAn+pQhZddbt3IEtn8J81ECXjyVX7t
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:MKVFmRH6F3NhAPeKnvQmZpxcgnk=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 10 Apr 2022 08:36 UTC

In article <13d593d659.Kevin@Kevsoft>,
Kevin Wells <kev@kevsoft.co.uk> wrote:

> >In article <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>,
> > Steve Fryatt <news@stevefryatt.org.uk> wrote:

> >> Ah. Wimp_StartTask must be called from a Wimp application which
> >> is already calling Wimp_Poll.

> From BASIC wget is easy to fetch files from the internet I use the
> followiong:

> SYS "Wimp_StartTask", "wget ...

> Whilst fetching the computer is single tasking,

When you say "Basic", I'm starting to think you mean a full wimp
application written in Basic?

Thanks.

Bob.

Re: Problem returning from WGET from within an assembler prog

<59d6dca04abob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=126&group=comp.sys.acorn.programmer#126

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sun, 10 Apr 2022 09:38:45 +0100
Organization: None
Lines: 15
Message-ID: <59d6dca04abob@sick-of-spam.invalid>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid> <6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk> <59d68649a5bob@sick-of-spam.invalid> <13d593d659.Kevin@Kevsoft> <44569fd659.DaveMeUK@BeagleBoard-xM>
X-Trace: individual.net KpDSerM2OsJHO+tb55/npQuU7VcEsXu/0S0G3dgdL5WFeEEkq6
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:zNLnLbT5JLglN5+9IEzSBLAhGlI=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 10 Apr 2022 08:38 UTC

In article <44569fd659.DaveMeUK@BeagleBoard-xM>,
David Higton <dave@davehigton.me.uk> wrote:

> So it's not difficult, really, but you do need to know some
> important bits of information. One is that you can't do Wimp
> operations except from a registered Wimp task; another is that, in
> most cases, you can't just do *OSCLI for an app because the new app
> will wipe out the app that launched it.

So I've learned painfully this week. :-)

Thanks.

Bob.

Re: Problem returning from WGET from within an assembler prog

<0436efd659.harriet@bazleyfamily.co.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=127&group=comp.sys.acorn.programmer#127

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: harriet@bazleyfamily.co.uk (Harriet Bazley)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sun, 10 Apr 2022 13:01:45 +0100
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <0436efd659.harriet@bazleyfamily.co.uk>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid>
<6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>
<59d68649a5bob@sick-of-spam.invalid>
Injection-Info: reader02.eternal-september.org; posting-host="51ed255d264706d15a04de4b08676b9c";
logging-data="12848"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2SzzEib3xqPK6z8ef1KzH4hk1wuvs170="
User-Agent: Messenger-Pro/8.04 (MsgServe/8.04) (RISC-OS/5.29) NewsHound/v1.53-32 RC1
Cancel-Lock: sha1:ox9a3NKX7iXSyfQGiJZYyIXxaSA=
X-Clacks-Overhead: GNU Terry Pratchett
 by: Harriet Bazley - Sun, 10 Apr 2022 12:01 UTC

On 9 Apr 2022 as I do recall,
Bob Latham wrote:

[snip]

> Must admit, it surprises me that fetching a file from the net is so
> difficult to do.
>
Doesn't surprise me - fetching a file across the Internet is an order of
complexity above fetching a file from the local hard disc, and in
addition you're launching an external application in order to do it,
which is quite a lot for a small assembler routine to handle....

You originally said that you had two separate working routines but
simply couldn't seem to paste them together - would it not be possible
to have a 'parent' BASIC file that could call them both in succession?

(Registering yourself as a WIMP task is not in fact that complicated,
and I don't think your program actually needs to implement a Wimp_Poll
loop if it is single-tasking and not attempting to interact with the
desktop in any way - I seem to remember writing some pretty crude
software that just called Wimp_Initialise claiming to be a RISC OS 2
application, executed a few lines of BASIC and then quit.)

--
Harriet Bazley == Loyaulte me lie ==

We prefer to speak evil of ourselves than not speak of ourselves at all.

Re: Problem returning from WGET from within an assembler prog

<59d6f26222bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=128&group=comp.sys.acorn.programmer#128

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sun, 10 Apr 2022 13:36:24 +0100
Organization: None
Lines: 32
Message-ID: <59d6f26222bob@sick-of-spam.invalid>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid> <6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk> <59d68649a5bob@sick-of-spam.invalid> <0436efd659.harriet@bazleyfamily.co.uk>
X-Trace: individual.net SIhFt33cHXARpKFR153WFAK11FOPda+88baqPVDvcMl+WGL+4t
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:aWhjM3+DTRU2oJ3HLyD4AMUJaL4=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 10 Apr 2022 12:36 UTC

In article <0436efd659.harriet@bazleyfamily.co.uk>,
Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:

> You originally said that you had two separate working routines but
> simply couldn't seem to paste them together - would it not be
> possible to have a 'parent' BASIC file that could call them both in
> succession?

Possibly.

> (Registering yourself as a WIMP task is not in fact that
> complicated, and I don't think your program actually needs to
> implement a Wimp_Poll loop if it is single-tasking and not
> attempting to interact with the desktop in any way -

Interesting.

> I seem to remember writing some pretty crude software that just
> called Wimp_Initialise claiming to be a RISC OS 2 application,
> executed a few lines of BASIC and then quit.)

Okay, thanks for that. I have written full wimp apps in Basic and in
assembler, I can do it but didn't feel it was needed for a simple
data grab from an html file.

Your half way idea looks promising.

Thanks.

Bob.

Re: Problem returning from WGET from within an assembler prog

<ad97efd659.Kevin@Kevsoft>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=129&group=comp.sys.acorn.programmer#129

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.freedyn.de!aioe.org!yBIfwlcYvPp0VbqA9SeaOg.user.46.165.242.75.POSTED!not-for-mail
From: kev@kevsoft.co.uk (Kevin Wells)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Sun, 10 Apr 2022 13:05:55 +0100
Organization: Aioe.org NNTP Server
Lines: 40
Message-ID: <ad97efd659.Kevin@Kevsoft>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid>
<6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>
<59d68649a5bob@sick-of-spam.invalid> <13d593d659.Kevin@Kevsoft> <59d6dc7625bob@sick-of-spam.invalid>
Injection-Info: gioia.aioe.org; logging-data="14768"; posting-host="yBIfwlcYvPp0VbqA9SeaOg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Messenger-Pro/8.05wpb1 (MsgServe/8.05) (RISC-OS/5.29) NewsHound/v1.52-32
X-Notice: Filtered by postfilter v. 0.9.2
 by: Kevin Wells - Sun, 10 Apr 2022 12:05 UTC

In message <59d6dc7625bob@sick-of-spam.invalid>
Bob Latham <bob@sick-of-spam.invalid> wrote:

>In article <13d593d659.Kevin@Kevsoft>,
> Kevin Wells <kev@kevsoft.co.uk> wrote:
>
>> >In article <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>,
>> > Steve Fryatt <news@stevefryatt.org.uk> wrote:
>
>> >> Ah. Wimp_StartTask must be called from a Wimp application which
>> >> is already calling Wimp_Poll.
>
>> From BASIC wget is easy to fetch files from the internet I use the
>> followiong:
>
>> SYS "Wimp_StartTask", "wget ...
>
>> Whilst fetching the computer is single tasking,
>
>When you say "Basic", I'm starting to think you mean a full wimp
>application written in Basic?

Yes under DR Wimp

Another method I used in my QrCode application is to create an Obey file
with just wget ... in it file typed as FEB so that I can have more than
256 characters in it. If going down that route then anything with a % in
it will need %%
>
>Thanks.
>
>Bob.
>

--
Kev Wells
http://kevsoft.co.uk/ https://ko-fi.com/kevsoft
carpe cervisium
O it's Tommy this, an' Tommy that, an' " Tommy, go away " ;

Re: Problem returning from WGET from within an assembler prog

<t318na$g22$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=130&group=comp.sys.acorn.programmer#130

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: news@druck.org.uk (druck)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Mon, 11 Apr 2022 13:59:19 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <t318na$g22$1@dont-email.me>
References: <59d5e28a96bob@sick-of-spam.invalid>
<t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid>
<6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid>
<mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>
<59d68649a5bob@sick-of-spam.invalid> <0436efd659.harriet@bazleyfamily.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 11 Apr 2022 12:59:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e141580d2844739d97ef720932cea96b";
logging-data="16450"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FTbmHHYug7jEvs+W0zpJl"
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Cancel-Lock: sha1:X6luMHDmUKxL3a4IRLv8AMEWjW0=
In-Reply-To: <0436efd659.harriet@bazleyfamily.co.uk>
X-Antivirus-Status: Clean
Content-Language: en-GB
X-Antivirus: Avast (VPS 220411-2, 11/4/2022), Outbound message
 by: druck - Mon, 11 Apr 2022 12:59 UTC

On 10/04/2022 13:01, Harriet Bazley wrote:
> Doesn't surprise me - fetching a file across the Internet is an order of
> complexity above fetching a file from the local hard disc, and in
> addition you're launching an external application in order to do it,
> which is quite a lot for a small assembler routine to handle....

Classic wrong tool for the job. It Python it is one line of code using
the requests module. But of course we just need the requests module in
the RISC OS version of Python3 <arrrrh>.

---druck

Re: Problem returning from WGET from within an assembler prog

<d1328fd759.Kevin@Kevsoft>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=131&group=comp.sys.acorn.programmer#131

  copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!aioe.org!yBIfwlcYvPp0VbqA9SeaOg.user.46.165.242.75.POSTED!not-for-mail
From: kev@kevsoft.co.uk (Kevin Wells)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Problem returning from WGET from within an assembler prog
Date: Mon, 11 Apr 2022 18:09:14 +0100
Organization: Aioe.org NNTP Server
Lines: 55
Message-ID: <d1328fd759.Kevin@Kevsoft>
References: <59d5e28a96bob@sick-of-spam.invalid> <t2p8ka$1db3$1@gioia.aioe.org> <59d600739fbob@sick-of-spam.invalid>
<6a8503d659.harriet@bazleyfamily.co.uk> <59d6672366bob@sick-of-spam.invalid> <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>
<59d68649a5bob@sick-of-spam.invalid> <13d593d659.Kevin@Kevsoft> <59d6dc7625bob@sick-of-spam.invalid> <ad97efd659.Kevin@Kevsoft>
Injection-Info: gioia.aioe.org; logging-data="5616"; posting-host="yBIfwlcYvPp0VbqA9SeaOg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Messenger-Pro/8.05wpb1 (MsgServe/8.05) (RISC-OS/5.29) NewsHound/v1.52-32
X-Notice: Filtered by postfilter v. 0.9.2
 by: Kevin Wells - Mon, 11 Apr 2022 17:09 UTC

In message <ad97efd659.Kevin@Kevsoft>
Kevin Wells <kev@kevsoft.co.uk> wrote:

>In message <59d6dc7625bob@sick-of-spam.invalid>
> Bob Latham <bob@sick-of-spam.invalid> wrote:
>
>>In article <13d593d659.Kevin@Kevsoft>,
>> Kevin Wells <kev@kevsoft.co.uk> wrote:
>>
>>> >In article <mpro.ra2pxr01s2b8u07k5.news@stevefryatt.org.uk>,
>>> > Steve Fryatt <news@stevefryatt.org.uk> wrote:
>>
>>> >> Ah. Wimp_StartTask must be called from a Wimp application which
>>> >> is already calling Wimp_Poll.
>>
>>> From BASIC wget is easy to fetch files from the internet I use the
>>> followiong:
>>
>>> SYS "Wimp_StartTask", "wget ...
>>
>>> Whilst fetching the computer is single tasking,
>>
>>When you say "Basic", I'm starting to think you mean a full wimp
>>application written in Basic?
>
>Yes under DR Wimp
>
>Another method I used in my QrCode application is to create an Obey file
>with just wget ... in it file typed as FEB so that I can have more than
>256 characters in it. If going down that route then anything with a % in
>it will need %%

After a few pints of insperation juice (beer) I think I have a plan for
multitaksing the the above.

There is an an obey file that returns to the computer very quickly I
can't remember which one at the top of my head.

So you select the logging switch to save the log info to file scrap
would be the best place, and in the polling loop check to see if that
file is there and when it is carry on.
>>
>>Thanks.
>>
>>Bob.
>>
>
>

--
Kev Wells
http://kevsoft.co.uk/ https://ko-fi.com/kevsoft
carpe cervisium
Bring me my bow of burning gold!

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor