🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.acorn.programmer
Article #2

Re: Wimp_SlotSize questions

#2
From: Martin
Date: Wed, 28 Oct 2026 13:21
40 lines
2762 bytes
In article <5d2eda27cdbob@sick-of-spam.invalid>,
   Bob Latham <bob@sick-of-spam.invalid> wrote:

> In my RISCOS 3 PRMs page 3-206 it says you can change the slot size
> of the current slot by setting a value in register 0.

> At the bottom of that same page it also says - No tasks should set
> their current slot size,: normally, a new task will call *wimpslot
> which then calls Wimp_SlotSize.

> To my simple brain that is a major contradiction and I don't
> understand it at all.

I think the clue is in 'normally', as it is normal for a task to be
started just after a WimpSlot command in a !Run file, and that can be
easily changed if more or less is required for the task to run.

It is more unusual for tasks to want to change their slotsize, but
many do use SYS Wimp_Slotsize where variable storage is required.

> Say I need to obtain some temporary extra memory for a sort buffer,
> can extend the slot using this call, do the sort work and reduce the
> slot size again?

That would certainly work ... but it may depend on what language you
are using if that is the best way.

If you are using BASIC, then beware that it will not adjust HIMEM, so
the space is not simply usable from BASIC - but can certainly be used.
It may be better using END=, which changes the SlotSize and adjusts
HIMEM, but there are some restrictions when it can be used.

If you are using BASIC and sorting arrays, then you should look at my
ArmSort module from http://www.avisoft.f9.co.uk/ which makes sorting
very easy.

-- 
Martin Avison 
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received. 
Technical Details
Message-ID: <5d2edde289News04@avisoft.f9.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <5d2eda27cdbob@sick-of-spam.invalid>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Martin <News04@avisoft.f9.co.uk>
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Wimp_SlotSize questions
Date: Wed, 28 Oct 2026 13:21:59 +0000 (GMT)
Organization: None
Lines: 40
Message-ID: <5d2edde289News04@avisoft.f9.co.uk>
References: <5d2eda27cdbob@sick-of-spam.invalid>
Injection-Date: Wed, 28 Oct 2026 13:22:37 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2582045"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18tiHQsWecU6EMGvQxCueWc"; posting-host="f67ab0d594b0b854b76b861c00d3c0c7"
User-Agent: Pluto/3.21a (RISC OS/5.31) NewsHound/v1.54
Cancel-Lock: sha1:WVPjUcT6UYE63gxDc3ak6ThIfeY= sha256:o44yMhehIAb15kEGVqBgZ0lbZY4KAN5Cy2BDShiGTAU=
	sha1:VYsDclClhJtdHaAQye1wiohiGmI= sha256:u40KEaEO3HgzWAmuVUn+sLY8Oa4QYSLvlU2KGOgteYI=