Updated BASIC and KERNAL disassembly
Moderator: Moderators
Updated BASIC and KERNAL disassembly
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.
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 182 times
- pixel
- Vic 20 Scientist
- Posts: 1357
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Updated BASIC and KERNAL disassembly
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
https://github.com/SvenMichaelKlose
Re: Updated BASIC and KERNAL disassembly
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?
I notice that the C-64 equivalent is hosted on GitHub, would people prefer me to put it up like that?
-
- Vic 20 Amateur
- Posts: 55
- Joined: Thu Nov 27, 2014 10:50 am
Re: Updated BASIC and KERNAL disassembly
This is awesome. Thanks for taking the time to make and post it
.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Re: Updated BASIC and KERNAL disassembly
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.
-
- Vic 20 Enthusiast
- Posts: 179
- 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
That would be really useful, it would be a great reference to test my assembler.srowe wrote:I can provide that if it's useful to anyone.
Try out CBM prg Studio over at www.ajordison.co.uk
- pixel
- Vic 20 Scientist
- Posts: 1357
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Updated BASIC and KERNAL disassembly
No doubt about that! No wonder he didn't go through the trouble of naming the labels. It must have been quite exhausting already.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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: Updated BASIC and KERNAL disassembly
Here's a new zip file with the Makefile and the generated include file.ajordison wrote: That would be really useful, it would be a great reference to test my assembler.
- Attachments
-
- combined_ROMs.zip
- (111.85 KiB) Downloaded 155 times
- pixel
- Vic 20 Scientist
- Posts: 1357
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Updated BASIC and KERNAL disassembly
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
https://github.com/SvenMichaelKlose
Re: Updated BASIC and KERNAL disassembly
ctags can handle 6502 assembly, works fine with the file as it is.
- majikeyric
- Vic 20 Afficionado
- Posts: 351
- Joined: Fri Oct 24, 2014 2:08 pm
- Website: http://majikeyric.free.fr
- Location: France
- pixel
- Vic 20 Scientist
- Posts: 1357
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Updated BASIC and KERNAL disassembly
Is it OK to put the definitions file into Bender (which is MIT licensed)?
BTW I noticed that assigned labels like
didn't make it into `combined_ROMs.inc'.
BTW I noticed that assigned labels like
Code: Select all
USRPPOK = $00
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: Updated BASIC and KERNAL disassembly
Sure, I can hardly claim copyright on them, they're either the public names from the Prog Ref or scavenged from other books.pixel wrote:Is it OK to put the definitions file into Bender (which is MIT licensed)?
Odd, they are in the zipfile I madeBTW I noticed that assigned labels likedidn't make it into `combined_ROMs.inc'.Code: Select all
USRPPOK = $00
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]$
- pixel
- Vic 20 Scientist
- Posts: 1357
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Updated BASIC and KERNAL disassembly
Sweet. Will put it in with reference to your work, of course. Will trim my finger nails and get new contact lenses.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.
Odd, they are in the zipfile I madeBTW I noticed that assigned labels likedidn't make it into `combined_ROMs.inc'.Code: Select all
USRPPOK = $00
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
- e5frog
- Vic 20 Nerd
- Posts: 551
- Joined: Sat Feb 17, 2007 5:46 pm
- Website: http://channelf.se
- Location: Sweden
- Occupation: Service Engineer
Re: Updated BASIC and KERNAL disassembly
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