Page 1 of 3

Updated BASIC and KERNAL disassembly

Posted: Tue Oct 06, 2015 1:59 pm
by srowe
I've been meaning to post my copy of Lee Davidson's commented ROM disassembly, here it is.

The main changes are to replace the LAB_xxxx labels with their common equivalents, e.g. LAB_FFD2 with CHROUT. I've used the 'Programmer's Ref Guide' and also 'Computes Mapping the VIC'. For some labels I've invented something appropriate.

I find this invaluable when writing assembly programs, hopefully others will too. Updates or corrections are welcome.

Re: Updated BASIC and KERNAL disassembly

Posted: Wed Oct 07, 2015 3:18 am
by pixel
This is a revelation compared to the old version. Thanks a lot!

Re: Updated BASIC and KERNAL disassembly

Posted: Wed Oct 07, 2015 12:36 pm
by srowe
Glad you think it's an improvement. I think Lee did a tremendous job with his commentary, I've learnt a lot from reading it.

I notice that the C-64 equivalent is hosted on GitHub, would people prefer me to put it up like that?

Re: Updated BASIC and KERNAL disassembly

Posted: Wed Oct 07, 2015 12:53 pm
by randolph.pickle
This is awesome. Thanks for taking the time to make and post it :D.

Re: Updated BASIC and KERNAL disassembly

Posted: Wed Oct 07, 2015 1:05 pm
by srowe
I forgot to include the makefile I use to compile and verify that it is byte identical to the original ROMs. I can provide that if it's useful to anyone. It also generates a list of equates that I then include in programs I write.

Re: Updated BASIC and KERNAL disassembly

Posted: Wed Oct 07, 2015 1:21 pm
by ajordison
srowe wrote:I can provide that if it's useful to anyone.
That would be really useful, it would be a great reference to test my assembler.

Re: Updated BASIC and KERNAL disassembly

Posted: Wed Oct 07, 2015 1:47 pm
by pixel
srowe wrote:Glad you think it's an improvement. I think Lee did a tremendous job with his commentary, I've learnt a lot from reading it.
No doubt about that! No wonder he didn't go through the trouble of naming the labels. It must have been quite exhausting already.

Re: Updated BASIC and KERNAL disassembly

Posted: Wed Oct 07, 2015 2:14 pm
by srowe
ajordison wrote: That would be really useful, it would be a great reference to test my assembler.
Here's a new zip file with the Makefile and the generated include file.

Re: Updated BASIC and KERNAL disassembly

Posted: Thu Oct 08, 2015 12:11 pm
by pixel
A thing that just occurred to me is that if the labels would end with a colon it'd be easier to navigate around with text searches. But the way you've done it, it could be converted easily with sed (the UN*X tool).

Re: Updated BASIC and KERNAL disassembly

Posted: Fri Oct 09, 2015 12:31 pm
by srowe
ctags can handle 6502 assembly, works fine with the file as it is.

Re: Updated BASIC and KERNAL disassembly

Posted: Fri Oct 09, 2015 1:31 pm
by majikeyric
Thank you very much :)

Re: Updated BASIC and KERNAL disassembly

Posted: Fri Nov 20, 2015 7:22 am
by pixel
Is it OK to put the definitions file into Bender (which is MIT licensed)?

BTW I noticed that assigned labels like

Code: Select all

USRPPOK = $00
didn't make it into `combined_ROMs.inc'.

Re: Updated BASIC and KERNAL disassembly

Posted: Fri Nov 20, 2015 1:18 pm
by srowe
pixel wrote:Is it OK to put the definitions file into Bender (which is MIT licensed)?
Sure, I can hardly claim copyright on them, they're either the public names from the Prog Ref or scavenged from other books.
BTW I noticed that assigned labels like

Code: Select all

USRPPOK = $00
didn't make it into `combined_ROMs.inc'.
Odd, they are in the zipfile I made

Code: Select all

[srowe@gilraen temp]$ unzip ../combined_ROMs.zip
Archive:  ../combined_ROMs.zip
  inflating: combined_ROMs.asm       
  inflating: Makefile                
  inflating: combined_ROMs.inc       
[srowe@gilraen temp]$ head combined_ROMs.inc
    FAC_EXPT = $0000
     USRPPOK = $0000
      ADDPRC = $0001
   ER_2MANYF = $0001
    FAC_MANT = $0001
    ER_FOPEN = $0002
      ADRAY1 = $0003
 ER_FNOTOPEN = $0003
  ER_FNOTFND = $0004
      ADRAY2 = $0005
[srowe@gilraen temp]$ 

Re: Updated BASIC and KERNAL disassembly

Posted: Fri Nov 20, 2015 1:58 pm
by pixel
srowe wrote:Sure, I can hardly claim copyright on them, they're either the public names from the Prog Ref or scavenged from other books.
BTW I noticed that assigned labels like

Code: Select all

USRPPOK = $00
didn't make it into `combined_ROMs.inc'.
Odd, they are in the zipfile I made
Sweet. Will put it in with reference to your work, of course. Will trim my finger nails and get new contact lenses.

Re: Updated BASIC and KERNAL disassembly

Posted: Wed Nov 02, 2016 5:10 pm
by e5frog
Can't really find the right spot when I want to know what JSR $FFxx is pointing to for example. All addresses are replaced by "elite-labels".