$ cat testpass.asm struc COORD .TopLeft: resw 2 .BottomRight: resw 2 endstruc section data .draw_data: istruc COORD at COORD.TopLeft, dw 10, 20 at COORD.BottomRight, dw 50, 150 iend $ nasm testpass.asm $ cat testfail.asm section data .draw_data: istruc COORD at COORD.TopLeft, dw 10, 20 at COORD.BottomRight, dw 50, 150 iend struc COORD .TopLeft: resw 2 .BottomRight: resw 2 endstruc $ nasm testfail.asm testfail.asm:7: error: non-constant argument supplied to TIMES $ nasm -v NASM version 2.15.03 compiled on Dec 28 2020 $ $ nasm testfail.asm -l testfail.lst -Lp testfail.asm:7: error: non-constant argument supplied to TIMES $ cat testfail.lst 1 2 section data 3 .draw_data: 4 istruc COORD 5 00000000 at COORD.TopLeft, dw 10, 20 6 00000004 at COORD.BottomRight, dw 50, 150 6 ****************** error: TIMES value -4 is negative 7 00000008 iend 7 ****************** error: non-constant argument supplied to TIMES 8 9 struc COORD 10 00000000 .TopLeft: resw 2 11 00000004 .BottomRight: resw 2 12 endstruc 13 $ $ nasm testfail.asm -E > efail.asm $ nasm efail.asm -l efail.lst -Lp testfail.asm:8: error: non-constant argument supplied to TIMES $ cat efail.lst 1 %line 2+1 testfail.asm 3 [section data] 4 .draw_data: 5 ..@2.strucstart: 6 times (COORD.TopLeft-COORD)-($-..@2.strucstart) db 0 7 %line 5+0 testfail.asm 5 00000000 dw 10, 20 5 %line 6+1 testfail.asm 7 times (COORD.BottomRight-COORD)-($-..@2.strucstart) db 0 7 ****************** error: TIMES value -4 is negative 8 %line 6+0 testfail.asm 6 00000004 dw 50, 150 6 %line 7+1 testfail.asm 8 00000008 times COORD_size-($-..@2.strucstart) db 0 8 ****************** error: non-constant argument supplied to TIMES 9 10 [absolute 0] 11 %line 9+0 testfail.asm 9 COORD: 9 %line 10+1 testfail.asm 11 00000000 .TopLeft: resw 2 12 00000004 .BottomRight: resw 2 13 COORD_size equ ($-COORD) 14 %line 12+0 testfail.asm 12 [section data] 12 %line 13+1 testfail.asm 14 $ $ cat e2.asm [section data] .draw_data: ..@2.strucstart: times (COORD.TopLeft-COORD)-($-..@2.strucstart) db 0 dw 10, 20 times (COORD.BottomRight-COORD)-($-..@2.strucstart) db 0 dw 50, 150 ; times COORD_size-($-..@2.strucstart) db 0 [absolute 0] COORD: .TopLeft: resw 2 .BottomRight: resw 2 COORD_size equ ($-COORD) [section data] $ nasm e2.asm $ cat e3.asm [section data] .draw_data: ..@2.strucstart: times (COORD.TopLeft-COORD)-($-..@2.strucstart) db 0 dw 10, 20 times (COORD.BottomRight-COORD)-($-..@2.strucstart) db 0 dw 50, 150 times COORD_size-($-..@2.strucstart) db 0 [absolute 0] COORD: .TopLeft: resw 2 .BottomRight: resw 2 COORD_size equ ($-COORD) [section data] $ nasm e3.asm e3.asm:8: error: non-constant argument supplied to TIMES $ $ cat e4.asm [section data] .draw_data: ..@2.strucstart: times (COORD.TopLeft-COORD)-($-..@2.strucstart) db 0 dw 10, 20 times (COORD.BottomRight-COORD)-($-..@2.strucstart) db 0 dw 50, 150 times (COORD_end-COORD)-($-..@2.strucstart) db 0 [absolute 0] COORD: .TopLeft: resw 2 .BottomRight: resw 2 COORD_end: COORD_size equ ($-COORD) [section data] $ nasm e4.asm $