Proposal for a new standard for API specifications (Development MSX Forum)MSX Resource Center               
              
English Nederlands Espa�ol Portugu�s Russian         
 News
   Frontpage
  News archive
  News topics

 Resources
   MSX Forum
  Articles
  Reviews
  Fair reports
  Photo shoots
  Fairs and meetings
  Polls
  Links
  Search

 Software
   Downloads
  Webshop

 MRC
   Who we are
  Join our team
  Donate
  Policies
  Contact us
  Link to Us
  Statistics

 Search
 
  

  

 Login
 

Username

Password




Don't you have an account yet? Become an MSX-friend and register an account now!.


 Statistics
 

There are 38 guests and 1 MSX friend online

You are an anonymous user.
 

MSX Forum


MSX Forum

Development - Proposal for a new standard for API specifications

Goto page ( Previous Page 1 | 2 | 3 Next Page )
Author

Proposal for a new standard for API specifications

Tanni
msx addict
Posts: 303
Posted: April 27 2007, 16:47   
Well done, konamiman!
Morg
msx user
Posts: 43
Posted: April 27 2007, 17:43   
As leader of the msx society, Konamiman is training hard his brain to guide us through the toughs paths of the BIOS
konamiman
msx freak
Posts: 138
Posted: May 09 2007, 11:51   
Ok, here it is:

MSX-UNAPI specification 0.2

Check out section 1.5, "The big picture". Hope it helps to make things clear.
Tanni
msx addict
Posts: 303
Posted: May 09 2007, 13:45   
Can you give us a short summary on what you have changed in version 0.2?
konamiman
msx freak
Posts: 138
Posted: May 09 2007, 15:14   
The document contains a version history at the end. I just added section 1.5, "The big picture".
Tanni
msx addict
Posts: 303
Posted: May 09 2007, 15:48   
Nice story indeed, but I don't understand why it is called ''The big picture''.
[D-Tail]

msx guru
Posts: 3020
Posted: May 09 2007, 23:22   
Tanni, you can compare "The big picture", with "Überblick" or "Overview". It's some kind of summary, which gives you a grip on the full (=big) picture of what Konamiman is trying to state in his document in a small section of text.
NYYRIKKI
msx master
Posts: 1528
Posted: May 11 2007, 20:34   
Ok, it's better with flux capacitors'n stuff.
konamiman
msx freak
Posts: 138
Posted: May 13 2007, 11:44   
Maybe I'll rename this section to "Example scenario" or the like in the next document version. But I would like to know if the document is now actually easier to understand.
manuel
msx guru
Posts: 3545
Posted: May 13 2007, 16:12   
It helped me a lot to get the basic idea in simple language. So for me it was a good addition.
konamiman
msx freak
Posts: 138
Posted: July 09 2007, 12:14   
Ok, just in case you're bored:

MSX-UNAPI specification 0.3 (see the changelog in the document itself)
Sample implementation in ROM
Sample implementation in mapped RAM
Sample of client software

Tanni
msx addict
Posts: 303
Posted: July 09 2007, 13:42   
Quote:

1.4. Glossary

API implementation name
An alphanumeric string made of up to 64 characters, which uniquely
identifies an API implementation. . . . See Section 2.5 for more details.

2.5. Rule 5: The API information routine + the implementation name and
version
. . .

The implementation name string must be zero terminated and composed
of up to 64 printable characters.



So the string has 64 printable characters and is terminated by #$00, resulting in a string of 65 characters? Zero normally isn't considered printable. Function key strings are 15 characters terminated by an additional zero, so the whole string is a power of 2.
konamiman
msx freak
Posts: 138
Posted: July 09 2007, 13:49   
The identifier is 15 characters so that it is possible to store the string plus the zero in the 16-byte buffer ARG. There is no such limitation for the implementation name so I made it to be up to 64 chars, indeed 65 when the zero is included. Do you think that 63+zero would be more convenient?
Tanni
msx addict
Posts: 303
Posted: July 09 2007, 14:34   
Yes, at least it's more ''natural'' if it would be 63+1. In Turbo Pascal, it would be convenient to declare e.g. an Array [ 0 .. 15 ] of unapi_string, where unapi_string would be String[63], i.e. 1 Byte for string length + 63 byte for the string itself. Using powers of 2 for this kind of data structures makes it easier and faster to compute the start address of a component. Even if it's unlikely to have UNAPI implementation names in arrays, it would be better to stick to such conventions, otherwise, the reader might wonder why such an ''odd'' value is used. (With a maximum of 63 characters, you also would have 2 bits left for flag usage in the length byte of the string, if necessary.)

It also would be an inconsistency to the rules for API specification identifier:

Quote:

1.4. Glossary

API specification identifier
An alphanumeric, case-insensitive string made of up to 15
characters, which uniquely identifies an UNAPI compliant API
specification. For example the identifier of an API specification
for Ethernet cards could be "ETHERNET". See Section 2.1 for more
details.

2.1. Rule 1: The API identifier and version number

An API specification must have an alphanumeric identifier composed of
up to 15 characters. Allowed characters are letters (having an ASCII
code below 128), digits, and the following ones: - _ / . ( )



By the way, how is this terminated, by zero or by dollar or something else? Or do you intend to use a length byte? Most likely, you like to have it zero terminated, so the total length is a power of 2, so why violating this scheme on API implementation names without need? Most likely, the extra byte (the 64th one) will never be used in any future implementation.
konamiman
msx freak
Posts: 138
Posted: July 09 2007, 15:21   
Quote:

It also would be an inconsistency to the rules for API specification identifier:
(...)
By the way, how is this terminated, by zero or by dollar or something else?


Per section 3.2, the first step of the discovery procedure is: Copy the zero-terminated API specification identifier to address #F847 (ARG).

About how to store the identifier in the implementation itself, it is intentionally left unspecified: it does not matter, as long as the code attached to the extended BIOS hook does the comparison properly. You can see in the sample code that indeed, I store the identifiers zero terminated, but this is not manadatory.

Anyway you are right, if the identifier is 15+zero, it is more reasonable to have the name to be 63+zero.
 
Goto page ( Previous Page 1 | 2 | 3 Next Page )
 







(c) 1994 - 2008 MSX Resource Center Foundation. MSX is a trademark of MSX Licensing Corporation.