[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best ASM Programming book for Apple



Scarlet Otter <SecretaryBird@softhome.net> wrote:
: On 26 Jan 2003 05:56:45 GMT, "Dave Althoff, Jr." <dalloff@gcfn.org>
: wrote:
: 
:>
:>My personal recommendation for 8-bit assembly programming is a book 
:>called "Assembly Lines" by Roger Wagner.  Good luck finding it; sorry, 
:>I'm keeping my copy.
:>
:>To get from Applesoft ("]") to the Machine Language Monitor ("*") issue 
:>the command...
:>
:>]CALL -151
:>*
: 
: Also, if you boot into Integer Basic (under at least DOS 3.3), you can
: get to the Mini Assembler with:
: 
: CALL -151
: F666G
: 
: That will work on any Apple II booted with the DOS 3.3 System Master
: and switched to Integer Basic with the INT command.

(didn't I say that?  I know I meant to...)
Important:  You MUST go to the Monitor from INTEGER BASIC to get to the 
Mini Assembler on any Apple ][ that does not respond to 
*!

Technical explanation:
The 8-bit Apple ][ can access 65,536 bytes of memory directly, which 
accounts for all locations from $0000-$FFFF.  On any Apple ][, locations 
$C000-$FFFF are located in ROM...but $0000-$DFFF only accounts for 49,152 
bytes...49152/1024=48k bytes!  So a 48k Apple ][  is still a 64k machine.

Accordingly, to use the upper 16k of RAM in a 64k machine (such as any 
][e) the area from $C000-$FFFF has to be switched from ROM to RAM.  If 
you switch from ROM to RAM, then the ROM code becomes invisible.  And it 
just so happens that the Monitor is normally located in ROM, and on 
machines that don't have a built-in Mini-Assembler, the Mini-Assembler is 
not.  When you load Integer BASIC into the upper 16k, along with it comes 
a copy of the Monitor, but in a version which includes the 
Mini-Assembler.  When you switch from Applesoft to Integer BASIC, you 
switch the upper 16k of memory to effectively replace the Applesoft ROM 
with the Integer BASIC RAM.  If you call the Monitor from Integer BASIC, 
you are calling the RAM version loaded with Integer BASIC instead of the 
ROM version that normally lives there.  As a result, the Mini-Assembler 
becomes available.  But remember...this is the old version of the 
Mini-Assembler, from which you have to do a
!$FF69G
to exit.

--Dave Althoff, ][.
    /-\        _       _          *** Thanks for a great season!! ***
   /XXX\      /X\     /X\_      _     /X\__      _     _        _____
  /XXXXX\    /XXX\   /XXXX\    /X\   /XXXXX\    /X\   /X\      /XXXXX
_/XXXXXXX\__/XXXXX\/XXXXXXXX\_/XXX\_/XXXXXXX\__/XXX\_/XXX\_/\_/XXXXXX