This article is from the Apple II Csa2 FAQ, by Jeff Hurlburt with numerous contributions by others.
You use the ProDOS Machine Language Interface (MLI). The MLI is responsible for carrying out nearly all of the functions (Read Block, Write Block, and 24 others) which ProDOS can perform. Machine language programs call ProDOS by doing a JSR to the MLI at $BF00. To determine which function to perform, ProDOS examines the "command" byte immediately following the JSR instruction. Immediately after the command byte come two more bytes that point to the command's parameter list. When the call completes, it returns to the code immediately following the parameter list pointer. A ProDOS MLI call looks something like this: 20 00 BF JSR MLI 80 DB COMMAND_CODE 50 03 DW PARAM_LIST_LOCATION B0 __ BCS ERROR In the above, the command code ($80) says "Read a block" and the parameter list is located at $0350. The MLI call returns with the carry flag set and an error code in the accumulator if an error occurred; so, a simple error check (the Branch if Carry Set instruction) is often the next instruction which is executed. For a detailed description of functions including command codes and parameters, see a ProDOS manual or one of the other references mentioned in Q&A 040 below. _______________________ By: Rubywand