Jump to content
IGNORED

Quite a noobish question for a long time owner...


Simon Carter

Recommended Posts

I've owner Ataris for nearly 40 years, but as I found out recently, I have only ever owned 64K models. ? FRE(0) always brings up 37902, with 27K capacity being lost to OS ROM space and BASIC.

 

I just acquired a 32K 400, and I'm pretty sure that the FRE command came up with a surprising 29K(?) (only losing 3K) {I could be wrong with this figure, I did it a while ago}. I'm gussing this is partly because BASIC on a 400 has to be in cartridge format and therefore not a hardware constraint on memory. Does this mean that a 48K 400 could potentially have more free RAM for BASIC than a 64K 800XL or 65XE?

 

Using the logic of losing 27K to BASIC and OS, how much usable RAM would a 600XL have, if it only started of with 16K? I thought these had BASIC built in like the 64K models

 

I would check on my 400 but it's decided to depart this mortal coil, and has moved from my beloved collection to 'awaiting repairs' 😞 

 

I don't remember seeing a comparison of the various RAM capacities and their usable amounts either

 

Regards as always

 

Si

Link to comment
Share on other sites

Without sitting down to due all the math, the Atari's will use RAM roughly as follows:

 

The lowest RAM addresses are used by the OS.

The highest available RAM is used by the screen.  (On an XL, RAM overlaid by the OS is not available as screen RAM.)

Memory for your BASIC program will be sandwiched between the above 2 requirements.

BASIC is usually located in the top 8k of the 3rd bank of 16k.  Specifically, it is usually between A000-BFFF.  This is the cartridge address for the left cartridge on an 800.

On an XL, the top 16k of memory is usually not available as the OS overlays it.  You can access 14k of the top 16k of memory only by disabling the OS.

On an XL or a 48k machine, you can only access all 48k if the cartridge (i.e. BASIC) is disabled or not available.

 

On your 32k 400, the RAM is roughly like this:

 

0k

  Used by OS

  Used by DOS (if loaded)

  Available for BASIC program

  Screen RAM

32k

 

The ROMs will be:

 

40k

  BASIC ROM

48k

 

The hardware addresses are above the BASIC ROM.

The OS is located above the hardware addresses.

 

EDIT:  On a 600XL, with only 16k, somewhere around 13k is available for BASIC.  The RAM would be roughly mapped like this:

 

0k

  Used by OS

  Used by DOS (if loaded)

  Available for BASIC program

  Screen RAM

16k

 

 

 

I am attaching my memory/hardware map that shows an overview of the physical memory locations.

 

Atari Hardware Map.pdf

 

Edited by reifsnyderb
  • Like 2
Link to comment
Share on other sites

@reifsnyderb thanks for the reply.

 

By my understanding of your reply...

 

OS takes up 2K (...You can access 14k of the top 16k of memory only by disabling the OS...)

BASIC takes up 8K (...After six months the code was pared down to almost fit in an 8 kB ROM... from Wikipedia)

 

Using my posh maths, that's 10K gone from a 600XL's 16K, where does 13K BASIC usable RAM come from? Then throw DOS in on top and in theory you're almost down to 0.

 

I appreciate this will be down to my lack of knowledge regarding the subject matter, please don't think I'm arguing the toss!

 

Si

 

Link to comment
Share on other sites

11 minutes ago, Simon Carter said:

BASIC takes up 8K

Basic take the addresses A000-BFFF you have no RAM there so you don't lose any, so still have that 10K you thought you lost :)

 

Essentially there's a big empty RAM gap between the RAM you have and the cartridge address.

 

  • Like 2
Link to comment
Share on other sites

22 minutes ago, Simon Carter said:

@reifsnyderb thanks for the reply.

 

By my understanding of your reply...

 

OS takes up 2K (...You can access 14k of the top 16k of memory only by disabling the OS...)

BASIC takes up 8K (...After six months the code was pared down to almost fit in an 8 kB ROM... from Wikipedia)

 

Using my posh maths, that's 10K gone from a 600XL's 16K, where does 13K BASIC usable RAM come from? Then throw DOS in on top and in theory you're almost down to 0.

 

I appreciate this will be down to my lack of knowledge regarding the subject matter, please don't think I'm arguing the toss!

 

Si

 

 

The ROM, such as the OS and BASIC, are not counted against the RAM on a 16k 600XL.  The processor is capable of addressing 65,535 addresses.  These addresses, really don't have to be memory and can be devices.  So a 16k 600XL is laid out like this:

 

16k of RAM in addresses of 0 to 16,383:

  Some RAM is used by the OS.

  Some RAM is used by the screen.

  If loaded, some RAM is used by DOS.

  Some RAM is used by the processor.

  The rest of the RAM is available for your BASIC program.  (Not to be confused with the BASIC language itself.)

 

Everything else is located at addresses above those of the RAM.  Only the RAM can be changed by the computer's processor.

  8k of the BASIC language is located at addresses from 40,960 to 49,151.

  The devices (i.e.  ANTIC, the graphics co-processor, is accessed starting at address 54,272)

  The operating system is located at different addresses from 49,152 through 65,535.  (The device addresses are located within this range.)

 

  None of these addresses affect the memory that counts towards your BASIC program.

 

On a 600XL there is an empty "space" between 16,384 and 40,959 that has nothing in it.  No memory, nothing.

 

On a 16k 600XL there is no RAM residing under the OS.  This only happens on 64k systems.

 

 

 

 

 

 

 

 

 

 

Edited by reifsnyderb
  • Like 1
Link to comment
Share on other sites

22 hours ago, Simon Carter said:

I'm gussing this is partly because BASIC on a 400 has to be in cartridge format and therefore not a hardware constraint on memory. Does this mean that a 48K 400 could potentially have more free RAM for BASIC than a 64K 800XL or 65XE?

This simple answer is no because the ROMs still occupy the same amount of space on all models.   If you want more memory for BASIC,  you can try other versions of BASIC that will do bank switching to free up some of the lost memory for BASIC programs.   I recall that Turbo Basic made several more KB of memory available.

 

22 hours ago, Simon Carter said:

 

Using the logic of losing 27K to BASIC and OS, how much usable RAM would a 600XL have, if it only started of with 16K? I thought these had BASIC built in like the 64K models

When I had a 600XL,  it was something like 13K RAM available to BASIC.   

Link to comment
Share on other sites

BASIC XE has the "EXTEND" command which allows the full extra 64K of memory in a 130XE to be

used for program space.

 

After using the Extend command, this is what you see, it has FRE(0) and also FRE(1)

 

XE Ready
?FRE(0)
33486

 

XE Ready
?FRE(1)
65520

 

Link to comment
Share on other sites

43 minutes ago, TGB1718 said:

BASIC XE has the "EXTEND" command which allows the full extra 64K of memory in a 130XE to be

used for program space.

 

After using the Extend command, this is what you see, it has FRE(0) and also FRE(1)

 

XE Ready
?FRE(0)
33486

 

XE Ready
?FRE(1)
65520

 

Is there a BASIC that works with other banks?  i.e.  Axlon, and Atari XL's with more than 128k of RAM?

Link to comment
Share on other sites

 

On 8/17/2022 at 9:45 AM, Simon Carter said:

? FRE(0) always brings up 37902, with 27K capacity being lost to OS ROM space and BASIC.

That's with no DOS

Here's mine without/with DOS:

1200XL cart inserted no DOS 2.5 37902 bytes

1200XL cart inserted with DOS 2.5 32274 bytes

So 5628 byte difference. 

Link to comment
Share on other sites

5 hours ago, zzip said:

If you want more memory for BASIC,  you can try other versions of BASIC that will do bank switching to free up some of the lost memory for BASIC programs.   I recall that Turbo Basic made several more KB of memory available. 

Turbo-BASIC XL provides 34,021 bytes of usable RAM (1,747 more bytes than Atari BASIC) by situating part of its interpreter in RAM under ROM.

 

2106265417_Turbo-BASICXL-MemoryMap(ColorCoded).thumb.png.8ca2baf62fefc17309220c9747c6b6b4.png

 

Link to comment
Share on other sites

5 hours ago, Ricky Spanish said:

You can do the same with basic by typing the following:

POKE 1802,PEEK(1802)=128

DOS

L

RAMDISK.COM

I

8

Y

B

POKE 5439,36

"The same" as what?

 

I see 288 extra bytes using FRE(0); and now, when I type DOS, I get dumped back into the READY prompt.

 

Link to comment
Share on other sites

6 minutes ago, MrFish said:

I see 288 extra bytes

Guess I should said ' you can free up more ram by:"

Anyways, there is a chunk of unused ram area in the 800xl/1200xl that sits under the rom.

All the above does is creates mini ramdisk. Dumps you out of DOS yes, but you can still use

DOS commands. 

Link to comment
Share on other sites

5 hours ago, Ricky Spanish said:

You can do the same with basic by typing the following:

POKE 1802,PEEK(1802)=128

DOS

L

RAMDISK.COM

I

8

Y

B

POKE 5439,36

What do the POKE commands change?  I didn't see anything listed in Mapping The Atari other than those addresses were in the range of DOS memory.

Link to comment
Share on other sites

2 hours ago, reifsnyderb said:

What do the POKE commands change? 

Creates a 101-sector RAMdisk. If you want to access DOS 2.5 while using Poke 1802, this is how;

1. Boot with DOS 2.5 and BASIC.
2. POKE 1802,PEEK(1802)+128
3. Type DOS and press [RETURN]
4. Write DOS with option [H].

5. Type [B] and press [RETURN]

Type in the following program and RUN it to create an AUTORUN.SYS file on the same disk. Thereafter, when you boot with that disk you will have a 101-sector RAMdisk available as D8. 

20 OPEN #l,8,0,"D:AUTORUN.SYS":TRAP 50
30 READ X:IF X=-1 THEN 50
40 PUT #1,X:GOTO 30
50 CLOSE #1:END
100 DATA 255,255,0,96,43,96,162,32,169,254,157,66,
3,169,39,57,68,3,169,96,157,69,3
110 DATA 169,0,157,74,3,157,75,3,32,86,228,173
120 DATA 10,7,24,216,105,128,141,10,7,96,68,56,58,
155,0,224,2,225,2,0,96,-1

 

May be useful for those who need every last bit of that 64k.

  • Like 1
Link to comment
Share on other sites

18 hours ago, TGB1718 said:

BASIC XE has the "EXTEND" command which allows the full extra 64K of memory in a 130XE to be

used for program space.

 

After using the Extend command, this is what you see, it has FRE(0) and also FRE(1)

 

XE Ready
?FRE(0)
33486

 

XE Ready
?FRE(1)
65520

 

This was going to be my next question, whether someone had managed to do this. Very situational use though, as not many users would be able to run a 63.5k BASIC program on a normal machine

 

Si

Link to comment
Share on other sites

Yes, it is limited to a 130XE, although it may also work on a 64K machine that has a RAM upgrade and

BASIC XE found banked RAM in the appropriate location

 

If you save a program while in EXTEND mode and later reload it, BASIC XE switched to EXTEND mode

automatically and loads the program into extended memory.

You have to LIST it to disk and then ENTER when not in EXTEN mode to get it to load

into normal memory (if there is sufficient memory to load it into)

Edited by TGB1718
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...