My first ARM assembly language program - we convert the 3D 10 PRINT program from 6502 assembler to ARM assembler, using the built-in assembler in BBC BASIC V for the ARM on the ARM Native coprocessor on the PiTubeDirect, and the TWIN text editor from the ARM Evaluation System software discs.
We first do a straight conversion then optimise things by using LDRB with post-increment, some reverse subtracts and adds with the barrel shifter, then some conditional execution of instructions. We then rewrite the linear feedback shift register (LFSR) random number function into a more ARM-friendly version, using a routine from the ARM Evaluation System's assembler instruction manual.
Finally, we explore how the ADR instruction works and ARM code loads an address into a register, and see how that makes code automatically relocatable.
Then, for a bonus moment, we switch over to the PiTubeDirect hognose release's native frame buffer to give things a generous performance boost.
5 сен 2024