[cfe-dev] GNU assembler syntax for strlen

Joerg Sonnenberger joerg at britannica.bec.de
Tue Oct 16 06:12:49 PDT 2012


On Tue, Oct 16, 2012 at 07:00:54AM -0400, Andrew Pennebaker wrote:
> My Hello World assembler<https://github.com/mcandre/mcandre/tree/master/gas/hello/freebsd>only
> works if I hardcode the message length. If I try to use pseudo-ops to
> calculate the length, the program either prints extra garbage, or fails to
> build.

msg: .asciz "Hello, world!\n"
.set len, . - msg

foo:
	push $len



More information about the cfe-dev mailing list