| OSFIND - Open or close files | |
|---|---|
| BBC->FAQ->API->OSFIND | Search |
| 6502 | Z80 | ARM | PDP11 | 32016 | 80x86 | On entry: | On exit: |
| A | A | R0 | R0 | R1 | AL | function | handle of opened file or 0 if not opened or function unsupported |
| XY | HL | R1 | BX | filename for open | preserved | ||
| Y | H | R1 | BX | handle for close | preserved |
| Function | |
|---|---|
| &00 | Close channel |
| &4x | Open for input |
| &8x | Open for output |
| &Cx | Open for update |
The bottom bits of A control how the file is opened:
Note that is is possible to open a directory, but no input or output operations can be done.
CLOSE#chn calls OSFIND &00
| chn=OPENIN fn$ calls OSFIND &40
| chn=OPENOUT fn$ calls OSFIND &80
| chn=OPENUP fn$ calls OSFIND &C0
| |
| &FFCE
| &FFCE, vectors via &021C
| &FFCE, vectors via &FFCF
|
| INT &40, vectors via 0000:0100
| SVC &0B
| EMT 12, vector &0C
| SWI "OS_Find", vector &0D
| |
| This page last updated 11-Aug-2006 |
|---|