Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

455 Command line interpreter (&FFF7) The machine operating system CLI is usually accessed from a high level language by starting a statement with an asterisk. For example: *MOTOR 0,1 The command line itself (excluding the asterisk) is then passed, without any further processing, to the CLI. Machine code programs can use all operating system commands by placing the address of a command line in the X (LSB) and Y (MSB) registers and calling &FFF7. This routine indirects through location &208. The command line should not start with an asterisk and must end with an &0D. In fact any leading asterisk or spaces will be stripped. The following BASIC program illustrates this:

10 DIM C 20 20 $C="MOTOR 1" 30 X%=C MOD 256 40 Y%=C DIV 256 50 CALL &FFF7 When RUN the cassette motor will turn on. The computer will have allocated a space for C – perhaps at location &1B0A in which case successive bytes would contain: Address Contents &1B0A 4D (M) &1B0B 4F (O) &1B0C 54 (T) &1B0D 4F (O) &1B0E 52 (R) &1B0F 20 (Space) &1B10 31 (1) &1B11 0D (Return) Of course, this particular example would have been easier as a *FX call or simply as *MOTOR 1 . However, complex commands may need this call.