Difference between revisions of "OSWORD &51"

From BeebWiki
Jump to: navigation, search
m (1 revision)
m (1 revision)
Line 1: Line 1:
 
[[Category:OSWORD]]
 
[[Category:OSWORD]]
==DVR==
+
OSWORD &51 (81 ) - Get maximum heap block size 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==
+
XY is a heap handle.
OSWORD &51 (81) - Write Real-Time clock (CDFS)
+
On exit:
  On entry:
+
  XY+0..1=size of the largest block available.
      XY?0 = seconds 0-59
+
  If the call failed, XY are preserved, C is set,
      XY?1 = minutes 0-59
+
  and XY+0..1 is set to zero.
      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===
+
OSWORD &51 (81 ) - Write Real-Time clock CDFS
====1 - read the news line====
+
 
    On entry:
+
On entry:
        XY?0   =&01
+
  XY?0 = seconds 0-59
        XY+1..2=address to read up to 80 characters + cr
+
  XY?1 = minutes 0-59
    On exit:
+
  XY?2 = hours 0-23
        XY?0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware
+
  XY?3 = day of week 1-7, 1=Sunday
====2 - read a chinese character definition====
+
  XY?4 = date of month 1-31
    On entry:
+
   XY?5 = month 1-12
        XY?=&02
+
  XY?6 = year 00-99
        XY!1   =address in I/O processor to read 32 bytes
+
 
        XY?=&80 for absolute ROM address, &00 for character number
+
 
        XY?6   =byte 0
+
OSWORD &51 (81 ) - HKSET Support SEHK
        XY?=byte 1
+
 
    On exit:
+
On entry:
        XY?0=result: &00=ok
+
  XY?0=reason code
                    &FF=no character ROM found
+
  1 - read the news line
                    &F0=character ROM 0 not found
+
   2 - read a chinese character definition
                    &0F=character ROM 1 not found
+
   3 - get bytes from a page in remote memory
                    &E0=number in byte 0 and byte 1 out of range
+
   4 - test remote hardware
====3 - get bytes from a page in remote memory====
+
   5 - print stock page to screen or printer
    On entry:
+
   6 - get new stock/teletext page (slow)
        XY?0   =&03
+
   7 - get new stock/teletext page (fast)
        XY!1   =data address in I/O processor
+
   8 - enter HKSET 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==
 
==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 01:13, 8 March 2015

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

XY is a heap handle.
On exit:
 XY+0..1=size of the largest block available.
 If the call failed, XY are preserved, C is set,
 and XY+0..1 is set to zero.


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


OSWORD &51 (81 ) - HKSET Support SEHK

On entry:
 XY?0=reason code
 1 - read the news line
 2 - read a chinese character definition
 3 - get bytes from a page in remote memory
 4 - test remote hardware
 5 - print stock page to screen or printer
 6 - get new stock/teletext page (slow)
 7 - get new stock/teletext page (fast)
 8 - enter HKSET in I/O processor

See Also

Jgharston 13:42, 26 May 2009 (UTC)