wAx: Wedge Assembler/Disassembler

Basic and Machine Language

Moderator: Moderators

User avatar
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: wAx: Wedge Assembler/Disassembler

Post by chysn »

This is one of the plug-ins that's going on the cartridge. You supply a region of memory, and an optional "R" (for "Relocatable"), and ML2BAS (ML to BASIC) appends the assembly to the end of the current BASIC program, or generates a new BASIC program if there isn't one already.

Here's an example. This is the assembly to memory. Just a nested loop:
Screen Shot 2020-07-23 at 1.57.40 PM.png
Invoke the plug-in with the usual, 'start end+1, and LIST the result:
Screen Shot 2020-07-23 at 1.59.17 PM.png
To generate relocatable code, just put R at the end of the command (after NEWing the other program):
Screen Shot 2020-07-23 at 6.28.39 PM.png
Notice that with the R option, I'm not doing a regular disassembly of relative branch instructions; I'm putting them in as literal hex bytes, and then showing the mnemonic as a comment. This way, the code can be relocated by changing the counter (*) at the beginning.

If the tool runs out of BASIC memory during the operation, it reverses what it did and throws ?OUT OF MEMORY. The current BASIC program will just remain as it was, and you can choose a new range to append.
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
User avatar
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: wAx: Wedge Assembler/Disassembler

Post by chysn »

The ML2BAS tool also includes a hex dump generator. You can use this for entire programs (to generate machine language loaders that are about 12x faster than BASIC DATA statements), or data segments for programs. Here's an example of hybrid code/data generation by running the tool twice over two different ranges.

The example is simple, a call of PRTSTR with some text data at the end:
Screen Shot 2020-07-24 at 11.44.32 PM.png
Then, run ML2BAS over two ranges, one with or without the R (relocatable) modifier, and one with the H (hex dump generator) modifier:
Screen Shot 2020-07-25 at 12.00.38 AM.png
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
User avatar
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: wAx: Wedge Assembler/Disassembler

Post by chysn »

The wAx cartridge is now available in both Block 3 and Block 5 Editions. In the original cartridge, Block 3 was selected as a nod to tradition (VICmon), but Block 5 may be more practical when using contiguous BASIC memory expansion with a multi-expander.

https://www.etsy.com/listing/1005446199 ... -5-edition
IMG_4380.jpg
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
User avatar
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: wAx: Wedge Assembler/Disassembler

Post by chysn »

Based on work I recently did making a file browser for a game, I knocked out a quick wAx plug-in that displays a file directory. It formats the directory in such a way that you can cursor up to the line and press RETURN to load the program. It uses only memory that wAx already uses anyway, so it's unobtrusive.

I’ll include some form of name search, too. Need to consider what I want.

This will be included with the other plug-ins on the wAx cartridge.

Screen Shot 2021-08-24 at 5.54.49 PM.png
Screen Shot 2021-08-24 at 6.09.59 PM.png
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
User avatar
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: wAx: Wedge Assembler/Disassembler

Post by chysn »

Here's with the text search implemented. It's super-simple, "Does the needle appear anywhere in the haystack?" That's all I need, it'll find what I'm looking for almost always. I use these big memory cards whose directories are too big to fit in unexpanded memory, so this will be nice.

I may even set it as the default plug-in for the cartridge version of wAx. Right now there is no default.

Screen Shot 2021-08-24 at 9.58.59 PM.png
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
User avatar
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: wAx: Wedge Assembler/Disassembler

Post by chysn »

Rather than make Directory the default plug-in, I made a Menu plug-in that sets the plug-in vector and made that the default. You just cursor up to the appropriate line and press RETURN. You can restart wAx with SYS to reset it to the menu.
Screen Shot 2021-08-25 at 8.19.54 AM.png
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
Post Reply