I would like to hear what Rob or others have to say about the
assembler syntax, but I actually like the syntax for the following
reason.  You only have to remember one syntax and not ten different
ones.  I would think, given that the structure of the compiler/loader
is very non-traditional, it would be difficult to provide all the
pseudo operations that the various native assemblers would require.

Best thing is not to write a lot of assembler code. :)




> On Sat, 09 Feb 2008 09:44:21 -0000, Anant Narayanan <[EMAIL PROTECTED]> wrote:
> 
>> Hi,
>>
>> I'm trying to make a Hello World program in assembly without depending
>> on libc. Here's what I have so far:
>>
>> DATA string+0(SB)/7, $"Hello\n\z"
>> GLOBL        string+0(SB), $7
>>
>> TEXT _main+0(SB), 1, $0
>>
>> // first arg; $1 = stdout
>> MOVL $1, (SP)
>> // second arg, address of string
>> MOVL $string+0(SB), 4(SP)
>> // third arg, $7 = length of string
>> MOVL $7, 8(SP)
>> // fourth argument, -1LL (vlong offset)
>> MOVL $-1, 12(SP)
>> MOVL $-1, 16(SP)
>>
>> // use pwrite syscall
>> MOVL $51, AX
>> INT  $64
>> RET
>>
> 
> No two cents from me. Just posted this to say that AT&T syntax is  
> "sickly." I suppose Anant Narayanan is assembling these using 8a, and  
> given the "symptoms" (the syntax, that is) 8a must be using AT&T syntax. I  
> am wondering if there is an Intel syntax assembler for Plan 9 (something  
> akin to Netwide Assembler or yet better Flat Assembler).
> 
> -- 
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Reply via email to