C64 38K of RAM

Welcome back to our Commodore Discussion forum. If you have a question, comment, problem, or just want to chat about Commodore, post it here for free.

Have some fun and talk to others interested in the Old and New Commodore world.

Moderators: wiskow, Trazan

Post Reply
User avatar
administrator
Site Admin
Posts: 625
Joined: Wed Mar 16, 2005 10:23 pm
Location: Calgary Alberta Canada
Contact:

C64 38K of RAM

Post by administrator »

I recently received an email that stated:
...The Truth is , there is 64K of RAM available but only when programming in Machine Code. In BASIC you can only directly access 38K, NOT because the Operating system is USING the remaining 16K, but because 16K of RAM is actually TURNED OFF by the PLA chip, so that the computer (CPU) Can access BASIC & The Operating Sytem (Kernal) ROM's.
Is that accurate? I always thought it was because BASIC used 16K.
User avatar
administrator
Site Admin
Posts: 625
Joined: Wed Mar 16, 2005 10:23 pm
Location: Calgary Alberta Canada
Contact:

Re: C64 38K of RAM

Post by administrator »

come guys... someone must know this. Please give me your thoughts.
brain
Posts: 3
Joined: Wed Mar 17, 2010 3:21 pm
Are you a real person?: No... I am a spambot, delete my account!

Re: C64 38K of RAM

Post by brain »

38kB is available because:

$0000-$07ff is zpage, stack, screen RAM, temp buffers, etc. (2048)
$a000-$bfff is BASIC (8kB)
$c000-$cfff is RAM, but can't be used by BASIC (4kB)
$d000-$dfff is IO (4kB)
$e000-$ffff is KERNAL (8kB)

So, 26kB is lost to those things. That leaves 38kB available for BASIC.

BASIC uses 8kB, and KERNAL uses 8kB. Together they use 16kB.

But, later machines like the +4 also had 64kB of RAM, but was able to ofer 60kB for BASIC:

They would BANK the ROMs and IO out and allow BASIC statements to be in the RAM under those areas. You can use the same approach with the 64, and some utilities existed to do just that (SMORE BASIC did it)

Jim
Post Reply