Subject: Re: 6502 assembler Newsgroups: comp.sys.apple2.programmer From: dempson@actrix.gen.nz (David Empson) Date: Fri, 24 Sep 1999 12:34:56 +1200 Message-ID: <1dymxu0.x058sil3e3ioN@dempson.actrix.gen.nz> References: <4iVF3.2276$QJ.87287@typ11.nn.bcandid.com> <7scukv$sui$1@nnrp1.deja.com> Organization: Empsoft User-Agent: MacSOUP/2.4 NNTP-Posting-Host: 202.49.157.176 X-Original-NNTP-Posting-Host: 202.49.157.176 X-Trace: 24 Sep 1999 12:33:34 NZST, 202.49.157.176 Lines: 111 Date Doctor - the best y2k fix wrote: > In article <4iVF3.2276$QJ.87287@typ11.nn.bcandid.com>, > kragen@dnaco.net (Kragen Sitaker) wrote: > > I've just started learning 6502 ASM; I have an ancient book on the > > subject. I see various places to look for example code; "The Fridge", > > at http://www.ffd2.com/fridge/, has lots and lots of example code > > (mostly for the C64), and www.6502.org. But I have no idea which of > > this code is any good. What do other people recommend? > > ] call -151 > > * d000l > > you can disassemble the ROM, so that's probably a good start But D000L won't give you any intelligent looking output from the disassembly, since this area is the command vector table for Applesoft BASIC. (It does contain code for Integer BASIC, assuming Programmer's Aid #1 is present, which it would be for disk-based INTBASIC.) > DOS is at a000-bfff Try 9600-BFFF. Lots of tables in there, so finding useful entry points to disassemble from is a little fiddly. Try disassembling from 3D0 to get some JMP instructions into various parts of DOS, and disassemble the destinations of these JMPs. > zero page has your interrupt table No it doesn't. The interrupt vectors on the 6502 are in ROM, at FFFA-FFFF. On the Apple II, most of them are re-vectored through RAM at 03F0-03FF. > 200-2ff is your stack Try 100-1FF. 200-2FF is the input buffer. > 300-380 is free space Yes, but there is more than just that. 300-3CF is the generally accepted "free space" in this area. > but after that is more vectors, 3D0-3EC are used by DOS, the rest are for the monitor and other firmware. > if you have 128k ram, then > > *d000:d000.1ffffm I'm assuming you meant "D000 Apple //e's are lots of fun No argument there. -- David Empson dempson@actrix.gen.nz Snail mail: P.O. Box 27-103, Wellington, New Zealand