Path: utzoo!mnetor!uunet!husc6!think!ames!pasteur!zooey.Berkeley.EDU!c162-fe From: c162-fe@zooey.Berkeley.EDU (Jonathan Dubman) Newsgroups: comp.sys.amiga Subject: Manx/RawKeyConvert-urgent! Message-ID: <1322@pasteur.Berkeley.Edu> Date: 8 Mar 88 00:14:49 GMT Sender: news@pasteur.Berkeley.Edu Reply-To: c162-fe@zooey.Berkeley.EDU (Jonathan Dubman) Organization: University of California, Berkeley Lines: 44 #define URGENT #define TIMELY This is a question for the initiated. (Bryce? Matt? Leo? Chuck? CATS?) Summary of question: HOW DO YOU CALL RawKeyConvert() from Manx? I am having major problems calling the RawKeyConvert() function, which takes an input event of class RAWKEY and returns the ASCII code, using any KeyMap. It's gotta be done this way - I already have the RAWKEY and I need to know its translation. This is actually a function of the Console Device, so the Console Device has to be open. The OpenDevice() call for the console device initializes the io_Device field of the struct IOStdReq that I pass to it. HOW DO YOU CALL IT FROM C? I'd like to avoid writing an assembly language front end, though I could if I really needed to. I'm using Manx 3.4b. I say numchars = RawKeyConvert(event, buffer, lengthy, NULL); Compiles fine, but when I link it, it sings to the tune of Undefined _ConsoleDevice or something. Now ConsoleDevice() is a function mentioned in the functions.h file - WHAT IS ConsoleDevice()? (I'm using a precompiled file that includes functions.h) I tried creating a function ConsoleDevice() that returns the address of the Console Device, but the program guru'ed. I looked the assembly language output of the compiler. It puts a bunch of stuff on the stack and then does a jsr _RawKeyConvert. Obviously, _RawKeyConvert is a stub that pulls some stuff off the stack and puts it into the appropriate registers for calling the real, system RawKeyConvert with a jsr _LVORawKeyConvert(A6) where A6 is initialized to the address of the Console Device (really the library node). WHO SETS A6? The _RawKeyConvert stub function? HOW DOES IT KNOW WHERE THE CONSOLE DEVICE IS? IS THAT WHAT ConsoleDevice() is for? I've got the MANX manual, the RKM, and Mortimer vol. 2, but I just can't figure this out. Will somebody PLEASE set me straight? *&(Jonathan Dubman) upon answer: :-( ---> :-)