DANFUZZ@BROWNVM.BITNET (Dan Bornstein) (04/04/89)
(Sorry if you've already seen this, but this hasn't made it back yet onto our bboard, so I'm wondering if it ever got anywhere...) Geva: If you're actually going to do this, I would make the following suggestions: Write the routines to use driver files for the screen, input device, and sound. Have a standard jump table or relative address tablee defined for each driver, so that way, by using 40-column, joystick, and $c030 sound drivers, a II+ could use it, or by using 80-column, mouse, and ensoniq drivers, a //gs could use it. By having standard driver interfaces, new hardware could be easily accomodated. As an example of what the screen driver should have: init routine shutdown routine return statistics (screen size, size of "mouse" cursor, etc) print a character (at (x,y) or current cursor position) (with flags for highlighting (inverse) and "special" characters) set cursor position set "mouse" cursor (off, pointer, I-beam (or equivalent), "watch", etc.) clear screen save screen \ for making the appearance and disappearance of menus, dialog restore screen / boxes, etc. easier. update "mouse" position For special characters, define codes for the edges and corners of boxes, arrows, scroll bars, close/zoom boxes, background chars, etc. All this will probably make the windowing routines themselves a little more diffficult to write, but then you'll have pretty much guaranteed compatibility. If you want to support multiple entry methods, the best way is probably to define a standard location to store the location of a parameter table (a pointer at an absolute location). Then whatever program can POKE, STA, etc. to that location and then CALL, JSR, etc. and your routine doesn't have to worry about it. (You could also have a standard location for setting up a return parameter list and error codes.) Or, if you want to be fancy, have, say, a POKE/CALL method for BASIC, and a LDA/Y #address and JSR method (a la dos 3.3) or JSR then address method (a la ProDOS) for machine language. I don't think you have to worry about the Pascal system since it pretty much has its own environment. -dan BitNet: DanFuzz@BrownVM.BitNet Internet: DanFuzz@BrownVM.Brown.Edu EtherNet: Find me a long enough cable and I'll see what we can do.