Assembler, part 4
What am I doing?
I've once again resumed working on the interface rather than the actual core; I still don't even know if any of this truly works. Sheesh.
Not a whole lot to report from yesterday as I practically spent the day reading while doing the odd bit of UI tinkering. Big thanks to Rob for reminding me about SyntaxBox! Scintilla is pretty horrible overall and SB is done so much better, so I'm glad the editor is now more solid. Code folding was extremely easy to implement, unlike Scintilla where I just couldn't be bothered and worked on another part instead.
Today I started a new control for displaying parsed instructions. Think of it as a ListBox but with no user interaction, and the "current item" is always vertically centred and highlighted; currently adding column support to tabulate the view. Oh, issue: I can't get the background transparent no-matter what. I've done millions of transparent controls in the past, so this is confusing the hell out of me.
Next, I need to have a go at actually executing instructions. I've done very little bit-work in .NET so I'm not sure how that's going to go, especially as I don't even know the syntax for VB.Net; presumably it's going to be bat-shit insane compared to C#.
Assembler, part 5
In the previous version, Assembler parsed down the entered code into
Now that property has been removed and all
All mnemonics for a CPU are defined within a
Some limited parsing is in for determining what the
Because of this, each
On the interface side of things (c'mon, like I can resist UI work) the syntax highlighting now colourises the datatype (or size as is the actual term) for mnemonics. Turned out this was achievable via making the datatypes an operator when it comes to highlighting as they don't need to be on word boundaries - thanks to Rob for the suggestion. Still more highlighting work required.
The Registers window now has a trace of what it parsed from the entered source code and displays the interpreted code. Changed the font to a mono-space one as the other just looked messy when registers' widths didn't line up. Sorry Segoe UI - not this time.
Assembler, part 6
Okay, okay; can't put off doing the operand parsing any longer if I want this project to progress any further.
Just like the (incomplete) line-by-line parsing of the entered sourced, I'm going with Regular Expressions. Everything is going to be regular expressions; regular expressions all the way down.
As there's no specific reason why the
There will no-doubt be more as I add parsing for additional features when I get the existing ones working. Types will certainly become more granular, such as specifying whether an
The next big step is to have the
Bit-work. All operations can work with either a byte, word, or long-word. Long-word is easy, but the other two will require bit manipulation of which I haven't really done much of in .NET.
Memory. Sure, the registers are currently just an
Initial thinking would be just to allocate an array that's a property of the
Assembler, part 7
Haven't quite gone ahead with actually executing instructions as yet because I re-worked the way a "machine" is implemented.
I ended-up ripping out the hard coded properties and features and made everything generic. There's now a set of
The potential issue here is that registers are now loosely typed. I'm not sure how to go about implementing the
When a new register is added to the
Anyway! If you wanted to add 8 Data registers, you'd do the following:
This will create 8 registers, all named D0 to D7. Basically, the index is applied directly after the base name.
Do CPUs only really have (general purpose) Data and Address registers? Could I replace the literal with an enum, instead?
Fetching a register? Like so:
With name being, say, "D6" to get the sixth Data register.
As I've (currently) implemented the
No changes have been made to mnemonics.
This currently just has a
As an excuse to use this new keyboard, I was going to rewrite a part of the FileSieve documentation but then I realised I didn't do a blog post for today. So here I am.
Today was spent working on FileSieve and getting command-line automation happening.
As part of my App Framework library, the Parameters class provided all the functionality I needed to get things moving fast. It was simply a case of reiterating over the
Due to this iterative nature, FileSieve can executes multiple commands from the command-line in sequence. So, for example: you can select a profile, start it, and then select another profile and start that, even making changes to it - and only it - beforehand.
The first added command was
This makes the GUI select the My Profile profile and make it active. All following commands are then executed on that profile.
Most of the commands emulate using the application's interface, such as
I did wonder about adding generic automation to the App Framework for all of my software, but it'll still take manual work to specify what's what. Probably isn't worth it, to be honest. Although I think Wake On LAN Ex will benefit from automation.
The 4.22 release will feature additional commands that aren't critical to using FileSieve from the command-line.
Oh, speaking of the command-line: the nomenclature has been changed from Command-Line to Automation. The reason being that I'd like to also add support for automating FileSieve usage via a text file. It'll basically be a top-to-bottom list of commands and parameters that FS iterates through executing one at a time.
To help with any debugging issues on the user's part, all automotive actions and their outcomes are logged under the
FileSieve 4.21 is available from FileSieve.com.
Comica Database Update
Oh my, no update for a few days? It's the end times!
Nah, nah; I just didn't work on anything of note to write about. Already, a lot of the stuff I blog about I would never have previously done as they're not what I'd call "major", or even exciting. But I'm making myself talk about them anyway as it keeps content coming, so don't go thinking I'm thinking that I'm working on major works of art or anything - it's just more kahnent to babble about.
Alright, Comica. Not much to report on this other than I pushed a database update out for the first time in a while. Or, at least tried to.
I received a "Comic not working" notification (a feature I built into Comica that allows users to notify me of knackered comics) and thought, "Eh - why not?". I then ran a "deep validation" within the Comica Editor to weedle out any obviously broken comics while I was fixing up the reported comic.
Thirty minutes later (yes, it takes a while to manually go through the comics that the Editor says is broken; this is why I don't do full updates often, especially as I could be working on my commercial software instead), all fixed. Hit Upload and... nothing. The little console app that does the actual uploading appeared and then immediately disappeared. Uh-oh.
Loaded up the source and, oh, I should probably upgrade all of the projects to .Net 4.7. Did that and realised the configurations (x86, x64) were all over the place; there were even Itanium configs in there for some reason. Cleaned it all up.
Stuck a break point in the uploader source and immediately found the problem: the computer name it was expecting was different, so it bailed out.
When I created the Database Uploader console app, I put a quick 'n dirty check in there to ensure that it only runs on my PC. Turns out I hadn't changed the name of the PC when I installed Windows a couple of months back.
Fixed that and everything ran as before.
This got me thinking about doing a bit of work on the "next generation" of Comica (the editor is really nice!) - except it would have to be free, and then the thinking stopped right there. Ya can't live on free, son.
Wasn't expecting that: made another release of FileSieve yesterday.
For no particular reason at all, a thought about the way FileSieve handles the
I had a feeling of dread. I wasn't sure why, but it was there. Something was... wrong.
When my conscious mind caught up with the sub-conscious, it occurred to me: profile processing (which is what
An enormous oversight as this means FileSieve is merrily executing commands while a profile is being processed, copying files and all sorts of stuff, while possibly nobbing things up left and right.
Loaded the code and then wondered how I was going to solve this. I forewent any semaphore or signalling as I wanted to get this update done and released ASAP. Instead, I made all automation commands asynchronous and then, in simple terms, busy-waited until it was complete.
I'm cheeky, me!
While I was in there, I decided to add support for allowing automation via an external file. FileSieve parses the file and then runs the encountered commands as though they were passed in via the command-line; lovely, lovely, code reuse.
As the file reading code is custom just for that task, I thought I'd allow line comments; any line that starts with a hash # character is ignored. Incidentally, all lines are trimmed of spaces.
Commands and their values can be spaced out however you want as, again, trimming is done before the fields are interpreted. As well as providing general flexibility in the syntax, it also avoids the commands/values looking all squashed together.
VB Runtimes Pack, release 8
Speaking of unexpected happenings, I got contacted a couple of days ago by someone asking me if the Visual Basic 6 Runtimes Pack was free for enterprise use (spoiler: it is).
The pack doesn't require me having to recompile anything using the Visual Basic 6 IDE, as I haven't had that thing installed in well over a decade, so I thought I'd repackage it in an updated installer.
Running the original VB Pack installer itself shows that it was littered with errors. Not errors in the files it was installing (well, maybe a couple - but more on that later), but in the instructions and license.
As with all of my software installers, there are three text documents the installer shows to the user.
There's the License that is shown at the very start which contains the licensing terms that must be agreed to before the installer will do its thing.
Second is the Before, which contains general information. In this case, it outlines what the pack is and what it'll install. Also included is the pack version and its release date, just like the other two docs.
Thirdly, and lastly, is the After. This is just a quick message letting the user know that everything is installed.
The problems are down to the site each document points to: they're wrong. As this pack was originally released way back in 2002, the URLs are pointing to my old site
Another problem is the release date. Each of the three documents mentioned above have entirely different dates! No idea how that happened.
Oh, the file errors that I alluded to above. There was a note in the Before text saying that any .dll registration errors that occur can safely be ignored. While setting other properties within the installer, I noticed there was a flag for ignoring any errors that are thrown during the
As well as general quality control, I wanted to get this site properly advertised in there as there is a huge amount of downloads of that pack. It seems people and companies just tell their customers to download the installer from my site. I might as well get a little bit of advertisement from it as it's not exactly like I'm gaining anything.
I seem to be on a major productivity roll lately. I realised why, too: this new Corsair K95 RGB Platinum keyboard (US version can be seen here). It might seem like I'm babbling on about mechanical keyboards like a zealot, but I had to plug in my previous rubber-domed Logitech G19 keyboard recently and holy crap. The holiest of holy craps.
Since I got this new keyboard (a week or two, now?), I just can't stop typing on it. I'm having to come up with excuses to work on something just so I can use it.
The upshot of this is that my productivity is going a bit insane. Even these posts you're reading are starting to be written days in advance - that's how much I'm writing now.
In fact, I've decided to add a whole new
I don't even want to imagine how much output has been gimped while having to use that previous rubber-johnny keyboard. Ugh.
Documentation - is it worth it?
It feels like I should be writing another post as it's been a few days. While that's technically true, there's been posts every day now but they were actually written earlier in the week and published once per day with the new timed publish update.
So I'll write a quick post about documentation. Specifically, the FileSieve documentation.
I haven't done any programming for the past couple of days and so thought I should at least do something, and that something was some FileSieve docs. I remembered a thing: a couple of days ago I looked at the Analytics for the FS documentation and it appears hardly anyone even looks at it.
So, really; am I just wasting my time with it? Honestly... yes, I think I am. I started reworking the single Automation page into an entire section before this realisation and now I'm starting to wonder if there's any point? Unlike a lot of the rest of the application, automation requires documentation.
Maybe I should just shove out the required info (and not bother polishing it all up) and be done with it and spend any other FileSieve time on the application itself.