Topic
2 replies Latest Post - ‏2010-11-24T00:46:18Z by SystemAdmin
SystemAdmin
SystemAdmin
196 Posts
ACCEPTED ANSWER

Pinned topic Using an Assembler Callable Service in an inline assembly statement

‏2010-11-19T18:26:01Z |
I'm trying to use an Assembler Callable Service in an inline assembly statement. I thought this would be easy, but I can't get it to work.

Here's a sample use of an assembler Callable Service:

CALL BPX1WRT,(File_descriptor,
Buffer_address,
Buffer_ALET,
Write_count,
Return_value,
Return_code,
Reason_code)

The arguments to the CALL macro must in this case be names assigned to storage.

How do I get __asm to insert names of storage directly into the generated statement rather than copying the data or address of the data to registers and inserting the registers into the generated statement?

Thank you.

David Liebtag
Updated on 2010-11-24T00:46:18Z at 2010-11-24T00:46:18Z by SystemAdmin
  • brataj
    brataj
    11 Posts
    ACCEPTED ANSWER

    Re: Using an Assembler Callable Service in an inline assembly statement

    ‏2010-11-20T00:24:56Z  in response to SystemAdmin
    The easiest way to get this to work is to use a C function call, and not the __asm construct. The map and linkage #pragma's can be used to ensure that the proper external name and function linkage are used by the compiler (under either Metal or regular C).
    • SystemAdmin
      SystemAdmin
      196 Posts
      ACCEPTED ANSWER

      Re: Using an Assembler Callable Service in an inline assembly statement

      ‏2010-11-24T00:46:18Z  in response to brataj
      Bernie,

      You're right. That's a lot easier.

      Thanks a lot.

      BTW Does anyone know a good forum for asking questions about the Assembler Callable Services?

      David Liebtag