Updated BASIC and KERNAL disassembly

Basic and Machine Language

Moderator: Moderators

User avatar
srowe
Vic 20 Afficionado
Posts: 468
Joined: Mon Jun 16, 2014 3:19 pm

Updated BASIC and KERNAL disassembly

Postby srowe » Tue Oct 06, 2015 1:59 pm

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.
Attachments
combined_ROMs.zip
(105.71 KiB) Downloaded 63 times

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: Updated BASIC and KERNAL disassembly

Postby pixel » Wed Oct 07, 2015 3:18 am

This is a revelation compared to the old version. Thanks a lot!
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
srowe
Vic 20 Afficionado
Posts: 468
Joined: Mon Jun 16, 2014 3:19 pm

Re: Updated BASIC and KERNAL disassembly

Postby srowe » Wed Oct 07, 2015 12:36 pm

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?

randolph.pickle
Vic 20 Amateur
Posts: 55
Joined: Thu Nov 27, 2014 10:50 am

Re: Updated BASIC and KERNAL disassembly

Postby randolph.pickle » Wed Oct 07, 2015 12:53 pm

This is awesome. Thanks for taking the time to make and post it :D.

User avatar
srowe
Vic 20 Afficionado
Posts: 468
Joined: Mon Jun 16, 2014 3:19 pm

Re: Updated BASIC and KERNAL disassembly

Postby srowe » Wed Oct 07, 2015 1:05 pm

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.

ajordison
Vic 20 Enthusiast
Posts: 155
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Re: Updated BASIC and KERNAL disassembly

Postby ajordison » Wed Oct 07, 2015 1:21 pm

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.
Try out CBM prg Studio over at www.ajordison.co.uk

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: Updated BASIC and KERNAL disassembly

Postby pixel » Wed Oct 07, 2015 1:47 pm

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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
srowe
Vic 20 Afficionado
Posts: 468
Joined: Mon Jun 16, 2014 3:19 pm

Re: Updated BASIC and KERNAL disassembly

Postby srowe » Wed Oct 07, 2015 2:14 pm

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.
Attachments
combined_ROMs.zip
(111.85 KiB) Downloaded 52 times

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: Updated BASIC and KERNAL disassembly

Postby pixel » Thu Oct 08, 2015 12:11 pm

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).
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
srowe
Vic 20 Afficionado
Posts: 468
Joined: Mon Jun 16, 2014 3:19 pm

Re: Updated BASIC and KERNAL disassembly

Postby srowe » Fri Oct 09, 2015 12:31 pm

ctags can handle 6502 assembly, works fine with the file as it is.

User avatar
majikeyric
Vic 20 Devotee
Posts: 239
Joined: Fri Oct 24, 2014 2:08 pm
Website: http://majikeyric.free.fr
Location: France

Re: Updated BASIC and KERNAL disassembly

Postby majikeyric » Fri Oct 09, 2015 1:31 pm

Thank you very much :)

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: Updated BASIC and KERNAL disassembly

Postby pixel » Fri Nov 20, 2015 7:22 am

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'.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
srowe
Vic 20 Afficionado
Posts: 468
Joined: Mon Jun 16, 2014 3:19 pm

Re: Updated BASIC and KERNAL disassembly

Postby srowe » Fri Nov 20, 2015 1:18 pm

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]$

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: Updated BASIC and KERNAL disassembly

Postby pixel » Fri Nov 20, 2015 1:58 pm

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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
e5frog
Vic 20 Nerd
Posts: 544
Joined: Sat Feb 17, 2007 5:46 pm
Website: http://channelf.se
Location: Sweden
Occupation: Service Engineer

Re: Updated BASIC and KERNAL disassembly

Postby e5frog » Wed Nov 02, 2016 5:10 pm

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".
My other interest: http://channelf.se


Return to “Programming”

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 1 guest