Hi. the instruction works like this: H:A / X. Must load the 16-bit value (dividend) in H:A as a single record and the divisor in X.
You can use the following:
Load H:X with LDHX instruction and pass the value of X to A. Then load X with the divider 8 bits.
Example:
LDHX #4532
TXA
LDX #34
DIV
The cocient in ACCA the remainder in H. thus, leading to 0 in A is a decimal add to divide again
Ej2. another way:
LDA #45
PSHA
PULH
LDA #32
LDX #34
DIV
EDiting: I saw a response HX / A. It's wrong. It's not how it works.