Below you will find pages that utilize the taxonomy term “Programming”
April 19, 2024
wAx the VIC-20
Wax Over the years, I’ve looked for an Assembler for the VIC-20. Sure, there are great cross-assemblers like Kick Assembler, but I wanted something that would run on the VIC-20 itself.
Is the VIC-20 a good machine on which to write assembly? Maybe not ON the machine. The 22-column screen is a bit limiting, but after spending so much time in Turbo Macro Pro on the C64, I wanted to see what I could do on the VIC-20 natively.
April 5, 2024
10 PRINT on the HP-42s
Over the years, I’ve been on a silly quest to do 10PRINT on as many things as I can. They end up on X, here, or sometimes both.
I hadn’t considered it before because I just figured I couldn’t print the "/" and "\" characters on the HP-42s.
I was wrong. It’s pretty easy. After a few minutes in the manual, I figured it out.
00 { 45-Byte Prgm } 01▸LBL "TEN" 02 RAN 03 RAN 04 X>Y?
March 21, 2024
The McNuggets Problem
My son, now 25, was a McNuggets fan. Can you blame him? They’re delicious. He’s always been into numbers and puzzles, so I introduced him to the McNuggets problem when he was about 10.
This classic puzzle was a fun way to keep him occupied and teach him programming. The problem is simple: McDonald’s used to sell Chicken McNuggets in 6, 9, and 20 packs. What is the largest number of McNuggets you cannot buy using these package sizes?
March 13, 2024
Back to the basics with BASIC (and Python): Binary Search
Back to the basics with basic Let’s say for a moment that we’ve got an ordered list of numbers.
1,3,5,7,9,11,13,15,17,19,21,23,25 There are 13 values here and we want to check if the number 25 is in this list.
One way to do this would be to loop over each element in the list and check to see if it matches what we’re looking for.
In BASIC, we’d do something like
January 11, 2024
Machine Language: Count Faster on 6502
I’ve done a lot of silly math, ciphers and asked a lot of my vintage hardware on this site over the years. But I’ve not talked a ton about optimizing code for faster results.
Today, we will count from 0 to 2^24-1 (16,777,215). Nothing else. Count, time it, and see how fast we can get it to go.
Rust In Rust on my 2020 MacBook Pro:
use std::time::{Instant}; fn main() { // Start timing let start = Instant::now(); // Loop from 0 to 16777215 for _i in 0.