CompuServe Messages

AmigaDOS Philosopy

#: 67766 S10/ProgrammingForum unknown
    15-May-87 02:48:11
Fm: Vic Wagner 76046,3004
To: John Draper 76703,4322

This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.

Larry, I understand your point of view, but VERY few assemblers have any concept of TYPE. For that matter, neither does BCPL, and 'C' is only now getting around to it. The AutoDocs (I think) presented the case rather well. The function/procedure was written in 'C' with the register designations put on the following line, directly under the arguments (and under the return) example: NAME GetScreenData — Get copy of a screen data structure. SYNOPSIS Success = GetScreenData(Buffer, Size, Type, Screen ) D0 A0 D0 D1 A1 BOOL Success; CPTR Buffer; USHORT Size; USHORT Type; struct Screen *Screen; FUNCTION This function copies into the caller's buffer data from a Screen structure Typically, this call will be used to find the size, title bar height, and other values for a standard screen, such as the Workbench screen. To get the data for the Workbench screen, one would call: GetScreenData(buff, sizeof(struct Screen), WBENCHSCREEN, NULL) NOTE: if the requested standard screen is not open, this function will have the effect of opening it. INPUTS Buffer = pointer to a buffer into which data can be copied Size = the size of the buffer provided, in bytes Type = the screen type, as specified in OpenWindow (WBENCHSCREEN, CUSTOMSCREEN, …) Screen = ignored, unless type is CUSTOMSCREEN, which results only in copying 'size' bytes from 'screen' to 'buffer' RESULT TRUE if successful FALSE if standard screen of Type 'type' could not be opened. BUGS SEE ALSO OpenWindow() The problem with a 'pure' assembler description is that we would know that there were two address (A0 & A1) pointing to some kind of things, and a couple of numbers (D0 & D1) which are size of thing A0 points to and type of screen. This documentation says to get the address of the buffer into A0, no preconceived notions as to how to do it: MOVEA.L BUFFER,A0 or perhaps some complex expression (or array access) On the other hand, I've seen 'programmers' who think that their variables must be named the same as the examples. The problem I have with documenting in assembler, is that it takes many many lines to show the call whereas it generally only takes one line of HLL (H)igh (L)evel (L)anguage. (Even though we both believe 'C' is a obfuscating LLL).