These days, I code mostly in Java and C++. But today I am learning a new programming language.
New to me, anyway. Apparently Scala has been around since 2004.
My learning technique might be described as "the immersion method". I start with a runnable "Hello World" application and a goal. I make incremental changes in the direction of my goal, referring to online documentation each time I get stuck.
I've used tons of programming languages in my time. Circa 1989, my resume listed 16 programming languages, including the assembly languages of 7 different CPUs. Back then, I did most of my work in C. I'd never heard of C++, and Java hadn't been invented.
Post #301: Hewlett-Packard, The HP 9701 Distributed System based on HP 2100 family, A Multi-Computer System, Programming with Fortran, Algol and Assembler, 1960s.
TIME TO BE AN OLD MAN AND RANT ABOUT ASSEMBLERS AND DATES.
So I'm working on an April 1st Project as y'all may expect me to and as per usual, I grab the Sonic 1 disassembly off of the Retro Github (labels are up to date, stuff is tidy) and find that the build file now has a lua file next to it and I'm like "huh, that's weird, but alright"
But the more I dig in, I realise they've changed the assembler from ASM68K to AS
Now, this is normally not a big deal, outside of the assembler being ASs slow, it has most if not all instructions for 68K assembly and supports other chips (including the Z80 which is likely why it was swapped for it) and is supported by more systems than just windows.
The problem, outside of the aforementioned slowness every time you build, is the difference in fetching the current system date (I like to have the build date on the header itself nowadays instead of an arbitrary version number)
This is my usual Date function in ASM68K (top/left), it's a big mess because admitedly, I'm not a good coder (literally been proven this can be done more efficiently (bottom/right))
AS doesn't have these constants and only has DATE for fetching the date... which is... Month/Day/Year.... I don't like that at all
Furthermore it doesn't add a 0 for single digit days / months, which makes it a bigger burden to work with.
At least time is straightforward (though for some reason it includes the miliseconds)
Oh god I hope it accounts for the hours properly, it's way past 10 AM so I can't tell yet.
On the bright side, I can now use this for Sonic 2 and 3 (they've always been AS) but now I have to slow the fuck down when building and make sure shit is tidy or I'll have to wait another eternity.
I made this gif back in 2021 and it's more relevant now than ever.
There’s a problem when you build your own computer and therefore have to write your own operating system. All the things you rely on when coding in other environments – such as maths functions – are not there. You have to write them yourself.
The Zolatron 64, like most homebrew computers, is effectively a bare metal project. I’m writing all the code in assembly, talking direct to the 6502…