Well, I found a listing file for 1581 DOS, apparently during the initial development, as it shows 150 errors and not complete, albeit for the same code level:
ftp://ftp.zimmers.net/pub/cbm/src/drives/serlib.zip According to the listing, it's using: "(c)1987 CBM Commodore 6502ASM B0.0" as the assembler. The macro definition is slightly changed as:
Quote:
WDTEST .macro
.ife <*!.$03
nop
.endif
.endm
During assembly, it seems to test to see if the instruction is going to start on an address where either bits 0 or 1 active. If not, the test results in a zero and it adds the NOP to ensure that the start address has either or both bits active as part of the address. The burning question now is why??
I also included a snippet of the assembly listing:
Code:
C428 11765+ WDTEST ; chk address
=0000 11766A .ife <*!.$03
C428 EA 11767A nop
11768A .endif
C429 AD 6000 11769 cmd7n lda wdstat
C42C 29 03 11770 and #3
C42E 4A 11771 lsr a
C42F 90 3E 11772 bcc v2
C431 F0 F6 11773 beq cmd7n
11774
C433 A9 FE 11775 lda #$fe ; id address mark
C435 8D 6003 11776 sta wddat
11777
11778
C438 11779+ WDTEST ; chk address
=0000 11780A .ife <*!.$03
C438 EA 11781A nop
11782A .endif
C439 AD 6000 11783 cmd7f lda wdstat
C43C 29 03 11784 and #3
C43E 4A 11785 lsr a
C43F 90 2E 11786 bcc v2
C441 F0 F6 11787 beq cmd7f
11788
C443 AD 6001 11789 lda wdtrk ; give him the track
C446 8D 6003 11790 sta wddat
11791
C449 11792+ WDTEST ; chk address
=0001 11793A .ife <*!.$03
11794A nop
11795A .endif
C449 AD 6000 11796 cmd7e lda wdstat
Now that the concept is known (pretty much by accident on my part), how does one use WDC Tools macro capabilities to implement it? BTW - I'm terrible at macros, yet another reason I never use them.