The part at the end that says
Code: Select all
n1: .db $10 ; multiplicand
n2: .db $15 ; multiplier
p: .DB $0 ; product
could be part of the problem. I initially misinterpreted the ".DB" (or ".db") because none of the 6502 assemblers I've used this notation, and I was thinking that n1 was stored at
address $0010, n2 at $0015, and p at $0000, which now I realize is incorrect. Since you're putting the actual variable space after the code and only leaving one byte for each, now with the modification for higher precision you will have to put in two bytes for each so the high byte of each does not overwrite the low byte of the next one. Then, put your inputs in the code there at n1 and n2, low byte first (as is customary with 6502).
For output, you can watch the content of p. You didn't tell us what kind of output is at "salida"; and when I added "salida+1", I had no way of knowing if that byte was available for the high byte. I probably should have used "salida2" which you never referenced except to define it.