Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. rankamateur

    Printing Integers in NASM

    I'm not familiar with NASM syntax, so I can't help you there. However, here's a short program that demonstrates how to print integers in assembly using the C function library, using Gnu Assembler syntax: .section .data format: .asciz "L1 = %d L2 = %d\n" L1: .int 100 L2: .int 450 .section...
  2. rankamateur

    a.out format problem

    You could try building a linker script for ld. But, wouldn't it be easier to assemble your statr.asm module into an object format that ld does understand?
  3. rankamateur

    a.out format problem

    Perhaps the issue is that ld isn't expecting aout format object files. Have you tried informing ld that statr.o is an aout file? ld -o binary [object files] -b input-format statr.o where input format specifies aout? You should be able to obtain a list of the formats suppored by your linker...
  4. rankamateur

    a.out format problem

    Isn't a.out an executable format? I've never needed to link an a.out to produce an executable. I looked at the NASM manual, and found: nasm [ -f format ] [ -o outfile ] [ options... ] infile Have you tried: nasm -f aout -o yourfile yourfile.asm
  5. rankamateur

    function calling methods.

    In chapter 11 the author describes several methods of parameter passing: 1. Pass by Value - what you'd expect, passing the actual value to the called routine. 2. Pass by Reference: passing a pointer to the variable or structure. The author states that this technique can be less efficient...
  6. rankamateur

    function calling methods.

    Okay, that makes more sense. Thank you for the clarification.
  7. rankamateur

    function calling methods.

    I'm confused. Are you saying that, if you don't return what you've passed by value, the calling routine will somehow lose the value(s) it passed?
  8. rankamateur

    function calling methods.

    I'm not familiar with The Art of Assembly Language, so the author's terminology might be different. However, the two basic divisions of parameter passing to a function with which I am familiar are: by value, i.e., placing the actual value in a register, on the stack, or possibly in a global...

Part and Inventory Search

Back
Top