The history of calling conventions, part 2

Foreshadowing: This information will actually be useful in a future discussion. Well, not the fine details, but you may notice something that explains… um… it’s hard to describe. Just wait for it. Curiously, it is only the 8086 and x86 platforms that have multiple calling conventions. All the others have only one! Now we’re going…

15

Words I’d like to ban in 2004

It seems to be fashionable to do a “top words” list this time of year. We have Google 2003 Zeitgeist, Top Yahoo! Searches 2003, Merriam-Webster’s Words of the Year for 2003, YourDictionary.com’s Top Ten Words of 2003, Lake Superior State University’s Banished Words List for 2004; still waiting for the American Dialect Society’s choice for…

39

Why does the copy dialog give such horrible estimates?

Because the copy dialog is just guessing. It can’t predict the future, but it is forced to try. And at the very beginning of the copy, when there is very little history to go by, the prediction can be really bad. Here’s an analogy: Suppose somebody tells you, “I am going to count to 100,…

34

The history of calling conventions, part 1

The great thing about calling conventions on the x86 platform is that there are so many to choose from! In the 16-bit world, part of the calling convention was fixed by the instruction set: The BP register defaults to the SS selector, whereas the other registers default to the DS selector. So the BP register…

27

Don’t trust the return address

Sometimes people ask, “So I know how to get my return address [use the _ReturnAddress() intrinsic]; how do I figure out what DLL that return address belongs to?” Beware. Even if you figure out which DLL the return address belongs to [use Get­Module­Handle­Ex(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS)], that doesn’t mean that that is actually the DLL that called you….

17

College football commercialized? What ever gave you that idea?

This has got to be some sort of record for “Longest official name of a sponsored college football game”: The Gaylord Hotels Music City Bowl Presented by Bridgestone, which proclaims that “the Gaylord Hotels Music City Bowl Presented By Bridgestone is Nashville’s Holiday Tradition”.

1

How to stop delivery of telephone books

Like many of you (I suspect), I don’t use the paper telephone book. If I want to look something up, I go online. Yet every year I get a dozen different telephone books. I don’t like them because a telephone book sitting on my front porch screams, “Rob this house! Nobody’s home!” Besides, it’s a…

29

People with almanacs may be terrorists, FBI warns

The FBI has apparently released a bulletin advising law enforcement officers to be on the alert for people with almanacs: They might be terrorists.

6

What’s the difference between CreateMenu and CreatePopupMenu?

CreateMenu creates a horizontal menu bar, suitable for attaching to a top-level window. This is the sort of menu that says “File, Edit”, and so on. CreatePopupMenu creates a vertical popup menu, suitable for use as a submenu of another menu (either a horizontal menu bar or another popup menu) or as the root of…

16