OSBGET
From BeebWiki
Read (get) a byte
Contents |
[edit]
Specification
| On entry: | |
| Y | = handle |
| On exit: | |
| A | = Byte read |
| X | preserved |
| Y | preserved |
| Cy | EOF status |
If the byte read is after the end of file, the carry flag is set on exit and the EOF-error-flag is set. After the EOF byte has been read, the next read produces an error. An error is generated if the object is a directory or doesn't have read access.
[edit]
Calling from BBC BASIC
-
b%=BGET#chcalls OSBGET.
[edit]
Special handles
Some systems allow BGET#0 to read from the character input stream via OSRDCH.
[edit]
Entry points
- BBC BASIC Entry Address: &FFD7
- 6502 Entry Address: &FFD7, vectors via &0216
- Z80 Entry Address: &FFD7, vectors via &FFD8
- 6809 Entry Address:
- 80x86 Entry Address: INT &43, vectors via 0000:010C
- 32000 Entry Address: SVC &0D
- PDP-11 Entry Address: EMT 9, vector &09
- ARM Entry Address: SWI &0A "OS_BGet", vector &0A
[edit]
Implementations
All filing systems implement OSBGET.
Jgharston 10:57, 2 September 2008 (BST)

