Implementing simple sort algorithms in ARM Assembly (part 1)

A while back I started to learn some ARM assembly on the Raspberry Pi (out of curiosity, for no other better reason). I thought it would be interesting to couple this with re-learning some of the basic/standard/common algorithm at the same time, such as common sort algorithms.

So as my first step, since this is turning out to be far more work than I expected (!), here’s my ARM ASM source so far to iterate through a list of 4 byte integer values and print the values to the console using C’s printf. I’ll post further updates as I make progress:

[code]
.global main
main:
push {ip, lr}
MOV R6, #0 @offset to data
loop:
LDR R0, =output @load addr of output string
LDR R5, =nums @ addr of string to R5
LDR R4,[R5,R6] @load current num from R5 with offset R6
MOV R1,R4 @move num for output
BL printf
CMP R6,#16 @ 0 plus 4*4bytes for 5 entries in array
ADD R6,R6, #4 @inc offset by 4 bytes
BNE loop
_exit:
POP {ip, lr}
MOV R1, #0
MOV R7, #1
SWI 0
nums:
.word 5,2,7,1,8
.data
output:
.asciz "%d\n"
[/code]

I’m sure there’s better ways I can approach this limited code so far, but I’ll come back and revisit this again later. If anyone wants to pull or browse the source so far (and other snippets), it’s on github here: https://github.com/kevinhooke/learning-arm-asm

Windows 10 Activation Issues on Mac Parallels 9 and 10 for Bootcamp VMs

Parallels has a neat feature to allow you to create a VM from a bare metal install of Windows in the Bootcamp partition (rather than having it installed to a file representing a virtual disk on the host). This allows you to either natively boot straight from the Bootcamp partition, or boot in a VM running on a Mac OS X host.

For Windows 8.x, this worked fine even though Windows Activation saw the bare metal install and when running in the VM as two different installs. Previously one would activate as normal, and the other would require a call to the Microsoft number to get a new activation code. Once you had activated both, then you could boot either and both would be activated from one license.

On Windows 10 however, it looks like which ever you boot second, it sees the activation code already used on one of your Windows 10 devices, and then refuses to activate. This is discussed in this Parallels forum post here. So far it seems if you leave Windows 10 booted for ‘long enough’ eventually it will activate itself? I’m having this issue, so leaving my unactivated native boot up and running for a while to see whether it activates or not.

Ars Technica: Connecting a TRS-80 model 100 to the internet

For some reason I find connecting any dial-up modem era computer or earlier to the internet rather interesting. Not because a computer this old would make a great device to use to surf the net, because of course it doesn’t. It’s a terrible user experience. This article therefore over at Ars Technica caught my attention, about connecting a TRS-80 model 100 laptop to the internet, using homebrew serial cable connections and various other technical noodlery to get working.

Maybe it was this intro to the article that got my attention:

The true test of a man’s patience is crimping pins onto the end of a cable that leads to building a custom serial cable—especially if it’s the first time you’ve even handled a serial cable in a decade.

Yep, been there recently. I posted a while back on G+ about connecting an Kantronics Packet Radio TNC (Terminal Network Controller) to my Atari 1040ST, for no other reason than at the time that this was the only computer I had available on my desk that still had an old school style DB25 serial port connector.

I’ve been shopping for a while to add network and/or SD Card disk support to my Atari ST, but still wondering if I really want to spend this much on adding support to something that I only tinker with occasionally? On my shopping list is either one of these or one of these, but maybe a better option would be one of these FPGA boards with support for a number of different hardware devices. This will probably give me more flexibility to tinker with a number of platforms. Choices choices. 🙂