Re-assembling ROM Disassembly

Basic and Machine Language

Moderator: Moderators

Post Reply
SparkyNZ
Vic 20 Enthusiast
Posts: 192
Joined: Tue Jan 18, 2011 2:23 am

Re-assembling ROM Disassembly

Post by SparkyNZ »

This problem sound crazy, but I would like to reassemble this ROM disassembly:
vic-20-rom.asm.zip
(106.46 KiB) Downloaded 19 times
I think this is the most commented version of the ROM disassembly I have seen (please correct me if I'm wrong) but what I'd like to do is assemble it and generate a .lst file so I can see all of the addresses next to each line - something like this:

Code: Select all

LAB_EA62
EA62:	LDA	(SAL),Y			; get character from next/previous screen line
EA64:	STA	(PNT),Y			; save character to current screen line
EA66:	LDA	(EAL),Y			; get colour from next/previous screen line colour RAM
EA68:	STA	(USER),Y		; save colour to current screen line colour RAM
EA6A:	DEY				; decrement column index/count
EA6B:	BPL	LAB_EA62		; loop if more to do

EA6D:	RTS
I do have a copy of the Vic ROM Disassembly book that has all of the addresses - but it doesn't have the labels and comments :-) So I'm hoping I can somehow combine the 2 together.

I have tried 64tass and xa on my Linux box but they don't like the syntax of the .asm file. Does anybody know which assembler will assemble the attached .asm file? The file came from here: https://gist.github.com/cbmeeks/65c0f2a ... 37732aac8c
SparkyNZ
Vic 20 Enthusiast
Posts: 192
Joined: Tue Jan 18, 2011 2:23 am

Re: Re-assembling ROM Disassembly

Post by SparkyNZ »

I just found this: https://github.com/jdimeglio/6502-Simulator.git

I'll have to see if that will assemble the code when I can find a Windows machine.

UPDATE: No it won't assemble.. "Unrecognized data--space or label expected. ROW 1275" . That's at the *=$C000 line. I tried .ORG $C000 and I get the same problem. Maybe there's another option that I need.. or maybe this is the wrong assembler.. pass..
User avatar
Orangeman96
Vic 20 Enthusiast
Posts: 183
Joined: Tue Jan 16, 2024 3:42 pm
Location: U.S.A.

Re: Re-assembling ROM Disassembly

Post by Orangeman96 »

SparkyNZ wrote: Thu May 08, 2025 4:19 pm I just found this: https://github.com/jdimeglio/6502-Simulator.git

I'll have to see if that will assemble the code when I can find a Windows machine.

UPDATE: No it won't assemble.. "Unrecognized data--space or label expected. ROW 1275" . That's at the *=$C000 line. I tried .ORG $C000 and I get the same problem. Maybe there's another option that I need.. or maybe this is the wrong assembler.. pass..
I would PM srowe, as he is identified within the text file, and is a Denial frequenter. Good luck! -OGM
SparkyNZ
Vic 20 Enthusiast
Posts: 192
Joined: Tue Jan 18, 2011 2:23 am

Re: Re-assembling ROM Disassembly

Post by SparkyNZ »

Orangeman96 wrote: Thu May 08, 2025 8:00 pm I would PM srowe, as he is identified within the text file, and is a Denial frequenter. Good luck! -OGM
Thanks OGM - I'll see what gives. :-)
SparkyNZ
Vic 20 Enthusiast
Posts: 192
Joined: Tue Jan 18, 2011 2:23 am

Re: Re-assembling ROM Disassembly

Post by SparkyNZ »

I got it!

I just needed to tab the *=$C000 over and remove the tabs/spaces between. That fixed that problem - then the assembler complained about '^^' not fitting in 1 byte.. so I changed that to '^' and it has assembled!

Here it is if it's useful to someone else:
vic-rom.lst.zip
(193.21 KiB) Downloaded 20 times
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Re-assembling ROM Disassembly

Post by Mike »

SparkyNZ wrote:I do have a copy of the Vic ROM Disassembly book [...]
This happens to be the one by Peter Gerrard and Kevin Bergin?

The ROM 'disassembly' in that book not only does not feature any commentary - they disassembled data tables as machine code, even put an half-hearted excuse about that in the preface but did not arrive at the obvious idea to print out the data tables as hex numbers instead. m(

An index of the routines and tables in BASIC and KERNAL, a memory map and zero page reference, and the 6502 instruction set summary - copied verbatim from the VIC-20 Programmer's Reference Manual - make up the rest of the book. Arguably, the best part is the listing of TinyMon at the end.
User avatar
Wilson
Vic 20 Devotee
Posts: 252
Joined: Mon Sep 28, 2009 7:19 am
Location: Brooklyn, NY

Re: Re-assembling ROM Disassembly

Post by Wilson »

edit: Oops, recommended the same disassembly (Lee Davidson's) from the OP :mrgreen:
Read Mike's comment and assumed that was the disassembly in question.

Lee's is a great resource! :) Glad you figured it out.
SparkyNZ
Vic 20 Enthusiast
Posts: 192
Joined: Tue Jan 18, 2011 2:23 am

Re: Re-assembling ROM Disassembly

Post by SparkyNZ »

Mike wrote: Sat May 10, 2025 1:45 am This happens to be the one by Peter Gerrard and Kevin Bergin?
Yes that 'book'. When I acquired my first C64 it came with that book.. Funny, I never used it.
Post Reply