Page 1 of 1

New Dev tool: META/L assembly language editor

Posted: Sat Jan 09, 2021 9:37 am
by Ed Minchau

Now live on GitHub, version 1.2.38.0664 of the META/L assembly language editor.

https://github.com/edrobotguy/cx16/blob/master/METAL1_2_38_0664update.zip

If you down'oad the zip file, extract it into the same folder as your X16 rev 38 emulator.  Then you'll find thorough documentation in docs/edit.html

the video playlist is here:





 


METAL1_2_38_0664update.zip

New Dev tool: META/L assembly language editor

Posted: Mon Jan 11, 2021 8:16 am
by Ed Minchau

Some people have been asking for the source code.  I didn't use a typical compiler to write this; it's a 15 Mb Libre Office spreadsheet.  Here it is:

https://github.com/edrobotguy/cx16/blob/master/MLeditor664final.ods


New Dev tool: META/L assembly language editor

Posted: Mon Jan 11, 2021 10:04 am
by kktos

Just had a glance to the XLS file.

Very peculiar ?

It would be kinda tricky for someone else to work on it. Not impossible, of course, but not so easy neither.

Are you doing the assembly directly in the XL sheet ? it seems like it.

Could it be possible to extract only the source files, as text files ? So someone (I do remember that some guy was willing to help) could help you make the project more traditional ? If you wish it ?

The purpose of this could be to have some help, ideas from others.

Anyway, what a tremendous job you did, Sir !

/kktos


New Dev tool: META/L assembly language editor

Posted: Mon Jan 11, 2021 4:42 pm
by Ed Minchau


6 hours ago, kktos said:




Just had a glance to the XLS file.

Very peculiar ?



It would be kinda tricky for someone else to work on it. Not impossible, of course, but not so easy neither.

Are you doing the assembly directly in the XL sheet ? it seems like it.



Could it be possible to extract only the source files, as text files ? So someone (I do remember that some guy was willing to help) could help you make the project more traditional ? If you wish it ?



The purpose of this could be to have some help, ideas from others.



Anyway, what a tremendous job you did, Sir !



/kktos



Yes it is very peculiar.  The program I was writing was very peculiar.  It is meant for reading and editing code that would otherwise be considered compiled code.

I had to really dig in to my bag of tricks to make this all work, and I've been working with 6502 for forty years.  I had to keep track of all of the labels and other metadata and store it in a very specific way.  There are 16 sheets (starting at EDIT, MLedit, LB1 etc) that have the majority of the code, entered in columns C, D, and E (commands, parameters, comments). So if you just wanted to extract the code you could go to those 16 sheets and copy columns B (the address) through E and paste them into Notepad or some other text editor or spreadsheet and manipulate the code that way.

Most of the rest of each of those sheets is converting the assembly language code into BASIC DATA statements and extracting the metadata from columns C, D, and E. The metadata gets stored in the sheets labeled Comments, LoBy, HiBy etc near the start of the spreadsheet in ascending order by address and bank number.  Those sheets are also where all that data is converted to lines of BASIC.  The last 30 sheets (starting with make-) assemble all of those BASIC lines together into something I could copy and paste into Notepad, and then copy into the emulator.  These included short sections of code to save each file. I'd just copy and paste them into the emulator and they'd automatically run, storing and saving each file for me.

Some of the code is wedged into the last available space on each bank.  Out of the 121 kb I had budgeted for the program there is less than 300 bytes left so I had to cram kludges into some gaps in the lookup tables and wherever I could find space.  A compiler program might have made it easier but there is no way it could make code as compact as I did, working with 16 files simultaneously.  Those bits of kludged-in code were first programmed with the spreadsheet, the digital values recorded, and then those plugged back in wherever I needed to put them, and the code erased.  So those chunks of code aren't immediately visible. 

There is no source code available for the file META/LIST.DAT.  That file was written and saved from within the META/L editor.  If you really want to look at it too, load it up ,8,1 and its starting location is 7000.

However, everything is visible from within the editor itself.  All of the subroutines appear in the editor exactly as they appear on the spreadsheet.  The stuff in kludge space is readable too, but there's no commenting (or any other metadata) in any of those subroutines. They are all fairly short subroutines though, and their location is marked in the spreadsheet in the Labels sheet in the first several columns between rows 180 and 225, which is in pages B9-BC in bank FE, crammed in between default label names and function names.  There are a few others scattered around on the first several sheets of the spreadsheet, added near the end of programming on an ad-hoc basis and crammed into whatever space I had available.

The Labels sheet contains all of the labels I had set as default and the ones I had just used to write the editor itself, starting in row 380.  But those are also all visible from within the editor, just load up the editor's metadata with META and then use LIST.

I think in two of the videos I'm making for the playlist I'll go over some of the subroutines in low RAM.

 


New Dev tool: META/L assembly language editor

Posted: Sun Jan 17, 2021 7:47 am
by Ed Minchau

I added a bunch of videos to the playlist already, and just added this one tonight.  I think the topic covered might interest a few people: Reverse-Compiling PETDRAW.





 


New Dev tool: META/L assembly language editor

Posted: Sat May 28, 2022 7:08 am
by Ed Minchau

I took the month of March off from programming altogether, and then at the end of March r39 dropped with some breaking changes.  So I've updated the editor to accommodate those changes, and while I was at it fixed a bunch of minor bugs and added some new features.  





The download is here:


 


Re: Programming Languages and Tools

Posted: Thu Feb 23, 2023 9:02 pm
by kelli217
Ed Minchau wrote: Thu Feb 23, 2023 1:25 am Assembler/Monitor:
The META/L editor is midway between an assembler and a monitor, basically a monitor that allows labels on memory addresses, and then references to those labels in the code. Works for r41, but I'm probably going to change the Insert and Delete functions to make them faster in future versions.
And a note to anyone using this one: Rather than using the typical three-letter instruction mnemonics commonly used for the 6500-series processors and having the assembler figure out which addressing mode to use by the way the operands are structured, Ed's program uses a four-letter mnemonic that encompasses the standard instruction abbreviation and adds an extra letter to indicate the addressing mode.

It makes the assembly process slightly faster because it saves a bit of parsing.

Re: New Dev tool: META/L assembly language editor

Posted: Sat Feb 25, 2023 5:22 am
by Ed Minchau
META/L has its strengths and weaknesses. It's great if you want to bang out and test something quickly. It sucks if you want to collaborate. I'm thinking of adding the ability to load and save text files in the standard notation, but it's way down my to do list.