OSBYTE &A0
OSBYTE &A0 (160) - Read VDU Variable, called by =VDU(n) from BASIC
This call returns variable number X in registers X and Y The VDU variables are stored in a machine-dependant location (&0300 in most 8-bit OSs), so this call should be made to read them. 16-bit values (eg &06/7) should be read by reading the low numbered location (eg &06).
As the VDU variables number 0 to 127, some platforms translate VDU variable numbers 128+ to the appropriate RISC OS OS_ReadVduVariables offset.
VDU Variables ------------- &00/1 Current graphics window left column in pixels &02/3 Current graphics window bottom row in pixels &04/5 Current graphics window right column in pixels &06/7 Current graphics window top row in pixels &08 Current text window left hand column &09 Current text window bottom row &0A Current text window right hand column &0B Current text window top column &0C/D Current graphics X origin in external coordinates &0E/F Current graphics Y origin in external coordinates &10/1 Current graphics X position in external coordinates &12/3 Current graphics Y position in external coordinates &14/5 Old graphics X position in external coordinates &16/7 Old graphics Y position in external coordinates &18 Current text X position (=POS) &19 Current text Y position (=VPOS) &1A Line within current graphics cell of graphics cursor &1B Graphics workspace/VDU queue &1F-&23 VDU queue &24/5 Current graphics X position in internal coordinates &26/7 Current graphics Y position in internal coordinates &28-&2F Bitmap read from screen by OSBYTE 135 &30-&49 Graphics workspace &4A/B Text cursor address for 6845 &4C/D Text window width in bytes &4E High byte of bottom of screen memory, readable as vdu variable &4D AND &FF00 &4F Bytes per character for current mode &50/&51 Screen display start address for 6845 &52/&53 Bytes per screen row &54 Screen memory size high byte, readable as vdu variable &53 AND &FF00 &55 Current screen mode (=MODE) &56 Memory map type 0 - 20K mode 1 - 16K mode 2 - 10K mode 3 - 8K mode 4 - 1K mode &57 Foreground text colour &58 Background text colour &59 Foreground graphics colour &5A Background graphics colour &5B Foreground plot mode &5C Background plot mode &5D/&5E General VDU jump vector &5F Cursor start register previous setting &60 Number logical colours -1 &61 Pixels per byte -1 (zero if text only mode) &62 Leftmost pixel colour mask &63 Rightmost pixel colour mask &64 Text input X position &65 Text input Y position BBC, Electron: Master: &66 Teletext output cursor character VDU 23,16 setting &67 Font explosion flags, b1=224-255 VDU 23,6 dot pattern in RAM, b7=32-63 in RAM &68 Font location, characters 32-63 Current dot pattern state &69 Font location, characters 64-95 Colour plotting ECF pattern number or zero &6A Font location, characters 96-127 Graphics foreground ECF pattern number or zero &6B Font location, characters 128-159 Graphics background ECF pattern number or zero &6C Font location, characters 160-191 b7 set when cursor off righthand edge of screen &6D Font location, characters 192-223 Graphics foreground colour &6E Font location, characters 224-225 Graphics background colour &6F-&7E Palette for colours 0 to 15 &7F Unused
See Also
Jgharston 22:15, 26 May 2009 (UTC)