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


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

Re: Getting extra memory

Path csiph.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date Wed, 04 Nov 2020 07:17:57 -0600
From Martin <News03@avisoft.f9.co.uk>
Subject Re: Getting extra memory
Newsgroups comp.sys.acorn.programmer
Date Wed, 04 Nov 2020 13:17:49 +0000 (GMT)
Message-ID <58ca23d0f5News03@avisoft.f9.co.uk> (permalink)
References <58ca210e71bob@sick-of-spam.invalid>
User-Agent Pluto/3.18 (RISC OS/5.28) NewsHound/v1.52-32
Organization None
Lines 42
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-WcybklrhzjbfJAfKdU/oYcAKRr1VcOeKn+ILHTeLmPo7ZjSdzC7sJUk4l9fEXEFHlIitGfBKCet+x+L!5iXTeKxORPn0yydymDaQRhhWO5wM6O02vJFjK0u7fBmQF/l3dxL9RZikQE705EU3Fdv04AAYrXcL!P/s=
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 2338
Xref csiph.com comp.sys.acorn.programmer:6206

Show key headers only | View raw


In article <58ca210e71bob@sick-of-spam.invalid>,
   Bob Latham <bob@sick-of-spam.invalid> wrote:
> I've never really understood memory allocation and no matter how
> much reading I do, the picture doesn't clear. I'm obviously doing
> something stupid as a result.

> I'm trying to load a largish file up to 7M in size into memory,
> make some changes to it and save it out again. I've succeeded, sort
> of, it does what I want but I get an error on the file load and
> don't understand why.

> I'm doing this in basic asembler not multitasking. Cut to the bones
> it errors with this..

[Snip]
>            ADR R2,workspace
[Snip]

> error on the file load: Abort on data transfer at &FC1AD8E8.

Not sure what, if or how you have set workspace.

I am not sure why you are resorting to assembler, when you could do it
in BASIC quite easily. This code should provide a basis...

    SYS "OS_File",17,file$ TO obj%,,,,len%
    IF obj%<>1 THEN ERROR 1,"Not found"
    DIM file% len%
    SYS "OS_File",16,file$,file%
    >>code to change data<<
    SYS "OS_File",10,file$+"N",filetype%,,file%,file%+len%

You would need to check the Next slot was set larger than 7MB
initially, or before the DIM use something like:
    END = HIMEM + len%

Or have I missed something?

-- 
Martin Avison 
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received. 

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


Thread

Getting extra memory Bob Latham <bob@sick-of-spam.invalid> - 2020-11-04 12:47 +0000
  Re: Getting extra memory Martin <News03@avisoft.f9.co.uk> - 2020-11-04 13:17 +0000
    Re: Getting extra memory Bob Latham <bob@sick-of-spam.invalid> - 2020-11-04 13:48 +0000
      Re: Getting extra memory Martin <News03@avisoft.f9.co.uk> - 2020-11-04 17:23 +0000
        Re: Getting extra memory Bob Latham <bob@sick-of-spam.invalid> - 2020-11-04 18:04 +0000
          Re: Getting extra memory Martin <News03@avisoft.f9.co.uk> - 2020-11-04 18:44 +0000
            Re: Getting extra memory Bob Latham <bob@sick-of-spam.invalid> - 2020-11-04 22:03 +0000
      Re: Getting extra memory druck <news@druck.org.uk> - 2020-11-04 18:06 +0000
        Re: Getting extra memory Bob Latham <bob@sick-of-spam.invalid> - 2020-11-04 18:33 +0000
  Re: Getting extra memory Steve Drain <steve@kappa.me.uk> - 2020-11-04 17:38 +0000
    Re: Getting extra memory Bob Latham <bob@sick-of-spam.invalid> - 2020-11-04 18:11 +0000
      Re: Getting extra memory Bob Latham <bob@sick-of-spam.invalid> - 2020-11-04 18:32 +0000

csiph-web