August 11th, 2024

Its so exscything

I use an old-school European scythe to cut grass, which I then use as mulch or bedding for the chickens. Today, I scythed a small area since the chickens needed fresh bedding in their run. Conveniently, my Fitbit logged the activity!

In just 30 minutes, I got a good workout with an elevated heart rate, burned some calories, and managed to gather a 60-gallon garbage cart full of hay. When I dumped the hay in the chicken run, they immediately started spreading it out, hunting for bugs, and even nibbling on some of it.

Some assembly required

I started an x86_64 assembly tutorial last night. Although I’ve done some assembly several years ago, I don’t remember much. The concepts are pretty straightforward, but I’m currently stuck on printing numbers to the screen.

Printing text is simple: you just make a system call and provide the pointer to the location of your bytes.

section .data
    text db "Hello World!",10

section .text
    global _start

_start:
    mov rax, 1
    mov rdi, 1
    mov rsi, text
    mov rdx, 14
    syscall

    mov rax, 60
    mov rdi, 0
    syscall

You can find more Linux x86_64 system calls here.

But printing a number is a little more tricky. If I solve it I'll post an update.