BBC BASIC
« Address out of range »

Welcome Guest. Please Login or Register.
Mar 31st, 2018, 10:41pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Cross-platform BBC BASIC (Windows, Linux x86, Mac OS-X, Android, iOS, Raspberry Pi)
BBC BASIC Resources
BBC BASIC Help Documentation
BBC BASIC for Windows Home Page
BBC BASIC Programmers' Reference
BBC BASIC Beginners' Tutorial
BBC BASIC for SDL 2.0 Home Page
BBC BASIC Discussion Group

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Address out of range  (Read 270 times)
mavison
New Member
Image


member is offline

Avatar




PM


Posts: 27
xx Address out of range
« Thread started on: Feb 20th, 2017, 1:38pm »

After testing a BBCSDL program using Windows, I am now starting to test it on a Mac.

One of the first things the program does is to find the length of a file (using OPENIN and EXT), use DIM to allocate memory, then load the file into memory (about 72KB) by using OSCLI("Load "+csv$+" "+STR$~csv%) where csv$ is the full filename and csv% the address.

On Windows this works fine, but on a Mac the Load fails with 'Address out of range'. It did seem rather large, and next time I have remote access to the Mac I will make a note what it is.

Any clues what this problem might be caused by please?
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: Address out of range
« Reply #1 on: Feb 20th, 2017, 2:56pm »

on Feb 20th, 2017, 1:38pm, mavison wrote:
Any clues what this problem might be caused by please?

Not really. The only 'questionable' aspect of your code is that it appears not to be compatible with path names that contain spaces or other punctuation, but I would have expected paths of that kind to be less likely on a Mac rather than more so. Still, it would be desirable to add the necessary quotes for safety.

Some of the example programs do exactly what you are doing, and they work fine here. Notably clock.bbc (in the graphics folder) which contains the following code:

Code:
      clock$ = @dir$ + "clock.bmp"      F% = OPENIN(clock$) : DIM clock% EXT#F% : CLOSE #F%      OSCLI "LOAD """ + clock$ + """ " + STR$~clock% 

So one thing to check is whether clock.bbc works for you or not. If it doesn't, evidently the problem is related to some difference between your Mac and mine. If it does work you may want to investigate what the salient difference is between the two programs.

Richard.
« Last Edit: Feb 20th, 2017, 3:00pm by Richard Russell » User IP Logged

mavison
New Member
Image


member is offline

Avatar




PM


Posts: 27
xx Re: Address out of range
« Reply #2 on: Feb 20th, 2017, 2:57pm »

The address was hex 1003C99A & length 74552.

But I have fixed the problem by adding quotes round the filename for the Load - the directory had some spaces in it. So that must have confused it and me!!
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls