Generally, you'd have to study the documentation of nasm
to see what the construct is doing, then read the gas
manual on how to achieve the equivalent thing.
In this case, db
is defining some data bytes, and the equ
defines an alias for the length, using $
for the current address. The code for gas
is:
EatMsg:
.ascii "*Eat at Joe's*"
.byte 10
.equ EatLen, . - EatMsg
You could also incorporate the 10
(which is the ascii code of line feed) as
into the string.
The simplest solution would be to simply install nasm
, of course.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…