assembly - HLA Hello, World - Assembler Error -
i've started going through randall hyde's "the art of assembly" start whetting palate. downloaded , installed hla 1.38 (which need 64-bit support) here , , wrote hello, world program described in both documentation listed there , in book above.
program helloworld; #include ("stdlib.hhf"); begin helloworld; stdout.put("hello, world!", nl); end helloworld; when run hla helloworld.hla, following error message: helloworld.asm:66: error: ambiguous operand size or operands invalid 'push'
the assembly line in question reads:
pushd 0 ;/* no dynamic link. */ as green can assembly language, have no idea how make work. i'm assuming there's discrepancy between version of gas , hla 1.38. question remains: now?
edit: tried compiling 'program', 'begin', , 'end' directives (removing possibility of being stdlib), , same result program nothing.
i on 64-bit crunchbang linux.
if want learn assembler, advise dropping hla , badly named book. usually, want use assembler have total control on generated code. hla takes away. , if want more high-level language not bother register allocation , pushes , pops, there better choices available.
as question, seems asm generated hla not of valid syntax gas. since it's targeting windows, seem linux not tested. try either adding ".intel_syntax noprefix" @ top of file, or adding $ immediate value (such 0), suspect there won't trivial fix.
Comments
Post a Comment