Welcome, Guest. Please login or register.

Author Topic: API Question  (Read 2560 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: API Question
« on: February 15, 2008, 08:05:57 PM »
No, that's wrong! A library is a collection of related functions...

You open the library, this gives you address of the jump table. The jump table is a list of address pointing the library's functions.

When you want to use one the functions, you goto the jump table and the select the pointer you know points to the function you want (these are at documented offsets). You fill the CPU registers with data, jump to the function and wait for the CPU execution to return to your program, the CPU regs now contain the function result.

Simple really!

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: API Question
« Reply #1 on: February 15, 2008, 09:19:24 PM »
Quote

trekiej wrote:
@ Piru
http://en.wikipedia.org/wiki/System_call
I did see Wikipedia earlier and it helps.


AmigaOS (and its clones)  doesn't use interrupt based system calls because every thing runs in a single address space and so there is no need to change memory context. So that wiki article isn't relevant to Amiga programming.