So, some time ago, I discovered some odd problems with WDC Tools Assembler. This was back when I was working on the SIM module for DOS/65. Using the following code to load some pointers into the bottom of the stack page:
First Bug:
Code:
;
ldy #6 ;set index to 6
simset_lp lda sim_inttbl-1,y ;get SIM table data
sta $0100-1,y ;store into page $01 PEM area
dey ;decrement index
bne simset_lp ;loop until done
The above works fine, but, WDC Tools has a bug using the X register (in the above code) when the operand is: $0100-1 (it should be $00FF, but it becomes $FF), so no workie!
Second Bug:
Again, writing the SIM module.
Code:
sim_dcbtbl .DW dcb_a
.DW dcb_b
.DW dcb_c
.DW dcb_d
.DW dcb_e
.DW dcb_f
.DW dcb_g
.DW dcb_h
Initial code didn't support all 8 drives. Initial code used: .DW dcba, etc. for creating the dcb, table. When I increased the drives to h, the label "dcbh" caused an assembly error. Adding the "_" to make it "dcb_h" (fixed it.
Now I found Bug number 3, while working to port some of the DOS/65 utilities over.
In the Assembler utility, they use two page zero locations for an indirect pointer to routines. At one section in the code, they show:
Code:
JMP (TBLPTR) ;go to entry point
The assembler chokes on this with an invalid addressing mode, as TBLPTR is defined in Page Zero.
My workaround for this is:
.DB $6C
.DW TBLPTR
This generates the code as 3 bytes, which works.
Ah... tooling... they all have their little gotchas. I'll be sending a note off to Bill Mensch on this, see what he thinks... who knows, would be nice to get an updated assembler!