Difference between revisions of "OSWORD &51"

From BeebWiki
Jump to: navigation, search
m (1 revision)
m (1 revision)
 
(One intermediate revision by the same user not shown)
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.
 
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.
 
  
 +
==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
  
OSWORD &51 (81 ) - Write Real-Time clock CDFS
 
  
On entry:
+
==HKSET==
  XY?0 = seconds 0-59
+
OSWORD &51 (81) - HKSET Support (SEHK)
  XY?1 = minutes 0-59
+
    On entry:
  XY?2 = hours 0-23
+
        XY?0   = command
  XY?3 = day of week 1-7, 1=Sunday
+
        XY+1.. = any parameters
  XY?4 = date of month 1-31
+
    On exit:
  XY?5 = month 1-12
+
        XY?= result:
  XY?6 = year 00-99
+
                &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 lanhuage 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.
  
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==
 
==See Also==
 
* http://mdfs.net/Docs/Comp/BBC/Oswords
 
* http://mdfs.net/Docs/Comp/BBC/Oswords
 
[[User:Jgharston|Jgharston]] 13:42, 26 May 2009 (UTC)
 

Latest revision as of 19:13, 8 March 2015

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 lanhuage 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