cpu% lc3/lc3 -f out.hex
Program complete, exiting
ADD R2,R2,x6 ; we need 6 loops to get to 'h'
NOT R2,R2 ; we want to be able to subtract this number so we'll 2's complements it
LOOPH ADD R0,R0,xf
ADD R3,R1,R2 ; compare if we're at 6 loops yet
E .FILL x65
L .FILL x6c
O .FILL x6f
WRLD .STRINGZ x20776f726c64210a
For those who care
The "6 loops" stuff is because I wanted to test the functionality I'd already implemented in the assembler to print some stuff out but I'd not implemented any of the raw data directives (`.FILL`, `.BLKW` and `.STRINGZ`) yet, and the immediate mode for `ADD` only takes a maximum 5-bit signed integer meaning the maximum hex value I could increment by was 0xf, and `h` is 0x68.
Hellsite.site is a small mastodon instance focused on community, tech, hacking and leftist views as well as being fierce rivals with notbird.site. We run a custom fork of the mastodon code called Goatstodon that runs some slight improvements. Come for the shitposting, stay for the infinite polls!