What OSBYTE and OSWORD to claim?

bbc/electron apps, languages, utils, educational progs, demos + more
Post Reply
User avatar
gordonDrogon
Posts: 92
Joined: Fri Nov 23, 2018 12:39 pm
Location: Scottish Borders
Contact:

What OSBYTE and OSWORD to claim?

Post by gordonDrogon »

Hi,

I'm looking to interface a Beeb (Or Master) to some existing hardware I have and fancy a little ROM to control it all and access from Basic, etc. via OSBYTE & OSWORD. I need 3 or 4 OSBYTES and an OSWORD or 2, but which to choose?

I feel the lists at:

https://www.beebwiki.mdfs.net/OSBYTEs
https://www.beebwiki.mdfs.net/OSWORDs

may be the best to use but it's hard to know - especially as I can find others with conflicting data...

Obviously for my own uses I can pick what I want that doesn't clash with existing ROMs I have in the system to-hand but just just in-case I actually get my act together and produce a little kit, I'm wonder what the best plan might be...

What do others do?

Thanks for any input.

-Gordon
User avatar
sweh
Posts: 3314
Joined: Sat Mar 10, 2012 12:05 pm
Location: 07410 New Jersey
Contact:

Re: What OSBYTE and OSWORD to claim?

Post by sweh »

The real "BITD experience" would be to expect conflicts and two different ROMs wouldn't work with each other :lol:
Rgds
Stephen
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: What OSBYTE and OSWORD to claim?

Post by Coeus »

Yes, there are gaps in that list, i.e. calls that are currently not shown as doing anything so you could grab one of those and, as it is a Wiki, edit it to say what you're using the call for. That is probably a better situation than existed back in the day.

The only thing to be aware of is that, with OSWORD, there is a limit to the set of calls where the tube software, both host end and the clients in second processor boot ROMs, knows (from a built-in table) how many bytes should be transferred. To add new OSWORDs you should adopt the convention where the control block contains this information, i.e. how many bytes to transfer in each direction.
Barneyntd
Posts: 229
Joined: Fri Feb 28, 2020 9:55 pm
Contact:

Re: What OSBYTE and OSWORD to claim?

Post by Barneyntd »

Another possibility is to look through the lists for hardware which is similar enough in function to yours that it could be considered an alternative, then try to make your code as compatible as possible, in the hope that you could experiment with old software. May not be possible, considering how little thought a lot of people put into software interfaces BITD, but fun if it works!
Completed projects: Multiphrom, My own rom board, Extra VIA, iPhone pauser. Current projects:
User avatar
jgharston
Posts: 5319
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: What OSBYTE and OSWORD to claim?

Post by jgharston »

The process is to discuss here.
gordonDrogon wrote: Thu Mar 14, 2024 12:09 pm I'm looking to interface a Beeb (Or Master) to some existing hardware I have and fancy a little ROM to control it all and access from Basic, etc. via OSBYTE & OSWORD. I need 3 or 4 OSBYTES and an OSWORD or 2, but which to choose?
That's probably too many. Can't you make do with one each? The standard layout for an OSWORD is:
XY+0 sendlen
XY+1 receivelen
XY+2 command
XY+3 status
XY+4.... data

So you can perform up to 256 functions through one OSWORD, 65536 if you use command and status. Similarly, with one OSBYTE you can perform up to 256 functions: A=call, X=function. Bear in mind that there are effectively no two-byte A>7F OSBYTEs left, there are only one-byte A<80 OSBYTEs, where you can only pass a parameter in X and receive a result in X.

It would help if you put a little bit more flesh on your proposal. For an OSWORD call we've been gradually been creeping through the &9x and &Cx range, so one of those is likely. For an OSBYTE mention what sort of subfunctions it expects to do. Eg, is it OSBYTE mynum,handle such as the NetRx OSBYTE. Is it OSBYTE mynum,bitmap. Is it OSBYTE mynum,listoffunctions? It might be that your X parameter works out as something like %0xxxnnnn: do something with nnnn, %1xxxmmmm: so something with m, etc. Eg, X<80: read from device number in b0-b3, X>7F write to device number in b0-b3.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.45
(C) Copyright J.G.Harston 1989,2005-2024
>_
Post Reply

Return to “8-bit acorn software: other”