Great! No guarantee that your requests will be fulfilled, however.
Your "_xlat" macro works when converted to take a "length" or "size" parameter. But a "non-scalar" value isn't going to work.
Nasm never documents (AFAIK) what a "scalar" value is. A "non-scalar" value - a label, or "$", for example - is one which is going to be changed by the linker and/or loader. Nasm doesn't know what this value is going to be at runtime, and can use it only in situations where this isn't going to be a problem - *not* where it's going to affect the size of the code! Nasm can cope with an unknown value, but not with an unknown size. So a non-scalar (relocatable) value is never going to work as an argument to "times"... and a few other places.
My first thought was that "times 4 db $" wasn't going to work, because "$" is going to change with each repetition, and "times" can't cope. That isn't it, though. "times 4 dd $" does work, but "$" is evaluated only once, and the value repeated 4 times. Probably not useful. I'm not sure why "dd" works, but "db" makes Nasm think you're doing a one-byte relocation.
%macro _xlat 1
%assign i 0
%rep %1
db i
%assign i i+1
%endrep
%endmacro
org 100h
nop
nop
_xlat $ - $$
;_xlat $ ; no work!
times 4 dd $
; times 4 db $ ; no work!
times $ - $$ db 42
times 4 db $-$$
I don't know if that leaves you any better off...
FWIW, if you encounter a situation that requires you to revert to an earlier version, please let us know - it is generally intended *not* to break existing code, so it's probably a bug.
Best,
Frank