Difference between revisions of "OSWORD &51"

From BeebWiki
Jump to: navigation, search
m (moved OSWORD 51 to OSWORD &51)
 
m (1 revision)
Line 1: Line 1:
 
[[Category:OSWORD]]
 
[[Category:OSWORD]]
OSWORD &51 (81 ) - Get maximum heap block size DVR
+
==DVR==
 +
OSWORD &51 (81) - Get maximum heap block size (DVR)
 +
  On entry:
 +
      XY=heap handle, points to heap block
 +
  On exit:
 +
      XY+0..1=size of the largest block available.
 +
  If the call failed XY+0..1 is set to zero, C is also set.
  
XY is a heap handle.
+
==CDFS==
On exit:
+
OSWORD &51 (81) - Write Real-Time clock (CDFS)
  XY+0..1=size of the largest block available.
+
  On entry:
  If the call failed, XY are preserved, C is set,
+
      XY?0 = seconds 0-59
  and XY+0..1 is set to zero.
+
      XY?1 = minutes 0-59
 +
      XY?2 = hours 0-23
 +
      XY?3 = day of week 1-7, 1=Sunday
 +
      XY?4 = date of month 1-31
 +
      XY?5 = month 1-12
 +
      XY?6 = year 00-99
  
 +
==HKSET==
 +
OSWORD &51 (81) - HKSET Support (SEHK)
 +
    On entry:
 +
        XY?0  = command
 +
        XY+1.. = any parameters
 +
    On exit:
 +
        XY?0  = result:
 +
                &00=ok
 +
                &FF=signal fault
 +
                &FE=no acknowledge from hardware
 +
                &FD=no printer
 +
        XY+1.. = any additional returned data
  
OSWORD &51 (81 ) - Write Real-Time clock CDFS
+
===Commands===
 
+
====1 - read the news line====
On entry:
+
    On entry:
  XY?0 = seconds 0-59
+
        XY?0   =&01
  XY?1 = minutes 0-59
+
        XY+1..2=address to read up to 80 characters + cr
  XY?2 = hours 0-23
+
    On exit:
  XY?3 = day of week 1-7, 1=Sunday
+
        XY?0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware
   XY?4 = date of month 1-31
+
====2 - read a chinese character definition====
  XY?5 = month 1-12
+
    On entry:
  XY?6 = year 00-99
+
        XY?=&02
 
+
        XY!1   =address in I/O processor to read 32 bytes
 
+
        XY?5   =&80 for absolute ROM address, &00 for character number
OSWORD &51 (81 ) - HKSET Support SEHK
+
        XY?=byte 0
 
+
        XY?=byte 1
On entry:
+
    On exit:
   XY?0=reason code
+
        XY?0=result: &00=ok
   1 - read the news line
+
                    &FF=no character ROM found
   2 - read a chinese character definition
+
                    &F0=character ROM 0 not found
  3 - get bytes from a page in remote memory
+
                    &0F=character ROM 1 not found
  4 - test remote hardware
+
                    &E0=number in byte 0 and byte 1 out of range
   5 - print stock page to screen or printer
+
====3 - get bytes from a page in remote memory====
   6 - get new stock/teletext page (slow)
+
    On entry:
   7 - get new stock/teletext page (fast)
+
        XY?0  =&03
   8 - enter HKSET in I/O processor
+
        XY!1  =data address in I/O processor
 +
        XY?5   =&00 for teletext page, &80 for stock page
 +
        XY?=Handle
 +
        XY?7   =Start Row (0-24)
 +
        XY?8   =Start Column (0-79 for stock page, 0-39 for teletext page)
 +
        XY!9  =Number of bytes to read
 +
                        0-&7CF for stock page, 0-&3E7 for teletext page
 +
    On exit:
 +
        XY?0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware
 +
====4 - test remote hardware====
 +
    On entry:
 +
        XY?0   =&04
 +
    On exit:
 +
        XY?0=result: 0=ok, otherwise a bitmap of the chapters with errors
 +
                    in, b0=error in chapter 1, b7=error in chapter 8.
 +
====5 - print stock page to screen or printer====
 +
    On entry:
 +
        XY?0   =&05
 +
        XY?1    = &80=screen only, &C0=screen and printer
 +
        XY?2    = Handle
 +
    On exit:
 +
        XY?0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware
 +
                    &FD=no printer
 +
====6 - get new stock/teletext page (slow)====
 +
    On entry:
 +
        XY?0   =&06
 +
        XY?1  =&00 for teletext page, &80 for stock page
 +
                For a teletext page:
 +
                XY?2    = Magazine      (0-&7)
 +
                XY?3    = Page Tens    (0-&F)
 +
                XY?4    = Page Units    (0-&F)
 +
                XY?5    = Hours Tens    (0-&3)  Here and below is
 +
                XY?6    = Hours Units  (0-&F)  the Time Extension
 +
                XY?7    = Minutes Tens  (0-&7)  Usually fill
 +
                XY?8    = Minutes Units (0-&F)  with zeros
 +
                For a stock page:
 +
                XY?2    = LS Byte Stock Code (BCD)
 +
                XY?3    = MS Byte Stock Code (BCD)
 +
                          eg to get stock 16 XY?2=&16, XY?3=0
 +
                          Stock pages are numbered 0 to 399
 +
    On exit:
 +
        XY?0=result: &FF=signal fault, &FE=no ack from hardware
 +
                    otherwise, handle to refer to the page
 +
                    in future calls. 0=no more handles.
 +
====7 - get new stock/teletext page (fast)====
 +
    On entry:
 +
        XY?0   =&07
 +
        XY?1  =&00 for teletext page, &80 for stock page
 +
                For a teletext page:
 +
                XY?2    = Magazine      (0-&7)
 +
                XY?3    = Page Tens    (0-&F)
 +
                XY?4    = Page Units    (0-&F)
 +
                XY?5    = Hours Tens    (0-&3)  Here and below is
 +
                XY?6    = Hours Units  (0-&F)  the Time Extension
 +
                XY?7    = Minutes Tens  (0-&7)  Usually fill
 +
                XY?8    = Minutes Units (0-&F)  with zeros
 +
                For a stock page:
 +
                XY?2    = LS Byte Stock Code (BCD)
 +
                XY?3    = MS Byte Stock Code (BCD)
 +
                          eg to get stock 16 XY?2=&16, XY?3=0
 +
                          Stock pages are numbered 0 to 399
 +
    On exit:
 +
        XY?0=result: &FF=signal fault, &FE=no ack from hardware
 +
                    otherwise, handle to refer to the page
 +
                    in future calls. 0=no more handles.
 +
====8 - enter HKSET in I/O processor====
 +
    On entry:
 +
        XY?0  =&08
 +
    On exit:
 +
        No exit, as language is entered. This is an incorrect way of entering
 +
        a language, and this call should not be used. A language should always
 +
        be entered via OSCLI or OSBYTE 142.
  
 
==See Also==
 
==See Also==
 
* http://mdfs.net/Docs/Comp/BBC/Oswords
 
* http://mdfs.net/Docs/Comp/BBC/Oswords
 
+
[[User:Jgharston|Jgharston]] 15:05, 30 July 2012 (UTC)
[[User:Jgharston|Jgharston]] 13:42, 26 May 2009 (UTC)
 

Revision as of 23:58, 28 August 2013

DVR

OSWORD &51 (81) - Get maximum heap block size (DVR)

 On entry:
     XY=heap handle, points to heap block
 On exit:
     XY+0..1=size of the largest block available.
 If the call failed XY+0..1 is set to zero, C is also set.

CDFS

OSWORD &51 (81) - Write Real-Time clock (CDFS)

 On entry:
     XY?0 = seconds 0-59
     XY?1 = minutes 0-59
     XY?2 = hours 0-23
     XY?3 = day of week 1-7, 1=Sunday
     XY?4 = date of month 1-31
     XY?5 = month 1-12
     XY?6 = year 00-99

HKSET

OSWORD &51 (81) - HKSET Support (SEHK)

   On entry:
       XY?0   = command
       XY+1.. = any parameters
   On exit:
       XY?0   = result:
                &00=ok
                &FF=signal fault
                &FE=no acknowledge from hardware
                &FD=no printer
       XY+1.. = any additional returned data

Commands

1 - read the news line

   On entry:
       XY?0   =&01
       XY+1..2=address to read up to 80 characters + cr
   On exit:
       XY?0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware

2 - read a chinese character definition

   On entry:
       XY?0   =&02
       XY!1   =address in I/O processor to read 32 bytes
       XY?5   =&80 for absolute ROM address, &00 for character number
       XY?6   =byte 0
       XY?7   =byte 1
   On exit:
       XY?0=result: &00=ok
                    &FF=no character ROM found
                    &F0=character ROM 0 not found
                    &0F=character ROM 1 not found
                    &E0=number in byte 0 and byte 1 out of range

3 - get bytes from a page in remote memory

   On entry:
       XY?0   =&03
       XY!1   =data address in I/O processor
       XY?5   =&00 for teletext page, &80 for stock page
       XY?6   =Handle
       XY?7   =Start Row (0-24)
       XY?8   =Start Column (0-79 for stock page, 0-39 for teletext page)
       XY!9   =Number of bytes to read
                        0-&7CF for stock page, 0-&3E7 for teletext page
   On exit:
       XY?0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware

4 - test remote hardware

   On entry:
       XY?0   =&04
   On exit:
       XY?0=result: 0=ok, otherwise a bitmap of the chapters with errors
                    in, b0=error in chapter 1, b7=error in chapter 8.

5 - print stock page to screen or printer

   On entry:
       XY?0   =&05
       XY?1    = &80=screen only, &C0=screen and printer
       XY?2    = Handle
   On exit:
       XY?0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware
                    &FD=no printer

6 - get new stock/teletext page (slow)

   On entry:
       XY?0   =&06
       XY?1   =&00 for teletext page, &80 for stock page
               For a teletext page:
                XY?2    = Magazine      (0-&7)
                XY?3    = Page Tens     (0-&F)
                XY?4    = Page Units    (0-&F)
                XY?5    = Hours Tens    (0-&3)  Here and below is
                XY?6    = Hours Units   (0-&F)  the Time Extension
                XY?7    = Minutes Tens  (0-&7)  Usually fill
                XY?8    = Minutes Units (0-&F)  with zeros
               For a stock page:
                XY?2    = LS Byte Stock Code (BCD)
                XY?3    = MS Byte Stock Code (BCD)
                          eg to get stock 16 XY?2=&16, XY?3=0
                          Stock pages are numbered 0 to 399
   On exit:
       XY?0=result: &FF=signal fault, &FE=no ack from hardware
                    otherwise, handle to refer to the page
                    in future calls. 0=no more handles.

7 - get new stock/teletext page (fast)

   On entry:
       XY?0   =&07
       XY?1   =&00 for teletext page, &80 for stock page
               For a teletext page:
                XY?2    = Magazine      (0-&7)
                XY?3    = Page Tens     (0-&F)
                XY?4    = Page Units    (0-&F)
                XY?5    = Hours Tens    (0-&3)  Here and below is
                XY?6    = Hours Units   (0-&F)  the Time Extension
                XY?7    = Minutes Tens  (0-&7)  Usually fill
                XY?8    = Minutes Units (0-&F)  with zeros
               For a stock page:
                XY?2    = LS Byte Stock Code (BCD)
                XY?3    = MS Byte Stock Code (BCD)
                          eg to get stock 16 XY?2=&16, XY?3=0
                          Stock pages are numbered 0 to 399
   On exit:
       XY?0=result: &FF=signal fault, &FE=no ack from hardware
                    otherwise, handle to refer to the page
                    in future calls. 0=no more handles.

8 - enter HKSET in I/O processor

   On entry:
       XY?0   =&08
   On exit:
       No exit, as language is entered. This is an incorrect way of entering
       a language, and this call should not be used. A language should always
       be entered via OSCLI or OSBYTE 142.

See Also

Jgharston 15:05, 30 July 2012 (UTC)