Sometimes when I'm disassembling code, I imagine that it would be cool to "drill down" into a subroutine or jump destination, just to review what's there. For example, say you're disassembling the VIC-20's startup routine:
You see this JSR $FE91 line and say to yourself, "I wonder what that is?" So you cursor up to it and type "V" (the Follow Tool) and hit ENTER:
The tool disassembles 16 lines of the subroutine called at that line and presents a new prompt. When you hit ENTER again:
Disassembly picks up from the original subroutine call.
Now, this is an interesting feature, and I might get some use out of it in real life. But right now I'm leaning against including it in a future wAx release. It's the kind of feature I'd like to see in a GUI-based cross disassembler, though, where multiple panes or windows are available. As a native assembler feature, it feels like it's missing elegance. There's not much hardship to typing in addresses.
But it's also possible that there's something here, and it could be worthwhile with some implementation improvement.
Experimental Assembler Features
Moderator: Moderators
- chysn
- Vic 20 Scientist
- Posts: 1205
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Experimental Assembler Features
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5
WIP: MIDIcast BASIC extension
he/him/his
WIP: MIDIcast BASIC extension
he/him/his
- Mike
- Herr VC
- Posts: 4845
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Experimental Assembler Features
That pretty much nails it.chysn wrote:It's the kind of feature I'd like to see in a GUI-based cross disassembler, though, where multiple panes or windows are available.
On later 8-Bit-CBMs, the improved screen editor allows to define windows. These windows can be used to 'lock' parts of a disassembly listing, so they remain on screen while the user inspects other parts of the program. Insertion of instructions while programming is helped by the ESC-I editor command, which inserts a blank line at the cursor position: after the missing instruction(s) have been entered, the auto address prompt automagically shifts the following instructions to their new place.
In short, the handling of any monitor can be improved by providing an enhanced screen editor. For example, one could have one or more buffers that store away a screen line - say four line buffers filled with f1, f3, f5 and f7; and recalling a screen line works with f2, f4, f6 and f8.
The Programmer's Aid cartridge features such an enhanced screen editor. Maybe some functions could be leveraged from it.
Re: Experimental Assembler Features
what if additionally f1/f3/f5/f7 function keys each saved a bookmark and f2/f4/f6/f8 switch back to where you were? or if Y jumps ahead, SHIFT Y takes you back maintaining a stack of bookmarks
- chysn
- Vic 20 Scientist
- Posts: 1205
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: Experimental Assembler Features
There's already a mechanism that can be leveraged to function as "bookmarks," and that's BASIC variable replacement:
Right now, numeric variables must be used for this purpose because string variables are internally surrounded by double quotation marks when expanded. This makes code more compact when using strings in code, and wards off the need to escape the apostrophe. I realized at the time that this decision would reduce the power of BASIC integration a little bit. For example, non-quoted replacement allows stuff like this (from a non-production feature branch):
But, really, who's going to do that? Nobody, that's who. Variables for operands are good enough, is still my judgment.
I like the bookmarking idea, though, and there might be ways to make that idea easier. Listening for function keys is sort of off the table for me.
If I make the hex parser ignore double quotation marks, then:
Right now, numeric variables must be used for this purpose because string variables are internally surrounded by double quotation marks when expanded. This makes code more compact when using strings in code, and wards off the need to escape the apostrophe. I realized at the time that this decision would reduce the power of BASIC integration a little bit. For example, non-quoted replacement allows stuff like this (from a non-production feature branch):
But, really, who's going to do that? Nobody, that's who. Variables for operands are good enough, is still my judgment.
I like the bookmarking idea, though, and there might be ways to make that idea easier. Listening for function keys is sort of off the table for me.
If I make the hex parser ignore double quotation marks, then:
Last edited by chysn on Sun Oct 01, 2023 11:36 am, edited 3 times in total.
- chysn
- Vic 20 Scientist
- Posts: 1205
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager