Read/Write palette
OSWord call | Action | Available on: | ||||
---|---|---|---|---|---|---|
(dec) | (hex) | BBC | Master | Electron | ||
11 | 0B | Read palette | x | x | x | |
12 | 0C | Write palette | x | x | x |
These routines read and write the colour palette. They take a 5 byte parameter block:
Parameter block
XY+ | Content | Read call | Write call |
---|---|---|---|
0 | Logical colour | Logial colour | |
1 | Physical colour | Current mapping | Required mapping |
2 | Reserved for future expansion | Set to 0 | |
3 | Reserved for future expansion | Set to 0 | |
4 | Reserved for future expansion | Set to 0 |
Write Palette
The OSWORD 12 write palette call performs the same task as a VDU 19 command which can be used from machine code using OSWRCH.
The advantage of using this OSWORD call rather than the conventional VDU route is that there is a significant saving in time.
Another advantage is that OSWORD calls can be used in interrupt routines while VDU routines cannot.
Last modified October 6, 2021: Move BBC content into subdirectory to allow more bbc content (23080e8)