Difference between revisions of "OSRDSC"

From BeebWiki
Jump to: navigation, search
m (1 revision)
m (Implementations)
Line 51: Line 51:
  
 
==Implementations==
 
==Implementations==
The call is absent in MOS 0.10 and service call &0E enters paged ROMs with
+
The call is absent in MOS 1.00 and service call &0E enters paged ROMs with
Y≠&FF. The entry point exists in MOS 1.20 and is known as '''OSRDRM'''
+
Y≠&FF. The entry point exists in MOS 1.20 and is known as '''OSRDRM'''
 
but is undocumented, and accesses paged ROMs and main memory only. It is
 
but is undocumented, and accesses paged ROMs and main memory only. It is
 
documented in MOS 2.00 as '''OSRDSC''' and specified to read from paged ROM
 
documented in MOS 2.00 as '''OSRDSC''' and specified to read from paged ROM

Revision as of 23:54, 8 March 2015

Fetches a byte from paged ROM or display memory.

Specification

On entry:
Y = Slot number of ROM to be paged in
 ?&F6 = LSB of address to be read
 ?&F7 = MSB of address to be read
On exit:
A = contents of address
X,Y,C undefined

Fetches a byte from an address in paged ROM or the current display memory (in main or shadow RAM) and returns it in A. The address to be read is given in locations &F6 (low byte) and &F7 (high byte), and the paged ROM slot to read from is given in Y. If the address lies outside the paged ROM space then the value of Y is irrelevant.

When a paged ROM receives service call &0E, locations &F6 and &F7 are already set up with an appropriate address, and the ROM slot number can be derived from location &F5. If Y=&FF on entry then the operating system provides OSRDRM, so RFS ROMs can quickly serve data bytes on one another's behalf by calling OSRDRM as long as the MOS supports it.

MOS 2.00 introduces a counterpart routine, OSWRSC, to write a byte to the screen.

Calling from BBC BASIC

  • BASIC does not call OSRDSC

Entry points

  • BBC BASIC Entry Address: none
  • 6502 Entry Address: &FFB9
  • Z80 Entry Address: none
  • 6809 Entry Address:
  • 80x86 Entry Address: none
  • 32000 Entry Address: none
  • PDP-11 Entry Address: none
  • ARM Entry Address: none

Implementations

The call is absent in MOS 1.00 and service call &0E enters paged ROMs with Y≠&FF. The entry point exists in MOS 1.20 and is known as OSRDRM but is undocumented, and accesses paged ROMs and main memory only. It is documented in MOS 2.00 as OSRDSC and specified to read from paged ROM and the currently displayed screen memory. It is not implemented on non-6502 platforms and BBC BASIC does not emulate its entry point.

-- beardo 23:20, 5 October 2007 (BST)