Virtual 6502 — Another Update
A few new features for the 6502 online disassembler.
Another update to the “virtual 6502” disassembler, which has obtained a few new features regarding symbol tables:
- Addresses immediately follwing a declared symbol will be translated to a labeled “
+1
” address (optionally). This may be useful with any code setting up pointers, etc, where only the low-address is declared as a symbol (as is often the case with zero-page system addresses.)
E.g.,Object code (start address 0x0800): A9 01 85 B8 A9 40 85 B9 Symbol table: SETPTR = $0800 POINTER = $B8 Disassembly: * = $0800 0800 A9 01 SETPTR LDA #$01 0802 85 B8 STA POINTER 0804 A9 40 LDA #$40 0806 85 B9 STA POINTER+1 .END
- Symbols may be optionally declared specifically for write access only by a “w” suffix (case-insensitive). Think of the Atari VCS (AKA Atari 2600) and TIA read and write registers sharing the same address.
(The assembler ignores such a suffix in order to provide compatibility with such symbol tables.)
E.g.,CXP0FB = $02 ;read register WSYNC = $02 w ;write access only
- Predefined symbol tables for the C64, the PET 2001, the Atari VCS, and the BBC Micro/Acorn may be loaded directly from the UI.
- The disassembler now supports .DATA pseudo instruction for its symbol tables to declare an address or a range of addresses as data to be excluded from the disassembly (".BYTE" pseudo instructions will be added instead.)
E.g.,.DATA $2040 ;exclude a single address .DATA $2040 ... $240F ;exclude range $2040 … $240F (inclusive) .DATA $2040, $240F ;as above .DATA D1 ... D1+4 ;expressions are allowed
A comment with a binary representation of the respective byte (e.g., “
;%01110101
”) will be added to any verbose output format, in order to help identifying sprites and similar patterns.This should be a useful for drilling down on some code: just keep adding “.DATA” statements to your symbol table as you identify a data section and keep on disassembling.
(Again, such a DATA pseudo-instruction is ignored by the assembler to assure compatibility.)
Moreover, all the “virtual 6502” apps now support input and output in “&…
” hex notion to comfort those who were tragically mislead by the BBC (while MOS made it quite clear that is “$…
”). ;-)
(Seriously, I’ve really the highest respect for the BBC Micro, which was an enormous achievement.)
By this, the disassembler looks much like feature-complete.