If you are displaying multiple strings at different locations and the strings are located sequentially in memory, you can optimize by using the de register to set curRow and curCol rather than the hl register; it does add 1 byte for each "ld (xxxx), de" instruction, but you save 3 because you don't have to repoint hl to the next string after it is "messed up" with a screen-coordinate value.
Change
Code: Select all
ld hl, $0303
ld (curRow), hl
ld hl, strPtr1
b_call(_PutS)
ld hl, $0505
ld (curRow), hl
ld hl, strPtr2
b_call(_PutS)
to
Code: Select all
ld de, $0303
ld (curRow), de
ld hl, strPtr1
b_call(_PutS)
ld de, $0505
ld (curRow), de
b_call(_PutS)
when strPtr2 follows strPtr1 in memory to save 1 byte. Another alternative would be to save and retrieve hl from the stack; this would save de from being destroyed, but it would also keep you from using stack-related operations between the two blocks of code.