While working on the SharpBASIC compiler I wonder how to define a null-terminated fixed length string.
Consider the following SharpBASIC code:
var buffer: string * 10 = $32;
This should be parsed into a NASM string with 10 spaces plus a null. The SharpBASIC compiler currently generates the following NASM code:
buffer times 10 db 32
times 11-$+buffer db 0
Is this the correct output or is there a better syntax?