1) Because of the two-byte BB,6D token you need to start at $9d93, not $9d95
2) Why are you loading a into l after you inc l? Surely you should see why that's pointless
3) IIRC, DispHL trashed HL, so it might not be a bad idea to wrap a push hl/pop hl around it.
4) .DB is for a _B_yte, and .DW is for a _W_ord, or 16 bits or two bytes. Since hl is a 16-bit register, you can only load a two-byte value into it. However, even better would be xor a \ ld h,a \ ld l,a, which is three bytes and saves the two-byte .DW statement.
5) Indirection: What you actually meant was ld hl,(Variable), because you want the contents of the memory address Variable, not the actual numerical address. Indirection and stack manipulation are the two most vital z80 ASM concepts you need to master before you can start writing good, efficient code.
Code: db $BB,$6D ;asmprgm token
start:
B_CALL _ClrLCDFull
ld b,100 ;load register b with 100
xor a
ld h,a
ld l,a
loop:
inc l
push hl
push bc ;b probably gets trashed too
B_CALL _DispHL
pop bc
pop hl
djnz loop
B_CALL _NewLine ;goto loop
ret ;
variable:
.dw $00
.end
END