lda vmap_z_h,y ; zmachine mem offset ($0 -
and #%11100000
jsr print_byte_as_hex
jsr space
jsr dollar
lda vmap_z_h,y ; zmachine mem offset ($0 -
and #%00011111
jsr printa
I'm not sure those hard-coded ANDs are correct; wouldn't it be better to do something like:
lda vmap_z_h,y ; zmachine mem offset ($0 -
and #$ff xor vmem_highbyte_mask
jsr print_byte_as_hex
jsr space
jsr dollar
lda vmap_z_h,y ; zmachine mem offset ($0 -
and #vmem_highbyte_mask
jsr printa
In passing, I note that none of the tracing appears to shift the vmapz[hl] bytes one bit to the left to give the "true" Z-address high/mid bytes. Is this deliberate? I could see an argument for not worrying about this - it's debug code, perhaps best to keep it simple - but I thought I'd ask.
print_vm_map in vmem.asm does:
I'm not sure those hard-coded ANDs are correct; wouldn't it be better to do something like:
In passing, I note that none of the tracing appears to shift the vmapz[hl] bytes one bit to the left to give the "true" Z-address high/mid bytes. Is this deliberate? I could see an argument for not worrying about this - it's debug code, perhaps best to keep it simple - but I thought I'd ask.