The length is still only one byte, but the extra zero means we can load
the BC in a single instruction rather than having to prat about with
setting up the two halves separately -- and loading C via A because of
instruction-set limitations.
jr nz, prnl
;; OK, so just print the value.
- ld a, (len)
- ld b, 0
- ld c, a
ld hl, buf - 1
+ ld bc, (len)
add hl, bc
ld b, c
;; Initial state. The buffer notionally continues for another 254
;; bytes, but there's no point in including them in the image.
-len: db 1
+len: db 1, 0
buf: db 1