******************************************************************************** * EyeMove by MC68 * * If you find any bugs in the program please let me know. * * Write to the following address: * * Andrzej Fien Finished: 14.09.1990 * * ul.Turkienicza 17/26 * * 35-010 Rzeszow * * POLAND * ******************************************************************************** OpenLibrary EQU -552 ;(libratyName,version)(A1,D0) CloseLibrary EQU -414 ;(library)(A1) GetMsg EQU -372 ;(port)(A0) ReplyMsg EQU -378 ;(message)(A1) Open EQU -30 ;(name,accessMode)(D1-D2) Close EQU -36 ;(file)(D1) Write EQU -48 ;(file,buffer,length)(D1-D3) OpenWindow EQU -204 ;(OWargs)(A0) CloseWindow EQU -72 ;(Window)(A0) ActivateGadget EQU -462 ;(Gadgets,Window,Req)(A0-A2) AllocRemember EQU -396 ;(RememberKey,Size,Flags)(A0,D0-D1) FreeRemember EQU -408 ;(RememberKey,ReallyForget)(A0,D0) * stack frame map PublicMemory EQU -20 RP EQU -16 WW EQU -12 IntBase EQU -8 DosBase EQU -4 ******************** Code ****************************************************** LINK A4,#-20 MOVE.L 4.W,A6 LEA DosName(PC),A1 MOVEQ #0,D0 JSR OpenLibrary(A6) MOVE.L D0,DosBase(A4) BEQ.W GetOut LEA IntName(PC),A1 MOVEQ #0,D0 JSR OpenLibrary(A6) MOVE.L D0,IntBase(A4) BEQ.W CloseDos MOVE.L D0,A6 LEA RememberKey(PC),A0 MOVE.L #5120,D0 MOVEQ #1,D1 JSR AllocRemember(A6) MOVE.L D0,PublicMemory(A4) BEQ.W CloseInt LEA AddressWW(PC),A0 JSR OpenWindow(A6) MOVE.L D0,WW(A4) BEQ.W FreeMemory MOVE.L D0,A1 MOVE.L 50(A1),RP(A4) LEA AddressGG(PC),A0 SUBA.L A2,A2 JSR ActivateGadget(A6) AddressLoop MOVE.L WW(A4),A0 MOVE.L 86(A0),A0 MOVE.L 4.W,A6 JSR GetMsg(A6) TST.L D0 BEQ.S AddressLoop MOVE.L D0,A1 MOVE.W 22(A1),D2 JSR ReplyMsg(A6) CMPI.W #$200,D2 BEQ.S Quit LEA AddressBuffer(PC),A2 MOVEQ #0,D0 TST.B (A2) BEQ.S Quit ConvertBuffer MOVE.B (A2)+,D1 BEQ.S EndBuffer SUBI.B #'0',D1 BCLR #5,D1 CMPI.B #9,D1 BLS.S LessOrSame SUBQ.B #7,D1 LessOrSame CMPI.B #$0F,D1 BHI.S Quit LSL.L #4,D0 ADD.B D1,D0 BRA.S ConvertBuffer EndBuffer BSR.W MovePicture MOVE.L DosBase(A4),A6 MOVE.L #ImageFile,D1 MOVE.L #1006,D2 JSR Open(A6) MOVE.L D0,D1 BEQ.S Quit MOVE.L D0,-(A7) MOVE.L PublicMemory(A4),D2 MOVE.L #5120,D3 JSR Write(A6) MOVE.L (A7)+,D1 JSR Close(A6) Quit MOVE.L WW(A4),A0 MOVE.L IntBase(A4),A6 JSR CloseWindow(A6) FreeMemory LEA RememberKey(PC),A0 MOVEQ #1,D0 JSR FreeRemember(A6) CloseInt MOVE.L A6,A1 MOVE.L 4.W,A6 JSR CloseLibrary(A6) CloseDos MOVE.L DosBase(A4),A1 JSR CloseLibrary(A6) GetOut UNLK A4 MOVEQ #0,D0 RTS MovePicture MOVE.L D0,A1 MOVE.L PublicMemory(A4),A0 MOVE.L A1,A3 BSR.S Moving LEA 16000(A3),A1 Moving MOVEQ #40-1,D1 MoveLine MOVEQ #64-1,D0 MOVE.L A1,A2 MoveByte MOVE.B (A1)+,(A0)+ DBF D0,MoveByte LEA 80(A2),A1 DBF D1,MoveLine RTS AddressWW DC.W 259,103,122,50 DC.B 3,2 DC.L $240,$3100A,AddressGG,0,TextAddress,0,0 DC.W 0,0,0,0,1 AddressGG DC.W 0,0,24,26,72,10,0,3,4 DC.L Border,0,0,0,AddressSInfo DC.W 0,0,0 AddressSInfo DC.L AddressBuffer,AddressBuffer DC.W 0,7,0,0,0,0,0,0,0,0,0,0,0,0 Border DC.W 0,0 DC.B 1,0,0,5 DC.L Lines,0 Lines DC.W -4,-2,76,-2,76,9,-4,9,-4,-2 RememberKey DC.L 0 AddressBuffer DCB.B 7,0 ImageFile DC.B 'Image.CE',0 IntName DC.B 'intuition.library',0 DosName DC.B 'dos.library',0 TextAddress DC.B 'Points to:',0 EVEN