395 80 JSR OSBYTE 90 TXA 100 JSR OSWRCH 110 RTS 120 ] 130 CALL &3500 Of interest here is line 90, which turns an exit parameter from OSBYTE (in the X register) into an entry parameter for OSWRCH (supplied in the A register). Try running the program. If you don’t press a key after RETURN , then the first character on the last line to be printed out is d , which has decimal ASCII code 100, which was the value loaded into the X register. Pressing a key will cause the key character to be displayed followed immediately by the the BASIC prompt, indicating that the program has finished.
What has happened is that OSWRCH has read the value in A, transformed it into a character and printed the character on the screen (without a line feed or carriage return). More details of OSWRCH and all the other operating system calls are given in chapter 45. The foregoing has probably left you somewhat unimpressed by the potentialities of assembly language programming, but hopefully the next chapter will change your views! The *FX commands and OSBYTE calls This section lists and details all the most useful *FX commands and OSBYTE calls. There are others which are recognised by the operating system but there is not sufficient space to document them here.
You are referred to the many other publications which are available concerning the BBC Microcomputer for descriptions of these other, somewhat esoteric calls. The decimal and hexadecimal calls which appear in the following tables are the values of a for *FX a, or the values to be loaded into the accumulator for the related OSBYTE call.