When calling the OSCLI routine from machine code you will need to use the absolute address &40F7. However, when CALLing this routine from BBC BASIC it is recommended that you use the BBC Micro-compatible address &FFF7.
This routine passes a string to the command-line interpreter. It performs the same job as the OSCLI BASIC statement.
On entry HL should point to the CR-terminated command string. Any leading '*'s and spaces are skipped.
10 oscli=&40F7 20 DIM listPrograms 16 30 FOR pass=0 TO 1 40 P%=listPrograms 50 [ 60 OPT pass*2 70 LD HL,command 80 JP oscli 90 .command 100 DEFM "CAT *.PRG" 110 DEFB &0D 120 ] 130 NEXT pass 140 CALL listPrograms