Talk:83Plus:BCALLs:80BD

From WikiTI
Jump to: navigation, search

Yay for wasting time! Andy Janata 19:03, 24 Feb 2006 (PST)

I have to ask...

I just have to ask (it's in my philosophical nature)(I'm a Philosophy major)...WHY? Why would TI do this? here's my theory:

TI realized they were wasting A LOT of space in the OS, as well as the opportunity to create a whole list of new bcalls (or to make some other internal routines bcallable), but they didn't want to de-stabalize the OS (because TIOS is already SO stable), and as a way to patronize the programming community, they created bcalls such as this one and the other DoNothing bcalls. (i believe there was also a list of 4 or five other bcalls that just "ret"-ed). It also wastes space that could otherwise be hacked by illegal and evil TIOS h4x0rz... muahahahaha (TI's laugh at us)...

Saibot84 00:35, 25 Feb 2006 (PST)

There are a number of fairly legitimate reasons for doing things like this. Two that have happened to me in my own code are:
1) You create some sort of API, as a random example: CreateObject, DisplayObject, and DestroyObject. It's useful to have these three routines so that you can Create, Display, and Destroy for any type of object without having to worry about how these things are implemented. However, it might turn out that you don't need to actually do anything to Destroy a particular type of object, say a snoodle. So the DestroyObject routine for snoodles is just a ret, but the routine still needs to exist so I can call it in a more abstract setting (imagine using a call table where I lookup the appropriate routines based on what kind of object I'm currently handling). I believe some of the TIOS routines are of this nature.
2) Another possibility is that the routines used to point to something useful, but they were removed in a later version of the OS. If you don't replace the removed routines in the call table with stub routines, you'll shift all of the addresses and everything will break. Removing routines in general, of course, can be dangerous for backwards compatibility, but it happens. For example, when MirageOS is compiled without 82 emulation support, 82 emulation routines are no longer present and their pointers in the call table are changed to point to rets. I believe some of the TIOS routines are of this nature as well.
But yeah, other than those reasons it probably does have to do with TI's Plan of Spite and International Evil --Dan Englender 01:17, 25 Feb 2006 (PST)