Difference between revisions of "OSWORD &49"
(Initial page.) |
m (.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:OSWORD]] | [[Category:OSWORD]] | ||
− | OSWORD &49 (73) | + | {{PageTitle|OSWORD &49 (73): Integra-B calls}} |
− | + | All calls use a common control block layout: | |
− | + | XY?0 command | |
− | + | XY?1 format flag, returned data length/status | |
− | + | XY?2 format flag | |
− | + | XY?3 format flag | |
− | on to other ROMs. | + | XY!4 data address or count |
+ | XY?8 century | ||
+ | XY?9 year | ||
+ | XY?10 month | ||
+ | XY?11 day of month | ||
+ | XY?12 day of week | ||
+ | XY?13 hours | ||
+ | XY?14 minutes | ||
+ | XY?15 seconds | ||
+ | The time and date values are always decimal, in contrast to the OSWORD &0E/&0F | ||
+ | calls which used BCD. | ||
+ | |||
+ | |||
+ | &60: Read RTC time and date as string | ||
+ | ------------------------------------- | ||
+ | Does the equivalent of OSWORD &49,&61:OSWORD &49,&62 | ||
+ | On entry: | ||
+ | XY?0 &60 | ||
+ | XY?1 separators &84 gives "Tue,19 Nov 2022.00:55:42" | ||
+ | XY?2 day format &44 gives "Tue, " | ||
+ | XY?3 date format &EB gives "19 Nov 2022" | ||
+ | XY!4 data address to return string | ||
+ | On exit: | ||
+ | XY?1 length of returned string including CR | ||
+ | XY!4 &00008000 | ||
+ | XY?8 century | ||
+ | XY?9 year | ||
+ | XY?10 month | ||
+ | XY?11 day of month | ||
+ | XY?12 day of week | ||
+ | XY?13 hours | ||
+ | XY?14 minutes | ||
+ | XY?15 seconds | ||
+ | The data block holds the returned string, terminated with CR. | ||
+ | |||
+ | &61: Read RTC time and date | ||
+ | --------------------------- | ||
+ | On entry: | ||
+ | XY?0 &61 | ||
+ | On exit: | ||
+ | XY?0 &00 | ||
+ | XY?1 &00 | ||
+ | XY?2 &00 | ||
+ | XY?3 &00 | ||
+ | XY?4 &00 | ||
+ | XY?5 &00 | ||
+ | XY?6 &00 | ||
+ | XY?7 &00 | ||
+ | XY?8 century | ||
+ | XY?9 year | ||
+ | XY?10 month | ||
+ | XY?11 day of month | ||
+ | XY?12 day of week | ||
+ | XY?13 hours | ||
+ | XY?14 minutes | ||
+ | XY?15 seconds | ||
+ | |||
+ | &62: Convert RTC time and date to string | ||
+ | ---------------------------------------- | ||
+ | On entry: | ||
+ | XY?0 &62 | ||
+ | XY?1 separators &84 gives "Tue,19 Nov 2022.00:55:42" | ||
+ | XY?2 day format &44 gives "Tue, " | ||
+ | XY?3 date format &EB gives "19 Nov 2022" | ||
+ | XY!4 data address to return string | ||
+ | XY?8 century | ||
+ | XY?9 year | ||
+ | XY?10 month | ||
+ | XY?11 day of month | ||
+ | XY?12 day of week | ||
+ | XY?13 hours | ||
+ | XY?14 minutes | ||
+ | XY?15 seconds | ||
+ | On exit: | ||
+ | XY?1 length of returned string including CR | ||
+ | XY!4 &00008000 | ||
+ | XY?8 century | ||
+ | XY?9 year | ||
+ | XY?10 month | ||
+ | XY?11 day of month | ||
+ | XY?12 day of week | ||
+ | XY?13 hours | ||
+ | XY?14 minutes | ||
+ | XY?15 seconds | ||
+ | The data block holds the returned string, terminated with CR. | ||
+ | |||
+ | &63: No operation, control block unchanged | ||
+ | ----------------------------------------- | ||
+ | |||
+ | &64: Read Alarm | ||
+ | --------------- | ||
+ | On entry: | ||
+ | XY?0=&64 | ||
+ | On exit: | ||
+ | XY?0 &00 | ||
+ | XY?1 RTC Alarm register b6=0 Off, b6=1 On | ||
+ | XY?2 &00 | ||
+ | XY?3 &00 | ||
+ | XY?4 &00 | ||
+ | XY?5 &00 | ||
+ | XY?6 &00 | ||
+ | XY?7 &00 | ||
+ | XY?8 &00 | ||
+ | XY?9 &00 | ||
+ | XY?10 &00 | ||
+ | XY?11 &00 | ||
+ | XY?12 &00 | ||
+ | XY?13 alarm hours | ||
+ | XY?14 alarm minutes | ||
+ | XY?15 alarm seconds | ||
+ | |||
+ | &65: Set RTC time | ||
+ | ----------------- | ||
+ | On entry: | ||
+ | XY?0 &65 | ||
+ | XY?13 hours | ||
+ | XY?14 minutes | ||
+ | XY?15 seconds | ||
+ | |||
+ | &66: Set RTC date | ||
+ | ----------------- | ||
+ | XY?0 &66 | ||
+ | XY?8 century | ||
+ | XY?9 year | ||
+ | XY?10 month | ||
+ | XY?11 day of month | ||
+ | The day of the week is calculated from the date | ||
+ | |||
+ | &67: Set RTC Alarm | ||
+ | ------------------ | ||
+ | XY?0 &67 | ||
+ | XY?1 Alarm enable b6=0 Off, b6=1 On | ||
+ | XY?13 alarm hours | ||
+ | XY?14 alarm minutes | ||
+ | XY?15 alarm seconds | ||
+ | |||
+ | &68: Validate date | ||
+ | ------------------ | ||
+ | On entry: | ||
+ | XY?0 &68 | ||
+ | XY?8 &FF or century | ||
+ | XY?9 &FF or year | ||
+ | XY?10 &FF or month | ||
+ | XY?11 &FF or day of month | ||
+ | XY?12 &FF or day of week | ||
+ | On exit: | ||
+ | Any &FFs are replaced with the earliest date that would match. | ||
+ | If the year is &FF, it is replaced with this year. | ||
+ | |||
+ | &69: Generate calendar | ||
+ | ---------------------- | ||
+ | On entry: | ||
+ | XY?0 &69 | ||
+ | XY!4 data address to return string | ||
+ | XY?8 century | ||
+ | XY?9 year | ||
+ | XY?10 month | ||
+ | XY?11 day of month | ||
+ | On exit: | ||
+ | XY?1 number of bytes returned | ||
+ | At the data address will be the calendar data. &00 indicates blanks in | ||
+ | the calendar, <>&00 is a number to display. The data is seven blocks of | ||
+ | six bytes, ordered 6 x {Sun}, 6 x {Mon}, etc. | ||
+ | |||
+ | &6A: Convert date to absolute day number | ||
+ | ---------------------------------------- | ||
+ | On entry: | ||
+ | XY?0 &6A | ||
+ | XY?8 century | ||
+ | XY?9 year | ||
+ | XY?10 month | ||
+ | XY?11 day of month | ||
+ | On exit: | ||
+ | XY?0 &00=Ok, &FF=invalid date | ||
+ | XY!4 count of number of days where 01-Jan-1900 = &0000 | ||
+ | |||
+ | &6B: Convert absolute day number to date | ||
+ | ---------------------------------------- | ||
+ | On entry: | ||
+ | XY?0 &6A | ||
+ | XY!4 count of number of days where 01-Jan-1900 = &0000 | ||
+ | On exit: | ||
+ | XY?8 century | ||
+ | XY?9 year | ||
+ | XY?10 month | ||
+ | XY?11 day of month | ||
+ | XY?12 day of week | ||
+ | |||
+ | All other calls are ignored and passed on to other ROMs. IBOS up | ||
+ | to version 1.20 have a bug in that subcalls &6C-&6F are claimed, | ||
+ | but there is no dispatch address, so they crash. | ||
==See Also== | ==See Also== | ||
+ | * [[OSWORD &49]] - Integra-B shadow memory calls | ||
+ | * [[OSBYTE &49]] - Check for Integra-B shadow memory | ||
* http://mdfs.net/Docs/Comp/BBC/Oswords | * http://mdfs.net/Docs/Comp/BBC/Oswords | ||
[[User:Jgharston|Jgharston]] 13:37, 26 May 2009 (UTC) | [[User:Jgharston|Jgharston]] 13:37, 26 May 2009 (UTC) | ||
+ | [[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 20:46, 29 November 2022 (CET) |
Latest revision as of 17:37, 30 November 2022
OSWORD &49 (73): Integra-B calls
All calls use a common control block layout: XY?0 command XY?1 format flag, returned data length/status XY?2 format flag XY?3 format flag XY!4 data address or count XY?8 century XY?9 year XY?10 month XY?11 day of month XY?12 day of week XY?13 hours XY?14 minutes XY?15 seconds The time and date values are always decimal, in contrast to the OSWORD &0E/&0F calls which used BCD. &60: Read RTC time and date as string ------------------------------------- Does the equivalent of OSWORD &49,&61:OSWORD &49,&62 On entry: XY?0 &60 XY?1 separators &84 gives "Tue,19 Nov 2022.00:55:42" XY?2 day format &44 gives "Tue, " XY?3 date format &EB gives "19 Nov 2022" XY!4 data address to return string On exit: XY?1 length of returned string including CR XY!4 &00008000 XY?8 century XY?9 year XY?10 month XY?11 day of month XY?12 day of week XY?13 hours XY?14 minutes XY?15 seconds The data block holds the returned string, terminated with CR. &61: Read RTC time and date --------------------------- On entry: XY?0 &61 On exit: XY?0 &00 XY?1 &00 XY?2 &00 XY?3 &00 XY?4 &00 XY?5 &00 XY?6 &00 XY?7 &00 XY?8 century XY?9 year XY?10 month XY?11 day of month XY?12 day of week XY?13 hours XY?14 minutes XY?15 seconds &62: Convert RTC time and date to string ---------------------------------------- On entry: XY?0 &62 XY?1 separators &84 gives "Tue,19 Nov 2022.00:55:42" XY?2 day format &44 gives "Tue, " XY?3 date format &EB gives "19 Nov 2022" XY!4 data address to return string XY?8 century XY?9 year XY?10 month XY?11 day of month XY?12 day of week XY?13 hours XY?14 minutes XY?15 seconds On exit: XY?1 length of returned string including CR XY!4 &00008000 XY?8 century XY?9 year XY?10 month XY?11 day of month XY?12 day of week XY?13 hours XY?14 minutes XY?15 seconds The data block holds the returned string, terminated with CR. &63: No operation, control block unchanged ----------------------------------------- &64: Read Alarm --------------- On entry: XY?0=&64 On exit: XY?0 &00 XY?1 RTC Alarm register b6=0 Off, b6=1 On XY?2 &00 XY?3 &00 XY?4 &00 XY?5 &00 XY?6 &00 XY?7 &00 XY?8 &00 XY?9 &00 XY?10 &00 XY?11 &00 XY?12 &00 XY?13 alarm hours XY?14 alarm minutes XY?15 alarm seconds &65: Set RTC time ----------------- On entry: XY?0 &65 XY?13 hours XY?14 minutes XY?15 seconds &66: Set RTC date ----------------- XY?0 &66 XY?8 century XY?9 year XY?10 month XY?11 day of month The day of the week is calculated from the date &67: Set RTC Alarm ------------------ XY?0 &67 XY?1 Alarm enable b6=0 Off, b6=1 On XY?13 alarm hours XY?14 alarm minutes XY?15 alarm seconds &68: Validate date ------------------ On entry: XY?0 &68 XY?8 &FF or century XY?9 &FF or year XY?10 &FF or month XY?11 &FF or day of month XY?12 &FF or day of week On exit: Any &FFs are replaced with the earliest date that would match. If the year is &FF, it is replaced with this year. &69: Generate calendar ---------------------- On entry: XY?0 &69 XY!4 data address to return string XY?8 century XY?9 year XY?10 month XY?11 day of month On exit: XY?1 number of bytes returned At the data address will be the calendar data. &00 indicates blanks in the calendar, <>&00 is a number to display. The data is seven blocks of six bytes, ordered 6 x {Sun}, 6 x {Mon}, etc. &6A: Convert date to absolute day number ---------------------------------------- On entry: XY?0 &6A XY?8 century XY?9 year XY?10 month XY?11 day of month On exit: XY?0 &00=Ok, &FF=invalid date XY!4 count of number of days where 01-Jan-1900 = &0000 &6B: Convert absolute day number to date ---------------------------------------- On entry: XY?0 &6A XY!4 count of number of days where 01-Jan-1900 = &0000 On exit: XY?8 century XY?9 year XY?10 month XY?11 day of month XY?12 day of week All other calls are ignored and passed on to other ROMs. IBOS up to version 1.20 have a bug in that subcalls &6C-&6F are claimed, but there is no dispatch address, so they crash.
See Also
- OSWORD &49 - Integra-B shadow memory calls
- OSBYTE &49 - Check for Integra-B shadow memory
- http://mdfs.net/Docs/Comp/BBC/Oswords
Jgharston 13:37, 26 May 2009 (UTC) Jgharston (talk) 20:46, 29 November 2022 (CET)