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


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

Getting extra memory

From Bob Latham <bob@sick-of-spam.invalid>
Subject Getting extra memory
Newsgroups comp.sys.acorn.programmer
Message-ID <58ca210e71bob@sick-of-spam.invalid> (permalink)
Organization None
Date 2020-11-04 12:47 +0000

Show all headers | View raw


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..

           MOV R0,#15
           SWI "Wimp_Extend"
           STR R0,data23+0;   save size in pages

           SWI "OS_ReadMemMapInfo"
           STR R0,page+0;     size of pages



           LDR R0,memsize+4
           MVN R1,#0;  -1
           SWI "Wimp_SlotSize"; change slot size



           MOV R0,#15
           SWI "Wimp_Extend"
           STR R0,data23+4;   save size in pages

           SWI "OS_ReadMemMapInfo"
           STR R0,page+4;     size of pages



           MOV R0,#16
           ADR R1,Fname1
           ADR R2,workspace
           MOV R3,#0
           SWI "OS_File"; load file

error on the file load: Abort on data transfer at &FC1AD8E8.
But the file does load and save.

I've been checking that the slot size does change and it does hence
the extra code.


OS 5.27 30 sept 2020.

I'm miles out aren't I?  Anyone care to put me right.

Thanks.


Cheers,

Bob.

-- 
Bob Latham
Stourbridge, West Midlands

Back to comp.sys.acorn.programmer | Previous | NextNext 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