;DEBUG equ 1 ;TODO: ; TRANSMIT/K/M & AppMessage w/arg>1 include "ssmac.h" BaudRateBase equ 1200 Def_BaudRateN equ 3 Def_BaudRate equ BaudRateBase<,a0 get.l Arg_Device,d0 beq.s NoDevice move.l d0,a0 move.l (a0),a0 NoDevice put.l a0,Arg_Device moveq #0,d1 get.l Arg_DevUnit,d0 beq.s NoDevUnit move.l d0,a0 move.l (a0),d1 NoDevUnit put.l d1,Arg_DevUnit move.l #Def_BaudRate,d1 get.l Arg_Baud,d0 beq.s NoBaud move.l d0,a0 move.l (a0),d1 NoBaud put.l d1,Arg_Baud lea SerErrTab(pc),a0 move.l a0,a2 geta SerErrMem,a1 LoopSerErr move.b -(a0),1(a1) beq.s DoneSerErr moveq #0,d0 move.b -(a0),d0 move.b d0,3(a1) addq #4,a1 subq.b #1,d0 LoopSerErr2 move.l a2,(a1)+ SkipSerErr tst.b (a2)+ bne.s SkipSerErr dbra d0,LoopSerErr2 bra.s LoopSerErr DoneSerErr get.l Arg_To,d0 vor.l Arg_From,d0 snev GotCmdArgs tstv.l Arg_MUI bne.s DoMUI tst.l d0 bne ProcessCmdArgs DoMUI dtl ,a0 moveq #MUIMaster_MVer,d0 call TrackLibrary put.l d0,muimasterbase move.l d0,a6 bset.b #svfb_errorreq,sv_flags+3(v) dtl <_Transmit>,a2 dt <_Receive> dt <_Settings> dt <_Quit> dt <_Abort> dt <_Save> dt <_Use> dt <_Restore> dt <_Close> geta Buttons,a3 moveq #8,d2 LoopMakeObj push a2 move.l sp,a0 moveq #MUIO_Button,d0 call muimaster,MUI_MakeObjectA addq #4,sp move.l d0,(a3)+ bne.s GenTButton MUIDosError dtl ,a0 SSDosError jump ss,DosError GenTButton tst.b (a2)+ bne.s GenTButton move.l d0,a0 move.w #MUIA_CycleChain-MUITags,d0 moveq #TRUE,d1 bsr SetAttr dbra d2,LoopMakeObj move.w #MUIA_InputMode-MUITags,d0 moveq #MUIV_InputMode_Toggle,d1 get.l SettingsButton,a0 bsr SetAttr move.w #MUIA_Weight-MUITags,d0 moveq #0,d1 get.l AbortButton,a0 bsr SetAttr move.w #MUIA_Popstring_Toggle-MUITags,d0 moveq #1,d1 get.l TransmitButton,a0 bsr SetAttr move.w #MUIA_Popstring_Toggle-MUITags,d0 moveq #1,d1 get.l ReceiveButton,a0 bsr SetAttr moveq #(6*32*16/8)>>2,d0 rol.l #2,d0 moveq #MEMF_PUBLIC!MEMF_CHIP,d1 call ss,TrackAllocMem move.l d0,a6 lea CasioIcons(pc),a2 lea PartTab(pc),a4 geta Bitmaps,a3 geta StatBar0,a1 moveq #5,d7 SkipZeroPart tst.b (a4)+ beq.s SkipZeroPart lea -1(a4),a0 put.l a0,StatBarText put.l a3,StatBarBMap move.l #$00040010,(a3)+ ;bm_BytesPerRow+bm_Rows move.l #$00010000,(a3)+ ;bm_Flags+bm_Depth+bm_Pad move.l a6,(a3)+ ;bm_Planes[0] moveq #15,d0 GenIconLine move.w (a2)+,d1 moveq #15,d2 GenIconPix move.w d1,d4 roxr.w #1,d4 roxr.l #1,d3 roxr.w #1,d1 roxr.l #1,d3 dbra d2,GenIconPix move.l d3,(a6)+ dbra d0,GenIconLine mpush a1-a3/a6 lea MUI_StatBar(pc),a3 bsr GenerateMUI mpop a1-a3/a6 move.l d0,(a1)+ ;StatBar get.l StatBarNumber,(a1)+ ;StatBarNum SkipPartPart tst.b (a4)+ bne.s SkipPartPart dbra d7,SkipZeroPart move.l #gnm_SIZEOF*PackMenuNum+1,d0 move.l d0,d2 call ss,IPAlloc clr.l -(sp) push d0 move.l d0,a3 add.l d0,d2 subq.l #1,d2 lea PackMenus(pc),a2 geta MenusHots,a4 moveq #FirstMenuCode,d3 NextMenuField addq.b #NM_ITEM,(a3) NextMenuTag move.b (a2)+,d0 beq.s GotMenuTitle bpl.s GotMenuHot addq.b #1,d0 bne.s NotMenuSepar subq.l #-NM_BARLABEL,gnm_Label(a3) bra.s NextMenuRecord NotMenuSepar move.w #CHECKIT!MENUTOGGLE,gnm_Flags(a3) bra.s NextMenuTag GotMenuTitle subq.b #NM_ITEM-NM_TITLE,(a3) GotMenuHot subq.b #2,d0 bmi.s NotMenuHot move.b d0,(a4) move.l a4,gnm_CommKey(a3) addq #2,a4 NotMenuHot move.l a2,gnm_Label(a3) ToEndLabel tst.b (a2)+ bne.s ToEndLabel move.l d3,gnm_UserData(a3) addq.l #1,d3 NextMenuRecord lea gnm_SIZEOF(a3),a3 cmp.l a3,d2 bne.s NextMenuField move.l sp,a0 moveq #MUIO_MenustripNM,d0 call muimaster,MUI_MakeObjectA put.l d0,MenuStrip beq MUIDosError addq #8,sp pea (FirstMenuCode+1).w push #MUIM_FindUData move.l d0,a2 bsr DoMethod put.l d0,TransmitMItem addq.l #1,4(sp) ;2 bsr DoMethod put.l d0,ReceiveMItem beq MUIDosError addq.l #6,4(sp) ;8 bsr DoMethod put.l d0,ConfigMItem beq MUIDosError addq #8,sp get.l sv_thistask,a0 move.l v,TC_Userdata(a0) sub.l a0,a0 gett STR_Slider,a1 sub.l a2,a2 moveq #6,d0 lea BaudRateFunc(pc),a3 call muimaster,MUI_CreateCustomClass put.l d0,BaudRateClass beq MUIDosError move.l d0,a0 move.l mcc_Class(a0),a0 clr.l -(sp) push sp ;TRUE push #MUIA_CycleChain pea Def_BaudRateN.w push #MUIA_Numeric_Max pea Def_BaudRateN.w push #MUIA_Numeric_Value pea 3.w push #MUIA_ExportID sub.l a1,a1 move.l sp,a2 call intuition,NewObjectA lea 4*8+4(sp),sp put.l d0,BaudRateSlider beq MUIDosError lea MUI_Applic(pc),a3 bsr GenerateMUI lea MUI_Notific(pc),a3 bsr SetNotify push TriggerValPtr(pc) ;28 vpush MainWin ;24 push #MUIM_Popstring_Open ;20 pea 1.w ;16 vpush TransmitAsl ;12 pea (FirstMenuCode+1).w ;8 push #MUIA_Application_MenuAction ;4 push #MUIM_Notify ;0 bsr DoMethodAppl addq.l #1,8(sp) ;2 get.l ReceiveAsl,12(sp) bsr DoMethod addq.l #2,8(sp) ;4 get.l ApplObj,12(sp) addq.l #1,16(sp) ;->2 move.w #MUIM_Application_AboutMUI-MUITags,22(sp) bsr DoMethod addq.l #5,8(sp) ;9 moveq #MUIV_Application_Load_ENVARC,d0 move.l d0,24(sp) move.w #MUIM_Application_Load-MUITags,22(sp) bsr DoMethod addq.l #1,8(sp) ;10 move.w #MUIM_Application_OpenConfigWindow-MUITags,22(sp) clr.l 24(sp) bsr DoMethod move.w #MUIA_Window_Open-MUITags,6(sp) move.l EveryTimePtr(pc),8(sp) move.w #MUIM_CallHook-MUITags,22(sp) geta WOpenHook,a0 lea WinOpenHook(pc),a1 move.l a1,h_Entry(a0) move.l v,h_Data(a0) move.l a0,24(sp) get.l MainWin,a2 bsr DoMethod move.w #MUIA_AppMessage-MUITags,6(sp) move.l a2,12(sp) addq.l #1,16(sp) ;->3 geta AppObjHook,a0 lea AppDropHook(pc),a1 move.l a1,h_Entry(a0) move.l v,h_Data(a0) move.l a0,24(sp) bsr DoMethod lea 8*4(sp),sp bsr ActRestore move.w #MUIA_Window_Open-MUITags,d0 moveq #TRUE,d1 get.l MainWin,a0 bsr SetAttr move.w #MUIA_Window_Open-MUITags,d0 get.l MainWin,a0 bsr GetAttr beq MUIDosError bsr ProcessCmdArgs tstv.b GotCmdArgs bne Return8 LoopNewInput bsr.s DoMUIPoll get.l MUIWaitMask,d0 beq.s LoopNewInput bsr.s MUIPollEnd bra.s LoopNewInput MUIPollEnd bset.l #SIGBREAKB_CTRL_C,d0 call exec,Wait put.l d0,MUIWaitMask btst.l #SIGBREAKB_CTRL_C,d0 beq Return8 BreakOut moveq #err_break,d0 SSReportError jump ss,ReportError DoMUIPoll call ss,TestBreak push a2 vpea MUIWaitMask push #MUIM_Application_NewInput bsr DoMethodAppl addq #8,sp pop a2 addq.l #1,d0 beq EXIT ;MUIV_Application_ReturnID_Quit subq.l #2,d0 bmi Return8 moveq #8,d1 cmp.l d0,d1 bcs Return8 cmp.w #5,d0 bcc.s CallAct tstv.b Inside bne.s Return8 CallAct add.l d0,d0 lea ButtonAct(pc),a0 add.w (a0,d0.w),a0 jmp (a0) ButtonAct dc.w ActTransmit-ButtonAct ;0 dc.w ActReceive-ButtonAct ;1 dc.w ActSave-ButtonAct ;2 dc.w ActUse-ButtonAct ;3 dc.w ActRestore-ButtonAct ;4 dc.w ActAbort-ButtonAct ;5 dc.w Return8-ButtonAct ;6 dc.w Return8-ButtonAct ;7 dc.w ActAbout-ButtonAct ;8 ActAbout moveq #TRUE,d1 bsr.s ApplicSleep dtl.lc ,a0 dt.lc dt.lc <© 1996 Short Software ',60,'short@k332.feld.cvut.cz',62,'> dt.lc dt.lc <> dt.lc dt.lc dt.lc <> dt.lc push a2 dtl ,a2 call ss,SimpleRequest pop a2 moveq #FALSE,d1 ApplicSleep move.w #MUIA_Application_Sleep-MUITags,d0 get.l ApplObj,a0 bra SetAttr ActUse push #MUIV_Application_Save_ENV bra.s ActUseCont ActSave push #MUIV_Application_Save_ENVARC ActUseCont push #MUIM_Application_Save bsr DoMethodAppl addq #8,sp move.w #MUIA_Window_Open-MUITags,d0 moveq #FALSE,d1 get.l ConfigWin,a0 bra SetAttr ActRestore push #MUIV_Application_Load_ENV push #MUIM_Application_Load bsr DoMethodAppl addq #8,sp Return8 rts ActTransmit get.l Arg_From,d0 bne TrasmitClear get.l TransmitText,a0 bsr GetAttrStr bra DoTransmit ActReceive get.l ReceiveText,a0 bsr GetAttrStr bra DoReceive ActAbort stv InAbort Return10 rts ChangeState0 tstv.l muimasterbase beq.s Return10 moveq #0,d2 ;--------------- ChangeState clr.l -(sp) vpush ConfigGroup vpush ReceiveButton vpush TransmitButton push d2 push #MUIA_Disabled push #MUIM_MultiSet bsr DoMethodAppl lea 7*4(sp),sp move.w #MUIA_Menuitem_Enabled-MUITags,d0 bchg.l #0,d2 move.l d2,d1 get.l TransmitMItem,a0 bsr.s SetAttr move.w #MUIA_Menuitem_Enabled-MUITags,d0 move.l d2,d1 get.l ReceiveMItem,a0 bsr.s SetAttr move.w #MUIA_Disabled-MUITags,d0 move.l d2,d1 get.l GaugeGroup,a0 SetAttr clr.l -(sp) push d1 move.w d0,-(sp) move.w #MUITags>>16,-(sp) move.l sp,a1 call intuition,SetAttrsA lea 12(sp),sp rts ;--------------- ProcessCmdArgs get.l Arg_To,d0 beq.s NoArgTo bsr.s DoReceive clrv.l Arg_To NoArgTo get.l Arg_From,d0 beq.s Return13 TrasmitClear bsr.s DoTransmit clrv.l Arg_From Return13 rts DoTransmit pea CallTransmit(pc) moveq #1,d1 bra.s CallRoutine DoReceive pea CallReceive(pc) moveq #2,d1 CallRoutine put.b d1,Inside push d0 tstv.l muimasterbase beq.s SkipPrepCfg moveq #1,d2 bsr ChangeState get.l DeviceString,a0 bsr GetAttrStr put.l d0,Arg_Device move.w #MUIA_Numeric_Value-MUITags,d0 get.l UnitNumber,a0 bsr GetAttr put.l d0,Arg_DevUnit move.w #MUIA_Numeric_Value-MUITags,d0 get.l BaudRateSlider,a0 bsr GetAttr moveq #1200>>4,d1 addq.l #4,d0 lsl.l d0,d1 put.l d1,Arg_Baud move.w #MUIA_Numeric_Value-MUITags,d0 get.l MicroSecSlider,a0 bsr GetAttr put.l d0,Arg_MicroWait get.b Inside,d0 subq.b #1,d0 dtl ,a0 beq.s SkipRecvInfo dtl ,a0 SkipRecvInfo move.l a0,d1 move.w #MUIA_Gauge_InfoText-MUITags,d0 get.l ProgressGauge,a0 bsr SetAttr moveq #0,d0 bsr DoSetGauge moveq #5,d2 vlea PartCounts+6*4,a2 move.l (v),a6 ClearCounts clr.l -(a2) move.l a2,a1 bsr.s SetNumber dbra d2,ClearCounts SkipPrepCfg pop a1 pop a0 push a1 moveq #0,d0 clrv.b InAbort call ss,CallBlock get.b Inside,d0 bmi.s AskDelete subq.b #2,d0 beq.s DoDelete bra.s WasTransmit AskDelete dtl.lc ,a0 dt move.l sp,a1 dtl ,a2 call ss,SimpleRequest tst.l d0 beq.s WasTransmit DoDelete move.l (sp),d1 call dos,DeleteFile WasTransmit addq #4,sp clrv.b Inside tstv.b FallOut beq ChangeState0 EXIT stv FallOut SSExitCleanup jump ss,ExitCleanup AddPartCount moveq #0,d0 get.b CurPart,d0 beq.s IsZeroPart subq.b #2,d0 IsZeroPart lsl.l #2,d0 lea PartCounts(v,d0.w),a1 addq.l #1,(a1) SetNumber push a2 lea -12(sp),sp move.l sp,a2 push a1 dt PercLUT,<%lu> gett PercLUT,a0 call ss,FormatStr pop a1 move.l sp,d1 geta PartCounts,a0 sub.l a0,a1 add.l a1,a1 geta StatBarNum0,a0 move.l (a0,a1),a0 move.w #MUIA_Text_Contents-MUITags,d0 bsr SetAttr lea 12(sp),sp pop a2 move.l (v),a6 rts CallReceive move.l a1,a0 moveq #OPEN_NEW+OPEN_LINEBUF,d0 moveq #0,d1 call TrackOpenBuf move.l d0,a3 stv CurPart bsr SerialInit put.b #ASCII_ACK,SerByte WaitSig1 bsr GetSerByte cmp.b #ASCII_CR,d0 bne.s WaitSig1 bsr GetSerByte cmp.b #ASCII_LF,d0 bne.s WaitSig1 stv.b Inside NextRcvPacket tstv.l muimasterbase beq.s NotUpdGauge get.b CurPart,d0 bmi.s NotUpdGauge bne.s NotZeroPart moveq #2,d0 NotZeroPart subq.l #1,d0 moveq #100,d1 mulu.w d1,d0 moveq #7,d1 divu.w d1,d0 bsr.s ChkSetGauge NotUpdGauge bsr SendItNow bsr GetSerByte cmp.b #ASCII_EOT,d0 bne.s NotEndTrans put.b d0,Inside FullGaugeRet moveq #100,d0 ChkSetGauge vcmp.w GaugeSet,d0 bls Return7 DoSetGauge tstv.l muimasterbase beq Return7 put.w d0,GaugeSet ext.l d0 move.l d0,d1 move.w #MUIA_Gauge_Current-MUITags,d0 get.l ProgressGauge,a0 bra SetAttr NotEndTrans cmp.b #2,d0 beq.s GotValidPkt dtl ,a0 move.w d0,-(sp) ExitErrorA1 move.l sp,a1 ExitError jump ExitError GotValidPkt bsr GetSerByte move.b d0,d7 vcmp.b CurPart,d0 beq.s IsCurPart put.b d0,CurPart cmp.b #8,d0 bcs.s SmallPartN BadPartN dtl ,a0 moveq #0,d0 get.b CurPart,d0 move.w d0,-(sp) bra.s ExitErrorA1 SmallPartN lea PartTab(pc),a4 LoopPart subq.b #1,d0 bcs.s DoneParts ScanPart tst.b (a4)+ bne.s ScanPart bra.s LoopPart DoneParts tst.b (a4) beq.s BadPartN dtl <',Char_Term,Char_Term,Char_Term,'>,a0 call BPuts move.l a4,a0 call BPutsNL bra.s NoFirstRec IsCurPart cmp.b #7,d7 beq.s NoFirstRec dtl <',Char_Term,Char_Term,'>,a0 call BPutsNL NoFirstRec bsr GetSerByte add.b d0,d7 move.b d0,d2 bsr GetSerByte add.b d0,d7 rol.w #8,d0 move.b d2,d0 cmp.w #SerBufSiz-1,d0 bcs.s OkaySize dtl ,a0 move.w #SerBufSiz-1,-(sp) ExitErrorD0W move.w d0,-(sp) bra.s ExitErrorA1 OkaySize geta SerBuf,a4 clr.b (a4,d0.l) move.w d0,d2 move.w d0,d3 bsr SerReceiveX bsr GetSerByte move.l a4,a0 NextXSumChar add.b d0,d7 move.b (a0)+,d0 dbra d2,NextXSumChar tst.b d7 beq.s GoodXSum dtl ,a0 move.w d7,-(sp) clr.b (sp) bra ExitErrorA1 GoodXSum bsr AddPartCount st d4 get.b CurPart,d0 beq BefRecScan cmp.b #7,d0 ;CALENDAR beq.s DoCalendar cmp.b #$F8,(a4)+ beq.s AfterF8 dtl ,a0 moveq #0,d0 move.b -(a4),d0 bra.s ExitErrorD0W DoCalendar cmp.w #6,d3 beq.s GoodCalLen dtl ,a0 move.w d3,-(sp) bra ExitErrorA1 GoodCalLen move.w (a4)+,d0 bsr.s PrintDate moveq #':',d0 call BPutByte moveq #3,d0 ReadLELong move.b (a4)+,d2 ror.l #8,d2 dbra d0,ReadLELong clr.w -(sp) NextDate addq.w #1,(sp) ror.l #1,d2 bcc.s NotMarked dtl < %02u>,a0 move.l sp,a1 call BPrintf NotMarked cmp.w #31,(sp) bne.s NextDate addq #2,sp bra DoneThisRec PrintDate move.w d0,d1 and.w #$000F,d1 move.w d1,-(sp) lsr.w #4,d0 add.w #$1900,d0 btst.l #8,d0 bne.s Not2000 add.w #$2000-$1A00,d0 Not2000 move.w d0,-(sp) dtl <%x-%02u>,a0 move.l sp,a1 call BPrintf addq #4,sp Return7 rts AfterF8 cmp.b #5,d0 ;SCHEDULE bne BefRecScan cmp.b #12,d3 bcc.s LongSchedDat dtl ,a0 move.w d3,-(sp) bra ExitErrorA1 LongSchedDat moveq #0,d0 move.b 10(a4),d0 move.w d0,-(sp) move.b 8(a4),d0 move.w d0,-(sp) move.b 3(a4),d0 cmp.b #$F3,d0 bne.s BadSchDat cmp.l #$00F30000,(sp) beq.s GoodSched BadSchDat move.w d0,-(sp) dtl ,a0 bra ExitErrorA1 GoodSched addq #4,sp move.w 1(a4),d0 rol.w #8,d0 bsr.s PrintDate moveq #0,d0 move.b 4(a4),d0 move.w d0,-(sp) move.b 5(a4),d0 move.w d0,-(sp) move.b (a4),d0 move.w d0,-(sp) dtl <-%02x: %02x:%02x>,a0 move.l sp,a1 call BPrintf addq #6,sp moveq #0,d0 move.b 7(a4),d0 cmp.b #$30,d0 beq.s NoEndTime moveq #0,d1 move.b 6(a4),d1 move.w d1,-(sp) move.w d0,-(sp) dtl <-%02x:%02x>,a0 move.l sp,a1 call BPrintf addq #4,sp moveq #0,d0 NoEndTime move.b 9(a4),d0 beq.s NoSchedImg move.w d0,-(sp) dtl.c < >,a0 dt PercUT,<%u> move.l sp,a1 call BPrintf addq #2,sp NoSchedImg moveq #10,d0 call BPutChar lea 11(a4),a4 BefRecScan moveq #0,d2 MainRecScan move.b (a4)+,d0 beq.s DoneThisRec cmp.b #Char_Term,d0 bne.s NotCharTerm moveq #Char_TermRepl,d0 bra.s NotCharE4 NotCharTerm cmp.b #Char_CasSep,d0 bne.s NotCharF3 tst.b d4 bne.s LoopRecScan bsr.s FlushRecScan moveq #Char_Term,d0 call BPutByte bra.s DoCharNL NotCharF3 cmp.b #Char_CasCR,d0 bne.s NotCharE4 DoCharNL addq.l #1,d2 bra.s LoopRecScan NotCharE4 move.w d0,-(sp) bsr.s FlushRecScan move.w (sp)+,d0 call BPutChar LoopRecScan clr.b d4 bra.s MainRecScan DoneThisRec moveq #10,d0 call BPutChar bra NextRcvPacket FlushRecScan tst.l d2 FlushRecScanX beq Return7 moveq #10,d0 call BPutChar subq.l #1,d2 bra.s FlushRecScanX ;*************** CallTransmit put.l a1,TransmitFName move.l a1,a0 moveq #OPEN_OLD,d0 moveq #0,d1 call TrackOpenBuf push d0 tstv.l muimasterbase beq.s EmptyFile move.l d0,a0 move.l bh_handle(a0),d1 move.l d1,d4 moveq #0,d2 moveq #OFFSET_END,d3 call dos,Seek moveq #OFFSET_BEGINNING,d3 move.l d4,d1 call Seek put.l d0,TxFileSize bne.s EmptyFile addqv.l #1,TxFileSize EmptyFile bsr SerialInit move.l (sp),a2 call BFlush put.l sp,ErrPtr moveq #0,d6 stv CurPart move.w #ASCII_CR<<8!ASCII_LF,-(sp) move.l sp,a0 moveq #2,d0 bsr DoSendBuf addq #2,sp bsr WaitAck NextLine addqv.l #1,CurLine geta LineBuf,a3 move.l a3,a0 move.l #LineBufSiz,d0 call BGets subq.l #1,d0 beq.s StringOK bsr FlushRec addq #4,sp moveq #ASCII_EOT,d0 bsr DoSendByte bra FullGaugeRet StringOK cmp.w #Char_Term<<8!Char_Term,(a3) bne NotSpec bsr FlushRec addq #2,a3 tst.b (a3) beq.s NextLine cmp.b #Char_Term,(a3)+ beq.s ReadPartID DoInvUse dt InvUseT, tpea InvUseT bra.s ErrDesc ReadPartID lea PartTab(pc),a4 clrv.b CurPart moveq #0,d2 LoopRdPartN move.l a3,a0 move.l a4,a1 call utility,Stricmp move.l (v),a6 beq.s NextLine ScanRdPartN tst.b (a4)+ bne.s ScanRdPartN addqv.b #1,CurPart cmpv.b #8,CurPart bne.s LoopRdPartN DoUnkPID dt UnkPIDT,,a0 tpea UnkPIDT ErrDesc geta LineBuf,a0 push a0 LenLine tst.b (a0)+ bne.s LenLine sub.l (sp),a0 vpush CurLine get.l TransmitFName,a2 push a2 LenFName tst.b (a2)+ bne.s LenFName sub.l (sp),a2 add.l a2,a0 lea 64(a0),a0 move.l a0,d0 call IPAlloc move.l d0,a2 dtl < in "%s", line %lu: "%s">,a0 move.l sp,a1 call FormatStr lea 12(sp),sp pop a0 get.l ErrPtr,a1 move.l a2,(a1) bra ExitErrorA1 NotSpec move.l d6,a0 tst.l d6 bne AlreadyBeginX moveq #0,d4 geta SerBuf,a0 move.b #2,(a0)+ get.b CurPart,d0 bmi.s DoUnkPID move.b d0,(a0)+ clr.w (a0)+ ;Length 2 B filled L8R cmp.b #7,d0 beq WrCalendar tst.b d0 beq AlreadyBegin move.b #$F8,(a0)+ move.b #Char_CasSep,(a0)+ cmp.b #5,d0 bne AlreadyBegin WrSchedule moveq #'-',d3 bsr ParseYear move.w -(a4),d0 rol.w #8,d0 move.w d0,(a4)+ bsr SchedStrStr cmp.l #32,d0 bcc BadSched tst.l d0 beq BadSched bsr ConvByteBCD move.b d0,-3(a4) move.w #Char_CasSep<<8,(a4)+ bsr SchReadHour move.b d0,(a4)+ move.l a4,a0 LoopSch2Col move.b (a3)+,d0 move.b d0,(a4)+ beq.s TermSch2ColX cmp.b #' ',d0 beq.s TermSch2Col cmp.b #'-',d0 bne.s LoopSch2Col TermSch2ColX subq #1,a3 TermSch2Col bsr StrStrToLA4 cmp.l #60,d0 bcc.s BadSched bsr ConvByteBCD move.b d0,-2(a4) clr.b (a4)+ move.l #$30F30000,(a4)+ move.l a4,a0 SkipSchSpc move.b (a3)+,d0 beq.s DoneSchParse cmp.b #' ',d0 beq.s SkipSchSpc cmp.b #'-',d0 bne.s NoEndSchTim bsr.s SchReadHour move.b d0,-4(a4) move.l a4,a0 LoopSch3Col move.b (a3)+,d0 move.b d0,(a4)+ beq.s TermSch3Col cmp.b #' ',d0 bne.s LoopSch3Col TermSch3Col bsr StrStrToLA4 cmp.l #60,d0 bcc.s BadSched bsr.s ConvByteBCD move.b d0,-5(a4) NoEndSchTim move.l a4,a0 LoopSch4Col move.b (a3)+,d0 move.b d0,(a4)+ beq.s TermSch4Col cmp.b #' ',d0 bne.s LoopSch4Col TermSch4Col bsr StrStrToLA4 move.l d0,d1 lsr.l #8,d1 bne.s BadSched move.b d0,-2(a4) subq #1,a3 LoopSch5Col move.b (a3)+,d0 beq.s DoneSchParse cmp.b #' ',d0 beq.s LoopSch5Col BadSched get.l ErrPtr,sp dt BadSchedT, tpea BadSchedT bra ErrDesc DoneSchParse move.l a4,d6 bra NextLine SchReadHour bsr SchedStrStr cmp.l #24,d0 bcc.s BadSched ConvByteBCD divu.w #10,d0 move.w d0,d1 swap d0 rol.b #4,d1 or.b d1,d0 rts ParseYear move.l a0,a4 LoopYrMin move.b (a3)+,d0 beq.s BadYear move.b d0,(a4)+ cmp.b #'-',d0 bne.s LoopYrMin bsr StrStrToLA4 cmp.l #2100,d0 bcs.s SmallYrYear BadYear dt BadYearT, tpea BadYearT bra ErrDesc SmallYrYear cmp.w #1901,d0 bcs.s BadYear move.l d0,d2 move.l a4,a0 LoopYrCol move.b (a3)+,d0 beq.s BadYear move.b d0,(a4)+ cmp.b d3,d0 bne.s LoopYrCol bsr StrStrToLA4 cmp.l #13,d0 bcc.s BadYear tst.l d0 beq.s BadYear sub.w #1900,d2 moveq #10,d1 divu.w d1,d2 swap d2 rol.b #4,d2 or.b d2,d0 move.b d0,1(a4) clr.w d2 swap d2 divu.w d1,d2 swap d2 move.b d2,d0 swap d2 rol.b #4,d2 or.b d2,d0 move.b d0,(a4) addq #2,a4 Return2 rts WrCalendar moveq #':',d3 bsr.s ParseYear moveq #0,d2 NextCalenDay move.l a4,a0 SkipSpcCalen move.b (a3)+,d0 beq.s SendCalend cmp.b #' ',d0 beq.s SkipSpcCalen bra.s SkipZeroCalI SkipZeroCal move.b (a3)+,d0 SkipZeroCalI cmp.b #'0',d0 beq.s SkipZeroCal CopyDayNum move.b d0,(a4)+ move.b (a3),d0 beq.s DoneDayNum addq #1,a3 cmp.b #' ',d0 bne.s CopyDayNum DoneDayNum clr.b (a4) move.l a0,a4 call StrToL subq.l #1,d0 bmi.s BadCalend bset.l d0,d2 cmp.l #31,d0 bcs.s NextCalenDay BadCalend dt CalBadT, tpea CalBadT bra ErrDesc SchedStrStr move.l a4,a0 LoopSchCol move.b (a3)+,d0 beq BadSched move.b d0,(a4)+ cmp.b #':',d0 bne.s LoopSchCol StrStrToLA4 clr.b -(a4) move.l a0,a4 moveq #0,d0 StrStrToL move.b (a0)+,d0 beq.s Return2 cmp.b #' ',d0 beq.s StrStrToL cmp.b #'0',d0 beq.s StrStrToL subq #1,a0 jump StrToL SendCalend moveq #3,d0 WrCalenLong move.b d2,(a4)+ ror.l #8,d2 dbra d0,WrCalenLong move.l a4,d6 bsr.s FlushRec bra NextLine AlreadyBeginX moveq #Char_CasCR-$100,d0 bclr.l #0,d4 bne.s PutToBuf AlreadyBegin move.b (a3)+,d0 bne.s NotNL addq.l #1,d4 move.l a0,d6 bra NextLine NotNL cmp.b #Char_Term,d0 bne.s PutToBuf tst.b (a3) bne DoInvUse moveq #-1,d4 moveq #Char_CasSep-$100,d0 PutToBuf geta SerBuf+SerBufSiz-1,a1 cmp.l a1,a0 bcs.s GoodPktLen move.w #SerBufSiz,-(sp) dt PktDatLT, tpea PktDatLT bra ErrDesc GoodPktLen move.b d0,(a0)+ bra.s AlreadyBegin FlushRec tst.l d6 beq.s Return3 tstv.l muimasterbase beq.s NoMUITxProg call BTell moveq #100,d1 call utility,UMult32 get.l TxFileSize,d1 call utility,UDivMod32 bsr DoSetGauge bsr AddPartCount NoMUITxProg move.l d6,d0 geta SerBuf+4,a0 sub.l a0,d0 ror.w #8,d0 put.w d0,SerBuf+2 ror.w #8,d0 addq.l #5,d0 move.l d6,a1 subq #4,a0 lea 1(a0),a1 move.w d0,d1 subq.w #4,d1 move.b (a1)+,d2 TxXSum add.b (a1)+,d2 dbra d1,TxXSum neg d2 move.b d2,(a1) moveq #0,d6 pea WaitAck(pc) DoSendBuf subq.w #1,d0 bmi.s Return3 LoopSendB push d0 move.b (a0)+,d0 push a0 bsr.s DoSendByte pop a0 pop d0 dbra d0,LoopSendB Return3 rts DoSendByte put.b d0,SerByte get.l TimerTrk,a1 move.l trk_data(a1),a0 get.l Arg_MicroWait,IOTV_TIME+TV_MICRO(a0) beq.s SendItNow clr.l IOTV_TIME+TV_SECS(a0) dtl ,a0 call ss,ChkDoIO SendItNow get.l SerialIO,a0 geta SerByte,a1 move.l a1,IO_DATA(a0) moveq #1,d0 move.l d0,IO_LENGTH(a0) move.w #CMD_WRITE,IO_COMMAND(a0) dtl ,a0 get.l SerialTrk,a1 jump ss,ChkDoIO ;*************** WaitAck bsr.s GetSerByte cmp.b #ASCII_ACK,d0 beq.s Return1 addq #2,sp move.w d0,(sp) dtl ,a0 cmp.b #5,d0 beq.s MemoryErr dtl ,a0 cmp.b #ASCII_EOT,d0 beq.s MemoryErr dtl ,a0 MemoryErr push a0 bra ErrDesc ;--------------- GetSerByte moveq #1,d0 subq #2,sp move.l sp,a0 bsr.s SerReceive moveq #0,d0 move.b (sp)+,d0 Return1 rts ;--------------- SerReceiveX move.l a4,a0 SerReceive get.l SerialIO,a1 move.l a0,IO_DATA(a1) move.w #CMD_READ,IO_COMMAND(a1) move.l d0,IO_LENGTH(a1) move.l MN_REPLYPORT(a1),a0 move.b MP_SIGBIT(a0),d5 call exec,SendIO LoopSerInput tstv.l muimasterbase beq.s SkipAbort bsr DoMUIPoll tstv.b InAbort beq.s SkipAbort pea SSExitCleanup(pc) put.b #ASCII_EOT,SerByte bra SendItNow SkipAbort get.l SerialIO,a1 call exec,CheckIO tst.l d0 bne.s DoneReadIO tstv.l muimasterbase beq.s ForceMUIPoll get.l MUIWaitMask,d0 beq.s LoopSerInput ForceMUIPoll bset.l d5,d0 bsr MUIPollEnd bra.s LoopSerInput DoneReadIO get.l SerialIO,a1 call exec,WaitIO move.l (v),a6 ProcSerErr ext.w d0 beq.s Return1 geta SerErrMem,a0 ;Stolen from SSLib.asm 10$ move.w d0,d1 sub.w (a0)+,d1 bcs.s 11$ move.w (a0)+,d2 beq.s 0$ cmp.w d2,d1 bcc.s 12$ lsl.w #2,d1 move.l 0(a0,d1.w),d2 moveq #err_iofail2,d0 bra.s 01$ 11$ move.w (a0)+,d2 12$ lsl.w #2,d2 add.l d2,a0 bra.s 10$ 0$ moveq #err_iofail,d0 get.l Arg_Device,d2 01$ dtl ,a1 jump ReportError ;--------------- SerialInit dt TimerDev, gett TimerDev,a0 moveq #IOTV_SIZE,d0 move.l d0,a1 moveq #UNIT_MICROHZ,d0 moveq #0,d1 sub.l a2,a2 call ss,TrackDevice put.l d1,TimerTrk move.w #TR_ADDREQUEST,IO_COMMAND(a1) get.l Arg_Device,a0 get.l Arg_DevUnit,d0 moveq #IOEXTSER_SIZE,d1 move.l d1,a1 moveq #0,d1 geta SerErrMem,a2 call TrackDevice put.l d1,SerialTrk put.l a1,SerialIO move.w #SDCMD_SETPARAMS,IO_COMMAND(a1) get.l Arg_Baud,IO_BAUD(a1) move.l #$08080100!SERF_XDISABLED!SERF_RAD_BOOGIE,IO_READLEN(a1) ;io_ReadLen,io_WriteLen,io_StopBits,io_SerFlags dtl ,a0 move.l d1,a1 jump ChkDoIO ;--------------- GenerateMUI gett __BaseText,a2 get.l muimasterbase,a6 moveq #0,d2 bra.s .loopnext BuildMUILoop equ * .loop push d2 .loop2 move.l #MUITags,d2 move.w (a3)+,d2 beq.s .end moveq #-1,d0 cmp.w d0,d2 bne.s .loopnext move.l #ASL_TB,d2 move.w (a3)+,d2 .loopnext moveq #0,d3 move.w (a3)+,d3 bmi.s .subobj bclr #14,d3 bne.s .numb add.l a2,d3 ; String push d3 bra.s .loop .numb cmp.w #$2000,d3 ; Number beq.s .long bcs.s .plus or.l #$FFFFE000,d3 .plus push d3 bra.s .loop .long push (a3)+ bra.s .loop .subobj bclr #15,d3 bclr #14,d3 bne.s .var add.l a2,d3 link a4,#0 push d3 move.w (a3)+,-(sp) push d2 clr.l -(sp) bra.s .loop2 .var move.l (a5,d3.w),-(sp) bra.s .loop .end move.l -4(a4),a0 move.l sp,a1 call MUI_NewObject tst.l d0 beq MUIDosError move.w -6(a4),d3 move.l d0,(a5,d3.w) move.l -10(a4),d2 unlk a4 tst.w d2 beq.s Return6 push d0 bra BuildMUILoop ;--------------- DoMethodAppl get.l ApplObj,a2 DoMethod lea 4(sp),a1 move.l -4(a2),a0 DoMethodEntry move.l h_Entry(a0),a6 jmp (a6) ;--------------- GetAttrStr move.w #MUIA_String_Contents-MUITags,d0 GetAttr move.l #MUITags,d1 move.w d0,d1 move.l d1,d0 clr.l -(sp) move.l sp,a1 call intuition,GetAttr pop d0 Return6 rts ;--------------- ;-1=Done,-2=TriggerValue,-3=ReturnID_Quit,-4=ID 1 SetNotify move.l sp,d2 move.w (a3)+,d0 bpl.s FilledLongD0E move.w d0,d1 addq.w #1,d1 beq.s Return6 move.l #MUIV_TriggerValue,d0 TriggerValPtr equ *-4 addq.w #1,d1 beq.s FilledLongD0 push #MUIV_Application_ReturnID_Quit addq.w #1,d1 beq.s RetQuitID neg.w d1 ext.l d1 move.l d1,(sp) RetQuitID push #MUIM_Application_ReturnID pea 2.w vpush ApplObj bra.s DoneRetID FilledLongD0E ext.l d0 FilledLongD0 push d0 move.w (a3)+,-(sp) move.w #MUITags>>16,-(sp) push #MUIM_Set pea 3.w move.w (a3)+,d0 move.l (v,d0.w),d0 push d0 DoneRetID move.w (a3)+,d0 ext.l d0 push d0 addq.l #1,d0 bne.s NotEveryTime move.l #MUIV_EveryTime,(sp) EveryTimePtr equ *-4 NotEveryTime move.w (a3)+,-(sp) move.w #MUITags>>16,-(sp) push #MUIM_Notify move.w (a3)+,d0 move.l (v,d0.w),a2 bsr DoMethod move.l d2,sp bra.s SetNotify ;--------------- BaudRateFunc cmp.l #MUIM_Numeric_Stringify,(a1) beq.s GotNumString move.l cl_Super(a0),a0 bra DoMethodEntry GotNumString move.w cl_InstOffset(a0),d0 mpush a2/a5/a6 add.w d0,a2 move.l 4(a1),d0 ;offsetof(struct MUIP_Numeric_Stringify,value) moveq #1200>>4,d1 addq.l #4,d0 lsl.l d0,d1 push d1 move.l 4.w,a0 move.l ThisTask(a0),a0 move.l TC_Userdata(a0),v move.l sp,a1 gett PercLUT,a0 call ss,FormatStr addq #4,sp move.l a2,d0 mpop a2/a5/a6 rts ;--------------- WinOpenHook mpush a5/a6 move.l h_Data(a0),v move.w #MUIA_Window_Window-MUITags,d0 get.l MainWin,a0 bsr GetAttr get.l sv_thistask,a0 move.l d0,pr_WindowPtr(a0) mpop a5/a6 rts ;--------------- AppDropHook mpush d2/d3/a2/a5/a6 move.l h_Data(a0),v move.l (a1),a1 move.l am_NumArgs(a1),d0 beq.s DoneDropHook subq.l #1,d0 beq.s OneDropHook BeepDropHook sub.l a0,a0 call intuition,DisplayBeep bra.s DoneDropHook OneDropHook tstv.b Inside bne.s BeepDropHook move.l am_ArgList(a1),a0 move.l (a0)+,d1 ;wa_Lock push (a0) ;wa_Name geta AppDropBuf,a2 move.l a2,d2 move.l #AppBufSiz,d3 call dos,NameFromLock pop d2 tst.l d0 beq.s BeepDropHook move.l a2,d1 call AddPart tst.l d0 beq.s BeepDropHook put.l a2,Arg_From moveq #1,d0 push d0 push #MUIM_Application_ReturnID bsr DoMethodAppl addq #8,sp move.w #MUIA_Application_Iconified-MUITags,d0 moveq #0,d1 get.l ApplObj,a0 bsr SetAttr DoneDropHook mpop d2/d3/a2/a5/a6 rts ;--------------- Cleanup get.l muimasterbase,a6 get.l ApplObj,d0 beq.s NoApplObj move.l d0,a0 clrv.l ApplObj call MUI_DisposeObject NoApplObj get.l BaudRateClass,d0 beq Return6 move.l d0,a0 clrv.l BaudRateClass jump MUI_DeleteCustomClass ;--------------- dc.b 0,1,15,3,11,3,4,1,1 SerErrTab dc.b 'DevBusy',0 dc.b 'BufErr',0 dc.b 'InvParam',0 dc.b 'LineErr',0 dc.b 'TimerErr',0 dc.b 'BufOverflow',0 dc.b 'NoDSR',0 dc.b 'DetectedBreak',0 ;!!! SerErrTabSize on begin - keep fresh ;--------------- PackMenus dc.b 0,'Project',0 ;0 dc.b 'T'+2,'Transmit...',0 ;1 dc.b 'R'+2,'Receive...',0 ;2 dc.b -1 dc.b '?'+2,'About...',0 ;3 dc.b 1,'About MUI...',0 ;4 dc.b -1 dc.b 'H'+2,'Hide',0 ;5 dc.b 'Q'+2,'Quit',0 ;6 dc.b 0,'Configuration',0 ;7 dc.b -2,'C'+2,'Settings',0 ;8 dc.b 1,'Restore last saved',0 ;9 dc.b -1 dc.b 'M'+2,'MUI...',0 ;10 PackMenuNum equ 14 ;!!! PackMenuHots on begin - keep fresh ;--------------- PartTab dc.b 'ProtID',0 ;0 dc.b 0 ;1 dc.b 0 ;2 dc.b 'Phone-B',0 ;3 dc.b 'Phone-P',0 ;4 dc.b 'Schedule',0 ;5 dc.b 'Memo',0 ;6 dc.b 'Calendar',0 ;7 even ;--------------- MTag macro ifge \1-MUITags dc.w \1-MUITags else dc.w -1,\1-ASL_TB endc endm MOffs macro dc.w \1+\2-__BaseText endm MObj macro ifne \1 MTag \1 endc ifnd STREX_\2 STREX_\2 set 1 dt STR_\2,<\2.mui> endc MOffs $8000,STR_\2 ifgt NARG-2 dc.w \3 dv.l \3 elseif dc.w __Trash endc endm MText macro MTag \1 dt STR_\@a,<\2> MOffs 0,STR_\@a endm MNum macro MTag \1 ifge \2-$2000 dc.w $6000 dc.l \2 elseif ifle \2+$2000 dc.w $6000 dc.l \2 elseif dc.w $4000+(\2&$3FFF) endc endc endm MVar macro MTag \1 ifd \2 ifge \2-$4000 fail endc endc dc.w \2+$C000 endm MEnd macro dc.w 0 endm Notify macro ifeq NARG-4 ifc 'Quit','\4' dc.w -3 else dc.w -(\4)-4 endc else ifc 'TriggerValue','\6' dc.w -2 else dc.w \6 endc dc.w MUIA_\5-MUITags,\4 endc ifc 'EveryTime','\3' dc.w -1 else dc.w \3 endc dc.w MUIA_\2-MUITags,\1 endm dv.l __Trash dt.c __BaseText,<> ;--------------- MUI_Applic MObj 0,Application,ApplObj MText MUIA_Application_Title, MText MUIA_Application_Version,<$VER: Casio-A 1.0 (31.8.96)> MText MUIA_Application_Copyright,<© 1996 Short Software> MText MUIA_Application_Author, MText MUIA_Application_Description, MText MUIA_Application_Base, MVar MUIA_Application_Menustrip,MenuStrip MObj MUIA_Application_Window,Window,MainWin MText MUIA_Window_Title, MNum MUIA_Window_ID,'MAIN' MNum MUIA_Window_AppWindow,TRUE MObj MUIA_Window_RootObject,Group MObj MUIA_Group_Child,Group,GaugeGroup MNum MUIA_Group_Horiz,TRUE MNum MUIA_Frame,MUIV_Frame_Button MNum MUIA_Disabled,TRUE MVar MUIA_Group_Child,AbortButton MObj MUIA_Group_Child,Gauge,ProgressGauge MNum MUIA_Gauge_Horiz,TRUE MText MUIA_Gauge_InfoText,<%ld%%> MNum MUIA_Frame,MUIV_Frame_Gauge MEnd MEnd MObj MUIA_Group_Child,Rectangle MEnd MObj MUIA_Group_Child,Group MNum MUIA_Group_Columns,2 MNum MUIA_Frame,MUIV_Frame_Text MVar MUIA_Group_Child,QuitButton MVar MUIA_Group_Child,SettingsButton MObj MUIA_Group_Child,Popasl,ReceiveAsl MVar MUIA_Popstring_Button,ReceiveButton MObj MUIA_Popstring_String,String,ReceiveText MNum MUIA_ExportID,6 MNum MUIA_ShowMe,FALSE MEnd MText ASLFR_TitleText, MNum ASLFR_DoSaveMode,TRUE MNum ASLFR_RejectIcons,TRUE MEnd MObj MUIA_Group_Child,Popasl,TransmitAsl MVar MUIA_Popstring_Button,TransmitButton MObj MUIA_Popstring_String,String,TransmitText MNum MUIA_ExportID,5 MNum MUIA_ShowMe,FALSE MEnd MText ASLFR_TitleText, MNum ASLFR_RejectIcons,TRUE MEnd MEnd MObj MUIA_Group_Child,Rectangle MEnd MObj MUIA_Group_Child,Group MNum MUIA_Group_Columns,2 MNum MUIA_Frame,MUIV_Frame_Group MText MUIA_FrameTitle, MVar MUIA_Group_Child,StatBar5 MVar MUIA_Group_Child,StatBar2 MVar MUIA_Group_Child,StatBar4 MVar MUIA_Group_Child,StatBar1 MVar MUIA_Group_Child,StatBar3 MVar MUIA_Group_Child,StatBar0 MEnd MEnd MEnd MVar MUIA_Application_DropObject,MainWin MObj MUIA_Application_Window,Window,ConfigWin MText MUIA_Window_Title, MNum MUIA_Window_ID,'SETT' MObj MUIA_Window_RootObject,Group,ConfigGroup MObj MUIA_Group_Child,Group MNum MUIA_Group_Horiz,TRUE MVar MUIA_Group_Child,CloseButton MVar MUIA_Group_Child,RestoreButton MVar MUIA_Group_Child,UseButton MVar MUIA_Group_Child,SaveButton MEnd MObj MUIA_Group_Child,Group,MicroSecSlider MNum MUIA_Group_Columns,2 MNum MUIA_Frame,MUIV_Frame_Button MObj MUIA_Group_Child,Slider MNum MUIA_Numeric_Min,0 MNum MUIA_Numeric_Max,1000 MNum MUIA_Numeric_Value,Def_Micros MNum MUIA_ExportID,4 MNum MUIA_CycleChain,TRUE MEnd MObj MUIA_Group_Child,Text MText MUIA_Text_Contents,<',27,'rDelay [MicroSec]> MNum MUIA_HorizWeight,0 MEnd MVar MUIA_Group_Child,BaudRateSlider MObj MUIA_Group_Child,Text MText MUIA_Text_Contents,<',27,'rBaud rate> MNum MUIA_HorizWeight,0 MEnd MObj MUIA_Group_Child,String,UnitNumber MText MUIA_String_Accept,<0123456789> MNum MUIA_Frame,MUIV_Frame_String MVar MUIA_String_Integer,Arg_DevUnit MNum MUIA_ExportID,2 MNum MUIA_CycleChain,TRUE MEnd MObj MUIA_Group_Child,Text MText MUIA_Text_Contents,<',27,'rDevice unit> MNum MUIA_HorizWeight,0 MEnd MObj MUIA_Group_Child,String,DeviceString MNum MUIA_Frame,MUIV_Frame_String MVar MUIA_String_Contents,Arg_Device MNum MUIA_ExportID,1 MNum MUIA_CycleChain,TRUE MEnd MObj MUIA_Group_Child,Text MText MUIA_Text_Contents,<',27,'rDevice> MNum MUIA_HorizWeight,0 MEnd MEnd MEnd MEnd MEnd MUI_StatBar MObj 0,Group MNum MUIA_Group_Horiz,TRUE MNum MUIA_Frame,MUIV_Frame_Text MObj MUIA_Group_Child,Rectangle MNum MUIA_FixWidth,1 MEnd MObj MUIA_Group_Child,Text,StatBarNumber MText MUIA_Text_Contents,< 0> MText MUIA_Text_PreParse,<',27,'r',27,'8> MEnd MObj MUIA_Group_Child,Text MVar MUIA_Text_Contents,StatBarText MNum MUIA_Text_SetMax,TRUE MEnd MObj MUIA_Group_Child,Rectangle MNum MUIA_Rectangle_VBar,TRUE MNum MUIA_FixWidth,1 MEnd MObj MUIA_Group_Child,Bitmap MVar MUIA_Bitmap_Bitmap,StatBarBMap MNum MUIA_Bitmap_Width,32 MNum MUIA_Bitmap_Height,16 MNum MUIA_Bitmap_Precision,PRECISION_ICON MNum MUIA_Frame,MUIV_Frame_None MNum MUIA_FixWidth,32 MNum MUIA_FixHeight,16 MEnd MEnd MUI_Notific Notify SettingsButton,Selected,EveryTime,ConfigWin,Window_Open,TriggerValue Notify ConfigWin,Window_Open,EveryTime,SettingsButton,Selected,TriggerValue Notify ConfigWin,Window_Open,EveryTime,ConfigMItem,Menuitem_Checked,TriggerValue Notify ConfigWin,Window_CloseRequest,TRUE,ConfigWin,Window_Open,FALSE Notify CloseButton,Pressed,FALSE,ConfigWin,Window_Open,FALSE Notify MainWin,Window_CloseRequest,TRUE,Quit Notify TransmitText,String_Acknowledge,EveryTime,0 Notify ReceiveText,String_Acknowledge,EveryTime,1 Notify QuitButton,Pressed,FALSE,Quit Notify SaveButton,Pressed,FALSE,2 Notify UseButton,Pressed,FALSE,3 Notify RestoreButton,Pressed,FALSE,4 Notify AbortButton,Pressed,FALSE,5 Notify ApplObj,Application_MenuAction,FirstMenuCode+5,ApplObj,Application_Iconified,TRUE Notify ApplObj,Application_MenuAction,FirstMenuCode+6,Quit Notify ConfigMItem,Menuitem_Checked,EveryTime,ConfigWin,Window_Open,TriggerValue dc.w -1 ;--------------- CasioIcons incbin "Casio-A.gfx" ;--------------- tags template dv.l Arg_To dv.l Arg_From dv.l Arg_Device dv.l Arg_DevUnit dv.l Arg_Baud dv.l Arg_MicroWait dv.l Arg_MUI defvar diserr 1<