F$Load

From NitrOS-9
Jump to: navigation, search
Load Loads a module or modules from a file
OS9 F$Load 103F 01

Entry Conditions

A type / language code; 0 = any language / type

X address of the pathlist (filename) (See the following example)

Exit Conditions

A language / type code

B attributes / revision level (if no error)

X address of the last byte of the pathlist (filename) + 1 (See the following example)

Y primary module entry point address

U address of the module header

Error Output

CC carry set on error

B error code (if any)

Additional Information

  • The Load call loads one or more modules from the file specified by a complete pathlist or from the working execution directory (if an incomplete pathlist is given).
  • The file must have the execute access bit set. It also must contain one or more modules with proper module headers.
  • NitrOS-9 adds all modules loaded to the system module directory. It links the first module read. The exit conditions apply only to the first module loaded.
  • Before the Load call:
/ D 0 / A C C T S R C V $0D
X                        
  • After the Load call:
/ D 0 / A C C T S R C V $0D
                        X
  • Possible errors:
    • Module directory full
    • Memory full
    • Errors that occur on the Open, Read, Close, and Link system calls.

IOMan