This SO article is a good walk down memory lane: https://retrocomputing.stackexchange.com/a/6020/13676. It discusses what portions of the 64KB that could be mapped by a 6502 were used as RAM in an Apple II. There were a few bytes (256) mapped to device channels, and 12KB was the language module for Applesoft BASIC (10KB) and other low-level ROM stuff (2KB).

Keep in mind that contemporary BASIC implementations of the day were often in the 8KB to 12KB range. The slightly earlier generation of the 70s was often 4KB for the language. BASIC implementations were extremely simple; easy to parse, no actual subroutines (just GOSUB to line numbers).

And for architectures that facilitated memory bank swapping, I think you were limited to two banks. And there probably wasn't any shared memory other than the CPU itself that stayed in-place between swaps, so imagine how hard that would be to work with; any state that was needed across banks would have to be copied to both through a series of CPU register transfers and swaps. BASIC, of course, would never have exposed the ability to write programs that could access more than the 64kb of a single bank, without the programmer resorting to POKE/PEEK to do their own manual memory management.

Anyway, those were fun times, but you were a lot closer to the metal, and had a lot less resources to work with. It's one of the reasons that Perl was such a breath of fresh air for me as I first picked it up; coming from BASIC -> 6502 Assembler -> PASCAL -> Modula II -> C -> early C++... then suddenly discovering Perl.


Dave


In reply to Re: 6502 Perl by davido
in thread 6502 Perl by rje

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.