Hello everyone,
I use Pasmo as my compiler and I have a problem with the allocation between registers.
If I write :
ld bc, hl
Pasmo returns an error because it expects a value instead of hl.
Is there an alternative?
Thanks,
Paolo
Hi Paolo, "ld bc,hl" is not a z80 instruction. If you want to assign hl to bc, you can use the stack like this
push hl
pop bc
or this option which is faster for the same amount of bytes
ld b,h
ld c,l
Hi,
How silly of me :doh:
Thanks for the tip, it obviously works great.
Paolo
Easy mistake to make, especially because a lot of assemblers will accept pseudo opcodes like this.
I always use this table to be sure about "accepted" instructions..
https://clrhome.org/table/