Next Previous Contents

## 9. Other hints

## 9.1 Passing arguments to the program

Command line arguments can be passed to `main()` after BLOAD. Since this is not supported by BASIC, the following syntax was chosen:

> `

>     ]CALL2051:REM ARG1 " ARG2 IS QUOTED" ARG3 "" ARG5

> `

1. Arguments are separated by spaces.
2. Arguments may be quoted.
3. Leading and trailing spaces around an argument are ignored. Spaces within a quoted argument are allowed.
4. The first argument passed to `main` is the program name.
5. A maximum number of 10 arguments (including the program name) are supported.

## 9.2 Function keys

These are defined to be OpenApple + number key.

## 9.3 Interrupts

The runtime for the enhanced Apple //e uses routines marked as `.CONDES` type `interruptor` for ProDOS 8 interrupt handlers. Such routines must be written as simple machine language subroutines and will be called automatically by the interrupt handler code when they are linked into a program. See the discussion of the `.CONDES` feature in the assembler manual.

## 9.4 DIO

The function dio_open() has the single parameter `drive_id` to identify the drive to be opened. Therefore an Apple II slot and drive pair is mapped to that `drive_id` according to the formula

        drive_id = (slot * 2) + (drive - 1)

so that for example slot 6 drive 1 is mapped to `drive_id` 12.

The function dio_open() succeeds only if a formatted disk is present in the drive. However intentionally no check is performed on the presence of a ProDOS 8 disk. Therefore access to all standard 16-sector disks (as for instance DOS 3.3) is possible.

Next Previous Contents