Xref: utzoo comp.sys.mac.programmer:6630 comp.sys.mac.hypercard:2003 Path: utzoo!attcan!uunet!mcvax!kth!draken!tut!santra!tukki!kallio From: kallio@tukki.jyu.fi (Seppo Kallio) Newsgroups: comp.sys.mac.programmer,comp.sys.mac.hypercard Subject: Async XCMD problem Message-ID: <752@tukki.jyu.fi> Date: 25 May 89 08:34:53 GMT Reply-To: kallio@tukki.jyu.fi (Seppo Kallio) Organization: University of Jyvaskyla, Finland Lines: 51 Hello! I have a problem with async XCMD/XFCN code from Danny Goodman's "HyperCard Developer's Guide". It is for MPW and I am using it in THINKS Pascal. It works OK except one thing: If I define "OPEN" the line speed will be 1200,1stop,noparity,data8 but if I call it "OPEN,MODEM,1200,1,no,8" I will get OpenDriver error -43. I can not found this code -43 from Inside Macintosh. What is it? An what is in the program: serConfig gets same value in both cases in above program. Could these Hlock, ZeroToPas, HUnlock, or other programs mess the OpenDriver call? Please reply me directly kallio@tukki.jyu.fi kallio@finjyu.bitnet PS. Here is part of the code. Do you know other XCMD/XFCNs for modem port communication? UserConfig := TRUE; serConfig := 0; if (paramPtr^.paramCount = 1) then { Assume the 1st parameter was ~open~. } { Default configuration. } ** THIS WORKS OK! *************** serConfig := baud1200 + stop10 + noParity + data8 else begin { *** Get the third parameter -- Baud rate *** } HLock(paramPtr^.params[3]); ** THIS DOES NOT WORK! WHY? I GET OpenDriver-43 ZeroToPas(paramPtr, paramPtr^.params[3]^, pascalStr); HUnlock(paramPtr^.params[3]); UprString(pascalStr, FALSE); if (pascalStr = '300') then serConfig := serConfig + baud300 else if (pascalStr = '600') then serConfig := serConfig + baud600 else if (pascalStr = '1200') then serConfig := serConfig + baud1200 else if (pascalStr = '57600') then serConfig := serConfig + baud57600 else begin { Error occurred in specifying baud rate. } HandleError('Error in specifying baud rate.', paramPtr); UserConfig := FALSE; goto 7; end; ... etc. -- kallio@tukki.jyu.fi Seppo Kallio phone Finland 941 292809 kallio@finjyu.bitnet University of Jyvaskyla Computing Centre