OSFIND - Open or close files | |
---|---|
BBC->FAQ->API->OSFIND | Search |
6502 | Z80 | PDP11 | 80x86 | 31016 | ARM | On entry: | On exit: |
---|---|---|---|---|---|---|---|
A | A | R0 | AL | R1 | R0 | function | handle of opened file, or 0 if not opened, or function unsupported |
XY | HL | R1 | BX | R2 | R1 | filename to open | preserved |
Y | H | R1 | BX | R2 | R1 | handle to 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
| &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 |
---|