******************************************************************************** * CoreEye 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) FindTask EQU -294 ;(name)(A1) Open EQU -30 ;(name,accessMode)(D1-D2) Close EQU -36 ;(file)(D1) Read EQU -42 ;(file,buffer,length)(D1-D3) Write EQU -48 ;(file,buffer,length)(D1-D3) Lock EQU -84 ;(name,type)(D1-D2) UnLock EQU -90 ;(lock)(D1) Examine EQU -102 ;(lock,fileInfoBlock)(D1-D2) ExNext EQU -108 ;(lock,fileInfoBlock)(D1-D2) Delay EQU -198 ;(timeout)(D1) OpenWindow EQU -204 ;(OWargs)(A0) CloseWindow EQU -72 ;(Window)(A0) SetMenuStrip EQU -264 ;(Window,Menu)(A0-A1) ClearMenuStrip EQU -54 ;(Window)(A0) WindowToBack EQU -306 ;(Window)(A0) WindowToFront EQU -312 ;(Window)(A0) WBenchToFront EQU -342 ;() RefreshGadgets EQU -222 ;(Gadgets,Window,Req)(A0-A2) ActivateGadget EQU -462 ;(Gadgets,Window,Req)(A0-A2) ModifyProp EQU -156 ;(Gadget,Window,Req,Flags,HPos,VPos,HBody,VBody)(A0-A2,D0-D4) AllocRemember EQU -396 ;(RememberKey,Size,Flags)(A0,D0-D1) FreeRemember EQU -408 ;(RememberKey,ReallyForget)(A0,D0) RectFill EQU -306 ;(RastPort,xl,yl,xu,yu)(A1,D0-D3) SetAPen EQU -342 ;(RastPort,pen)(A1,D0) SetBPen EQU -348 ;(RastPort,pen)(A1,D0) SetDrMd EQU -354 ;(RastPort,drawMode)(A1,D0) BltTemplate EQU -36 ;(source,srcX,srcModulo,RastPort,destX,destY,sizeX,sizeY)(A0,D0-D1,A1,D2-D5) WaitBlit EQU -228 ;() * stack frame map Flags EQU -60 WhichFile EQU -59 NumberFiles EQU -58 FromFile EQU -57 ClickCounter EQU -56 ByteMode EQU -55 SaveLock EQU -52 SaveLength EQU -48 WBMessage EQU -44 PublicMemory EQU -40 ChipMem EQU -36 RP2 EQU -32 WW2 EQU -28 RP1 EQU -24 WW1 EQU -20 IntBase EQU -16 GfxBase EQU -12 DosBase EQU -8 Pointer EQU -4 ******************** Code ****************************************************** *Begin LINK A4,#-60 CLR.L Pointer(A4) CLR.B Flags(A4) * MOVE.L 4.W,A6 * LEA DosName(PC),A1 * MOVEQ #0,D0 * JSR OpenLibrary(A6) * MOVE.L D0,DosBase(A4) * BEQ.W GetOut LEA GfxName(PC),A1 MOVEQ #0,D0 JSR OpenLibrary(A6) MOVE.L D0,GfxBase(A4) BEQ.W ToRTS LEA IntName(PC),A1 MOVEQ #0,D0 JSR OpenLibrary(A6) MOVE.L D0,IntBase(A4) BEQ.W CloseGfx MOVE.L D0,A6 LEA RememberKey(PC),A0 MOVE.L #3464,D0 MOVEQ #1,D1 JSR AllocRemember(A6) MOVE.L D0,PublicMemory(A4) BNE.S PublicAllocated BSR.W Insufficient BRA.W CloseAllLibs PublicAllocated LEA MainWindow(PC),A0 JSR OpenWindow(A6) MOVE.L D0,WW1(A4) BNE.S MainWWOpened BSR.W Insufficient BRA.W FreeMemory MainWWOpened MOVE.L WW1(A4),A0 MOVE.L 50(A0),RP1(A4) LEA MenuMemory(PC),A1 JSR SetMenuStrip(A6) JSR WBenchToFront(A6) MainLoop BSR.W Show MOVE.L WW1(A4),A0 MOVE.L 86(A0),A0 MOVE.L 4.W,A6 JSR GetMsg(A6) TST.L D0 BEQ.S MainLoop MOVE.L D0,A1 MOVE.L 20(A1),D2 MOVE.B 25(A1),D3 MOVE.L 28(A1),D4 JSR ReplyMsg(A6) CMPI.B #$20,D2 BEQ.W ArrowPress CMPI.B #$40,D2 BEQ.W WWToBF BTST #21,D2 BNE.W RawKeys CMPI.B #8,D2 BEQ.W ClickMouse MOVEQ #20-1,D1 CMPI.W #$100,D2 BEQ.S SearchForItem MOVEQ #6-1,D1 SearchForItem LEA ItemTable(PC),A0 MOVEQ #0,D0 NextKey CMP.B (A0)+,D3 BEQ.S FoundKey ADDQ.B #1,D0 DBF D1,NextKey BRA.S MainLoop FoundKey LSL.W #1,D0 MOVE.W JumpTable(PC,D0.W),D0 MOVE.L Pointer(A4),D1 PEA MainLoop(PC) JMP JumpTable(PC,D0.W) RawKeys CMPI.B #13,D3 BNE.S WriteKey MOVE.L WW1(A4),A1 ChgMode MOVE.L #$568,82(A1) LEA Line+24(PC),A0 MOVE.L #'view',(A0) BRA.W MainLoop WriteKey MOVE.L Pointer(A4),A0 MOVE.B D3,(A0)+ MOVE.L A0,Pointer(A4) BRA.W MainLoop ItemTable DC.B $4F,$4E,$4C,$4D,$44,$43,0,$20,$40,$60,$80,$A0,1,$21,$41,2,$22,$42,$62,$82 JumpTable DC.W Left-JumpTable DC.W Right-JumpTable DC.W Up-JumpTable DC.W Down-JumpTable DC.W Fire-JumpTable DC.W Fire-JumpTable DC.W Load-JumpTable DC.W Save-JumpTable DC.W Modify-JumpTable DC.W FillMemory-JumpTable DC.W MoveMemory-JumpTable DC.W Quit-JumpTable DC.W SetAddress-JumpTable DC.W PgUp-JumpTable DC.W PgDn-JumpTable DC.W SearchString-JumpTable DC.W SearchWord-JumpTable DC.W SearchLongWord-JumpTable DC.W SearchTask-JumpTable DC.W RepeatSearch-JumpTable ClickUp MOVE.L Pointer(A4),D1 BSR.W PgUp BSR.W Show BTST #7,ArrowUpGG+13(PC) BEQ.W MainLoop MOVE.L DosBase(A4),A6 MOVEQ #10,D1 JSR Delay(A6) Loop_2 BTST #7,ArrowUpGG+13(PC) BEQ.W MainLoop MOVE.L Pointer(A4),D1 BSR.W PgUp BSR.W Show BRA.S Loop_2 ArrowPress MOVE.L Pointer(A4),D1 CMP.L DragGG(PC),D4 BEQ.S ClickUp CMP.L ArrowDownGG(PC),D4 BEQ.S ChangeMode CMP.L ArrowUpGG(PC),D4 BNE.W MainLoop BSR.W PgDn BSR.W Show BTST #7,ArrowDownGG+13(PC) BEQ.W MainLoop MOVE.L DosBase(A4),A6 MOVEQ #10,D1 JSR Delay(A6) Loop_1 BTST #7,ArrowDownGG+13(PC) BEQ.W MainLoop MOVE.L Pointer(A4),D1 BSR.W PgDn BSR.W Show BRA.S Loop_1 ChangeMode MOVE.L WW1(A4),A1 BTST #5,83(A1) BNE.W ChgMode PEA MainLoop(PC) Fire MOVE.L WW1(A4),A1 MOVE.L #$200168,82(A1) LEA Line+24(PC),A0 MOVE.L #'edit',(A0) RTS WWToBF MOVE.L WW1(A4),A0 MOVE.L IntBase(A4),A6 CMP.L WWFrontGG(PC),D4 BEQ.S WWToBack CMP.L MainWindow+18(PC),D4 BNE.S ToMainLoop1 JSR WindowToFront(A6) ToMainLoop1 BRA.W MainLoop WWToBack JSR WindowToBack(A6) BRA.S ToMainLoop1 ClickMouse BTST #6,$BFE001 BNE.S ToMainLoop1 MOVEQ #0,D0 MOVEQ #0,D1 MOVE.L WW1(A4),A0 MOVE.W 108(A0),D0 MOVE.W 110(A0),D1 SUBI.W #12,D0 CMPI.W #430,D0 BCC.S ExitClick SUBI.W #61,D1 CMPI.W #128,D1 BCC.S ExitClick CMPI.W #303,D0 BCC.S AsciiPart CMPI.W #279,D0 BCC.S ExitClick MOVE.L D0,D2 DIVU #72,D2 LSL.W #3,D2 SUB.W D2,D0 LSR.W #4,D0 BRA.S ForHex AsciiPart SUBI.W #303,D0 LSR.W #3,D0 ForHex LSR.W #3,D1 LSL.B #4,D1 OR.B D0,D1 MOVE.B D1,Pointer+3(A4) BSR.W Show ExitClick BTST #6,$BFE001 BEQ.S ClickMouse BRA.S ToMainLoop1 ******************** Load and Save subroutines ********************************* Load LEA TextLoad(PC),A1 SUBA.L A2,A2 MOVEQ #7,D0 BSR.W LoadSave MOVE.L A5,D1 BEQ.W ExitLS MOVE.L #1005,D2 MOVE.L DosBase(A4),A6 JSR Open(A6) MOVE.L D0,D1 BNE.S ReadFile BadFile LEA FileDoesNotExist(PC),A1 BSR.W Request BRA.S RestoreLength ReadFile MOVE.L D0,-(A7) MOVE.L Pointer(A4),D2 MOVE.L #901120,D3 JSR Read(A6) MOVE.L (A7)+,D1 JSR Close(A6) RestoreLength MOVE.L SaveLength(A4),A1 CLR.B (A1) ExitLS SUBA.L A5,A5 RTS Save LEA TextSave(PC),A1 LEA LengthGadget(PC),A2 MOVEQ #10,D0 BSR.W LoadSave DecToHex LEA SaveLengthBuffer(PC),A0 MOVEQ #0,D7 MOVEQ #0,D1 TST.B (A0) BEQ.S RestoreLength ConvertToHex MOVE.B (A0)+,D1 BEQ.S EndBufferDec SUBI.B #'0',D1 CMPI.B #9,D1 BHI.S RestoreLength MULU #10,D7 ADD.L D1,D7 BRA.S ConvertToHex EndBufferDec MOVE.L A5,D1 BEQ.W ExitLS MOVE.L #1006,D2 MOVE.L DosBase(A4),A6 JSR Open(A6) MOVE.L D0,D1 BEQ.W BadFile MOVE.L D0,-(A7) MOVE.L Pointer(A4),D2 MOVE.L D7,D3 JSR Write(A6) MOVE.L (A7)+,D1 JSR Close(A6) BRA.W RestoreLength LoadSave LEA LoadSaveWW(PC),A0 MOVE.L A1,26(A0) MOVE.L A2,FileGadget-LoadSaveWW(A0) MOVE.B D0,LoadBorder1-LoadSaveWW+7(A0) MOVE.L IntBase(A4),A6 JSR OpenWindow(A6) MOVE.L D0,WW2(A4) BNE.S LoadSaveWWOpened BSR.W Insufficient BRA.W ExitSearch LoadSaveWWOpened MOVE.L D0,A0 MOVE.L 50(A0),RP2(A4) TST.B Flags(A4) BEQ.S Locking BSR.W PrintFiles LEA FileGadget(PC),A0 CLR.W FileSInfo-FileGadget+8(A0) BSR.W ActivStringGG BRA.W LoadSaveLoop Locking MOVE.L #$00FF0000,Flags(A4) LEA PropGadget(PC),A0 MOVE.L WW2(A4),A1 SUBA.L A2,A2 MOVEQ #5,D0 MOVEQ #0,D2 MOVEQ #-1,D4 MOVE.L IntBase(A4),A6 JSR ModifyProp(A6) MOVEQ #0,D0 MOVE.L RP2(A4),A1 MOVE.L GfxBase(A4),A6 JSR SetAPen(A6) MOVEQ #8,D0 MOVEQ #30,D1 MOVE.W #247,D2 MOVEQ #82,D3 JSR RectFill(A6) MOVE.L PublicMemory(A4),A5 MOVE.W #1600-1,D0 FillSpaces MOVE.W #' ',(A5)+ DBF D0,FillSpaces LEA DirBuffer(PC),A0 MOVE.L A0,D1 MOVEQ #-2,D2 MOVE.L DosBase(A4),A6 JSR Lock(A6) MOVE.L D0,SaveLock(A4) BNE.S LockIsOk BadDevice LEA RequestDevice(PC),A1 BSR.W Request LEA DirGadget(PC),A0 CLR.W DirSInfo-DirGadget+8(A0) BSR.W ActivStringGG NOT.B Flags(A4) BRA.S LoadSaveLoop LockIsOk MOVE.L D0,D1 MOVE.L A5,D2 JSR Examine(A6) TST.L 4(A5) BMI.S BadDevice LoadSaveLoop BSR.W Show TST.B ClickCounter(A4) BEQ.S CounterNull SUBQ.B #1,ClickCounter(A4) CounterNull TST.B Flags(A4) BNE.W NoMoreFiles MOVE.L SaveLock(A4),D1 MOVE.L PublicMemory(A4),A5 LEA 3200(A5),A0 MOVE.L A0,D2 MOVE.L DosBase(A4),A6 JSR ExNext(A6) TST.L D0 BNE.S MoveFile NOT.B Flags(A4) BSR.W PrintFiles MOVE.L #$5FFFA,D4 MOVE.B NumberFiles(A4),D1 BEQ.S LessThan6 EXT.W D1 DIVU D1,D4 BVC.S Corect LessThan6 MOVEQ #-1,D4 Corect MOVEQ #0,D2 MOVEQ #5,D0 LEA PropGadget(PC),A0 MOVE.L WW2(A4),A1 SUBA.L A2,A2 MOVE.L IntBase(A4),A6 JSR ModifyProp(A6) LEA FileGadget(PC),A0 CLR.W FileSInfo-FileGadget+8(A0) BSR.W ActivStringGG BRA.S NoMoreFiles MoveFile MOVEQ #3,D2 LEA 3204(A5),A0 TST.L (A0)+ BMI.S ItsFile MOVEQ #2,D2 ItsFile MOVE.B NumberFiles(A4),D1 EXT.W D1 LSL.W #5,D1 LEA 0(A5,D1.W),A5 MOVE.B D2,(A5)+ LEA 1(A5),A1 MOVEQ #0,D2 CopyFileName TST.B (A0) BEQ.S EndFileName ADDQ.B #1,D2 MOVE.B (A0)+,(A1)+ BRA.S CopyFileName EndFileName MOVE.B D2,(A5) ADDQ.B #1,NumberFiles(A4) NoMoreFiles MOVE.L WW2(A4),A0 MOVE.L 86(A0),A0 MOVE.L 4.W,A6 JSR GetMsg(A6) TST.L D0 BEQ.W LoadSaveLoop MOVE.L D0,A1 MOVE.W 22(A1),D2 MOVE.L 28(A1),D3 JSR ReplyMsg(A6) CMPI.B #$40,D2 BEQ.W GadgetUnPress CMPI.B #$20,D2 BEQ.W GadgetPress ClickFile BTST #6,$BFE001 BNE.S ToLoadSaveLoop1 MOVE.L WW2(A4),A0 MOVE.W 108(A0),D0 MOVE.W 110(A0),D1 CMPI.W #242,D0 BCC.S ToLoadSaveLoop1 SUBI.W #18,D1 CMPI.W #54,D1 BCC.S ToLoadSaveLoop1 EXT.L D1 DIVU #9,D1 ADD.B FromFile(A4),D1 MOVE.B D1,D3 LSL.W #5,D1 MOVE.L PublicMemory(A4),A5 LEA 0(A5,D1.W),A2 MOVE.B (A2)+,D0 MOVE.B (A2)+,D2 EXT.W D2 SUBQ.W #1,D2 CMPI.B #3,D0 BNE.S ItIsDirectory ItIsFile TST.B ClickCounter(A4) BEQ.S CounterNull2 CMP.B WhichFile(A4),D3 BEQ.W PressOk CounterNull2 MOVE.B D3,WhichFile(A4) LEA FileBuffer(PC),A0 MoveFileName MOVE.B (A2)+,(A0)+ DBF D2,MoveFileName CLR.B (A0) LEA FileGadget(PC),A0 MOVE.L WW2(A4),A1 SUB.L A2,A2 MOVE.L IntBase(A4),A6 JSR RefreshGadgets(A6) BSR.W PrintFiles MOVE.B #10,ClickCounter(A4) ToLoadSaveLoop1 BRA.W LoadSaveLoop ItIsDirectory CMPI.B #2,D0 BNE.S ToLoadSaveLoop1 LEA DirBuffer(PC),A0 MOVE.W DirSInfo+16(PC),D0 LEA -1(A0,D0.W),A1 BEQ.S DoublePoint CMPI.B #':',(A1) BEQ.S DoublePoint CMPI.B #'/',(A1)+ BEQ.S MoveDirName MOVE.B #'/',(A1) DoublePoint ADDQ.W #1,A1 MoveDirName MOVE.B (A2)+,(A1)+ DBF D2,MoveDirName CLR.B (A1) UnLocking MOVE.L SaveLock(A4),D1 MOVE.L DosBase(A4),A6 JSR UnLock(A6) BRA.W Locking CDParent LEA DirBuffer(PC),A0 MOVE.W DirSInfo+16(PC),D0 BEQ.S ToLoadSaveLoop1 LEA -1(A0,D0.W),A1 CMPI.B #':',(A1) BEQ.S ToLoadSaveLoop1 CD CLR.B (A1) CMPA.L A0,A1 BEQ.S UnLocking CMPI.B #':',-(A1) BEQ.S UnLocking CMPI.B #'/',(A1) BNE.S CD CLR.B (A1) BRA.S UnLocking GadgetPress CMP.L CancelGadget(PC),D3 BNE.S ToLoadSaveLoop2 SliderOn MOVE.B NumberFiles(A4),D0 EXT.W D0 SUBQ.W #6,D0 BLS.S ToLoadSaveLoop2 ADDQ.W #1,D0 MOVEQ #1,D5 SWAP D5 DIVU D0,D5 MOVE.L D5,D0 SWAP D0 ADD.W D0,D5 SliderLoop MOVEQ #0,D2 MOVE.W PropInfo+4(PC),D2 DIVU D5,D2 MOVE.B D2,FromFile(A4) BSR.S PrintFiles BTST #7,PropGadget+13(PC) BNE.S SliderLoop ToLoadSaveLoop2 BRA.W LoadSaveLoop PrintFiles MOVE.L GfxBase(A4),A6 MOVE.L RP2(A4),A1 MOVE.L PublicMemory(A4),A5 MOVEQ #0,D7 MOVE.B FromFile(A4),D6 EXT.W D6 LSL.W #5,D6 LEA 0(A5,D6.W),A3 MOVE.L #$0008001E,36(A1) PrintNextFile MOVEQ #0,D0 MOVE.B (A3)+,D0 JSR SetAPen(A6) MOVE.B WhichFile(A4),D6 SUB.B FromFile(A4),D6 CMP.B D6,D7 BNE.S NotThisFile MOVEQ #5,D0 JSR SetDrMd(A6) NotThisFile ADDQ.W #1,A3 MOVEQ #30,D0 MOVE.L D5,-(A7) BSR.W Print MOVE.L (A7)+,D5 MOVEQ #1,D0 JSR SetDrMd(A6) MOVE.W #8,36(A1) ADDI.W #9,38(A1) ADDQ.B #1,D7 CMPI.B #6,D7 BNE.S PrintNextFile RTS GadgetUnPress CMP.L OkGadget(PC),D3 BEQ.W UnLocking CMP.L GetdirGadget(PC),D3 BEQ.W PressCancel CMP.L PropGadget(PC),D3 BEQ.W UnLocking CMP.L DirGadget(PC),D3 BEQ.S FileEntered CMP.L ParentGadget(PC),D3 BEQ.S PressOk CMP.L FileGadget(PC),D3 BEQ.S PressOk CMP.L LoadSaveWW+18(PC),D3 BEQ.W CDParent CMP.L DirGadget(PC),D3 BNE.W LoadSaveLoop FileEntered LEA LengthGadget(PC),A0 TST.L FileGadget-LengthGadget(A0) BEQ.S PressOk MOVE.L WW2(A4),A1 SUBA.L A2,A2 MOVE.L IntBase(A4),A6 JSR ActivateGadget(A6) BRA.W LoadSaveLoop PressOk MOVE.W FileSInfo+16(PC),D1 BEQ.S PressCancel LEA DirBuffer(PC),A5 MOVE.W DirSInfo+16(PC),D0 LEA 0(A5,D0.W),A0 BEQ.S AllOk CMPI.B #':',-1(A0) BEQ.S AllOk CMPI.B #'/',-1(A0) BEQ.S AllOk MOVE.L A0,SaveLength(A4) MOVE.B #'/',(A0)+ BRA.S AddSlash AllOk MOVE.L A0,SaveLength(A4) AddSlash LEA FileBuffer(PC),A1 MountName MOVE.B (A1)+,(A0)+ DBF D1,MountName BRA.S Close2ndWW PressCancel SUBA.L A5,A5 Close2ndWW MOVE.L WW2(A4),A0 MOVE.L IntBase(A4),A6 JMP CloseWindow(A6) ActivStringGG MOVE.L WW2(A4),A1 MOVE.L IntBase(A4),A6 SUBA.L A2,A2 JMP ActivateGadget(A6) ******************** Modify subroutine ***************************************** Modify LEA ModifyWW(PC),A0 MOVE.L IntBase(A4),A6 JSR OpenWindow(A6) MOVE.L D0,WW2(A4) BEQ.W Insufficient ModifyAgain LEA ByteGG(PC),A0 MOVE.L WW2(A4),A1 SUBA.L A2,A2 CLR.B ByteBuffer-ByteGG(A0) CLR.B WordBuffer-ByteGG(A0) CLR.B LongBuffer-ByteGG(A0) MOVE.L IntBase(A4),A6 JSR RefreshGadgets(A6) CMPI.B #1,ByteMode(A4) BEQ.S ModeWord BCC.S ModeLong ModeByte LEA ByteGG(PC),A0 BRA.S RunGG ModeWord LEA WordGG(PC),A0 BRA.S RunGG ModeLong LEA LongGG(PC),A0 RunGG BSR.S ActivStringGG ModifyLoop BSR.W Show MOVE.L WW2(A4),A0 MOVE.L 86(A0),A0 MOVE.L 4.W,A6 JSR GetMsg(A6) TST.L D0 BEQ.S ModifyLoop MOVE.L D0,A1 MOVE.W 22(A1),D2 MOVE.L 28(A1),D3 JSR ReplyMsg(A6) CMPI.W #$200,D2 BEQ.W Close2ndWW MOVE.L Pointer(A4),A1 CMP.L ByteGG(PC),D3 BEQ.S ItwasWordGG BCC.S ItwasLongGG CLR.B ByteMode(A4) LEA ByteBuffer(PC),A2 BSR.W BufferToHex BMI.W Close2ndWW MOVE.B D0,(A1)+ MOVE.L A1,Pointer(A4) BRA.W ModifyAgain ItwasWordGG MOVE.B #1,ByteMode(A4) LEA WordBuffer(PC),A2 BSR.W BufferToHex BMI.W Close2ndWW BTST #0,Pointer+3(A4) BEQ.S EvenOk NotParity BSR.W Close2ndWW LEA ParityRequest(PC),A1 BRA.W Request EvenOk MOVE.W D0,(A1)+ MOVE.L A1,Pointer(A4) BRA.W ModifyAgain ItwasLongGG MOVE.B #2,ByteMode(A4) LEA LongBuffer(PC),A2 BSR.W BufferToHex BMI.W Close2ndWW BTST #0,Pointer+3(A4) BNE.S NotParity MOVE.L D0,(A1)+ MOVE.L A1,Pointer(A4) BRA.W ModifyAgain ******************** Fill and Move block subroutines ************************* FillMemory LEA TextFill(PC),A1 LEA PatternText(PC),A2 MOVEQ #3,D0 BRA.S FillMove MoveMemory LEA TextMove(PC),A1 LEA MoveToText(PC),A2 MOVEQ #7,D0 FillMove LEA FillMoveWW(PC),A0 MOVE.L A1,26(A0) MOVE.L A2,PatternIText-FillMoveWW+12(A0) MOVE.W D0,PatternSInfo-FillMoveWW+10(A0) CLR.B LengthBuffer-FillMoveWW(A0) CLR.L PatternBuffer-FillMoveWW(A0) MOVE.L IntBase(A4),A6 JSR OpenWindow(A6) MOVE.L D0,WW2(A4) BEQ.W Insufficient LEA LengthGG(PC),A0 Activate2nd BSR.W ActivStringGG FillMoveLoop MOVE.L WW2(A4),A0 MOVE.L 86(A0),A0 MOVE.L 4.W,A6 JSR GetMsg(A6) TST.L D0 BEQ.S FillMoveLoop MOVE.L D0,A1 MOVE.W 22(A1),D2 MOVE.L 28(A1),D3 JSR ReplyMsg(A6) CMPI.W #$200,D2 BEQ.W Close2ndWW CMP.L FillMoveWW+18(PC),D3 BNE.S ValuesEntered LEA LengthBuffer(PC),A2 BSR.W BufferToHex BMI.W Close2ndWW MOVE.L D0,D7 LEA PatternGG(PC),A0 BRA.S Activate2nd ValuesEntered BSR.W Close2ndWW SUBQ.W #1,D7 LEA PatternBuffer(PC),A2 BSR.W BufferToHex BMI.S ExitFillMove MOVE.L Pointer(A4),A1 MOVE.L D0,A2 LEA TextMove(PC),A3 CMPA.L FillMoveWW+26(PC),A3 BEQ.S Moving Filling MOVE.B D0,(A1)+ DBF D7,Filling SWAP D7 TST.W D7 BEQ.S ExitFillMove SUBQ.W #1,D7 FillLoop1 MOVEQ #-1,D3 FillLoop2 MOVE.B D0,(A1)+ DBF D3,FillLoop2 DBF D7,FillLoop1 ExitFillMove RTS Moving CMPA.L A1,A2 BEQ.S ExitFillMove BCS.S MoveHigher LEA 1(A1,D7.L),A1 LEA 1(A2,D7.L),A2 MoveLower MOVE.B -(A1),-(A2) DBF D7,MoveLower SWAP D7 TST.W D7 BEQ.S ExitFillMove SUBQ.W #1,D7 MoveLoop1 MOVEQ #-1,D1 MoveLoop2 MOVE.B -(A1),-(A2) DBF D1,MoveLoop2 DBF D7,MoveLoop1 BRA.S ExitFillMove MoveHigher MOVE.B (A1)+,(A2)+ DBF D7,MoveHigher SWAP D7 TST.W D7 BEQ.S ExitFillMove SUBQ.W #1,D7 MoveLoop3 MOVEQ #-1,D1 MoveLoop4 MOVE.B (A1)+,(A2)+ DBF D1,MoveLoop4 DBF D7,MoveLoop3 ExitMove RTS ******************** Set address subroutine ************************************ SetAddress LEA SetAddressWW(PC),A0 CLR.B SetAddressBuffer-SetAddressWW(A0) MOVE.L IntBase(A4),A6 JSR OpenWindow(A6) MOVE.L D0,WW2(A4) BEQ.W Insufficient LEA SetAddrGG(PC),A0 BSR.W ActivStringGG SetAddressLoop BSR.W Show MOVE.L WW2(A4),A0 MOVE.L 86(A0),A0 MOVE.L 4.W,A6 JSR GetMsg(A6) TST.L D0 BEQ.S SetAddressLoop MOVE.L D0,A1 MOVE.W 22(A1),D2 JSR ReplyMsg(A6) CMPI.W #$200,D2 BSR.W Close2ndWW CMPI.W #$200,D2 BEQ.S ExitMove LEA SetAddressBuffer(PC),A2 BSR.W BufferToHex BMI.S ExitMove MOVE.L D0,D1 BRA.W TestArea ******************** Moving subroutines **************************************** PgUp SUBI.L #$100,D1 BRA.S TestArea PgDn ADDI.L #$100,D1 BRA.S TestArea Left SUBQ.L #1,D1 BRA.S TestArea Right ADDQ.L #1,D1 BRA.S TestArea Up SUBI.L #$10,D1 BRA.S TestArea Down ADDI.L #$10,D1 TestArea CMPI.L #$FFFFFF,D1 BHI.S AreaBad CMPI.L #$DFFFFF,D1 BHI.S AreaOk CMPI.L #$DF0000,D1 BCS.S AreaOk LEA CustomChipsRq(PC),A1 BRA.W Request AreaOk MOVE.L D1,Pointer(A4) AreaBad RTS ******************** Searches subroutines ************************************** SearchString LEA TextSearch(PC),A1 MOVEQ #101,D0 BSR.W Search SearchAgain1 LEA SearchBuffer(PC),A2 MOVE.B (A2)+,D0 BEQ.S AreaBad NextByte CMP.B (A0)+,D0 BEQ.S FoundSth CMPA.L A1,A0 BCS.S NextByte LEA RequestString(PC),A1 BRA.W Request FoundSth MOVE.L A0,A3 MOVE.W SearchSInfo+16(PC),D3 SUBQ.W #2,D3 BCS.S StringFound CmpBuffer CMPM.B (A3)+,(A2)+ DBNE D3,CmpBuffer BNE.S SearchAgain1 LEA SearchBuffer+1(PC),A2 CMPA.L A0,A2 BEQ.S SearchAgain1 StringFound SUBQ.W #1,A0 BRA.S Found SearchWord LEA TextWord(PC),A1 MOVEQ #5,D0 BSR.S Search SearchAgain2 LEA SearchBuffer(PC),A2 BSR.W BufferToHex BMI.S ToRTS BSR.S Parity NextWord CMP.W (A0)+,D0 BEQ.S WordFound CMPA.L A1,A0 BCS.S NextWord LEA RequestWord(PC),A1 BRA.W Request WordFound SUBQ.W #2,A0 Found MOVE.L A0,Pointer(A4) ToRTS RTS Parity MOVE.L A0,D1 BTST #0,D1 BEQ.S ParityOk ADDQ.L #1,D1 ParityOk MOVE.L D1,A0 RTS SearchLongWord LEA TextLongWord(PC),A1 MOVEQ #9,D0 BSR.S Search SUBQ.W #1,A1 SearchAgain3 LEA SearchBuffer(PC),A2 BSR.W BufferToHex BMI.S ToRTS BSR.S Parity NextLongWord CMP.L (A0),D0 BEQ.S Found ADDQ.W #2,A0 CMPA.L A1,A0 BCS.S NextLongWord LEA RequestLongWord(PC),A1 BRA.W Request Search LEA SearchWW(PC),A0 MOVE.L A1,26(A0) MOVE.W D0,SearchSInfo-SearchWW+10(A0) MOVEQ #50,D1 LEA SearchBuffer(PC),A1 ClearSearchBuffer CLR.B (A1)+ DBF D1,ClearSearchBuffer MOVE.L IntBase(A4),A6 JSR OpenWindow(A6) MOVE.L D0,WW2(A4) BEQ.W Insufficient LEA SearchGG(PC),A0 BSR.W ActivStringGG SearchLoop BSR.W Show MOVE.L WW2(A4),A0 MOVE.L 86(A0),A0 MOVE.L 4.W,A6 JSR GetMsg(A6) TST.L D0 BEQ.S SearchLoop MOVE.L D0,A1 MOVE.W 22(A1),D2 JSR ReplyMsg(A6) BSR.W Close2ndWW CMPI.W #$200,D2 BEQ.S ExitSearch RepeatArea LEA FirstArea(PC),A3 MOVE.L Pointer(A4),D0 SearchArea MOVE.L (A3)+,A0 MOVE.L (A3)+,A1 CMP.L A0,D0 BCS.S Next_3 CMP.L A1,D0 BHI.S Next_4 RTS Next_3 ADDQ.W #4,A3 Next_4 LEA 16(A3),A3 BRA.S SearchArea ExitSearch ADDQ.W #4,A7 ToRTS2 RTS RepeatSearch MOVE.W SearchSInfo+10(PC),D7 BEQ.S ToRTS2 MOVE.W SearchSInfo+16(PC),D6 BEQ.S ToRTS2 BSR.S RepeatArea MOVE.L D0,A0 ADDQ.W #1,A0 CMPI.W #9,D7 BCS.W SearchAgain2 BEQ.W SearchAgain3 CMPI.W #101,D7 BEQ.W SearchAgain1 BRA.S RSearchTask SearchTask LEA TextTask2(PC),A1 MOVE.W #103,D0 BSR.W Search RSearchTask LEA SearchBuffer(PC),A1 MOVE.L 4.W,A6 JSR FindTask(A6) TST.L D0 BNE.S TaskFound LEA TaskRequest(PC),A1 BRA.W Request TaskFound MOVE.L D0,A0 BRA.W Found ******************** Show subroutine ******************************************* Show MOVE.L RP1(A4),A1 MOVE.L GfxBase(A4),A6 MOVE.L Pointer(A4),D4 LEA Line+15(PC),A2 MOVEQ #6-1,D6 Loop8 MOVE.B D4,D5 AND.B #%00001111,D5 CMP.B #9,D5 BLE.S NotGreater1 ADDQ.B #7,D5 NotGreater1 ADD.B #'0',D5 MOVE.B D5,-(A2) LSR.L #4,D4 DBF D6,Loop8 MOVE.L #$00110030,36(A1) LEA Line(PC),A3 MOVEQ #38,D0 BSR.W Print MOVE.L Pointer(A4),D0 FindArea CMP.L (A3)+,D0 BCS.S Next_1 CMP.L (A3)+,D0 BHI.S Next_2 MOVEQ #16,D0 BSR.W Print BRA.S ShowNumbers Next_1 ADDQ.W #4,A3 Next_2 LEA 16(A3),A3 BRA.S FindArea ShowNumbers MOVE.B Pointer+3(A4),D6 LSR.B #4,D6 MOVE.L #$0011003F,36(A1) MOVE.L Pointer(A4),D4 CLR.B D4 MOVE.L D4,A5 MOVEQ #0,D7 NextLine LEA PrintCodes+8(PC),A2 LEA 30(A2),A0 MOVEQ #4-1,D3 NextPart MOVE.L (A5)+,D4 MOVE.L D4,(A0)+ MOVEQ #8-1,D0 Loop9 MOVE.B D4,D5 AND.B #%00001111,D5 CMP.B #9,D5 BLE.S NotGreater2 ADDQ.B #7,D5 NotGreater2 ADD.B #'0',D5 MOVE.B D5,-(A2) LSR.L #4,D4 DBF D0,Loop9 LEA 17(A2),A2 DBF D3,NextPart LEA PrintCodes(PC),A3 CMP.B D7,D6 BEQ.S ShowCur MOVEQ #54,D0 BSR.W Print Return MOVE.W #$11,36(A1) ADDQ.W #8,38(A1) ADDQ.B #1,D7 CMPI.B #16,D7 BNE.S NextLine TextOver RTS ShowCur MOVE.L D6,-(A7) MOVE.B Pointer+3(A4),D2 ANDI.W #$000F,D2 MOVE.W D2,D0 LSR.B #2,D0 LSL.B #1,D2 ADD.B D2,D0 MOVEQ #38,D6 SUB.B D0,D6 SUBQ.B #2,D6 LEA PrintCodes(PC),A3 BSR.S Print MOVEQ #2,D0 JSR SetAPen(A6) MOVEQ #3,D0 JSR SetBPen(A6) MOVEQ #2,D0 BSR.W Print MOVEQ #1,D0 JSR SetAPen(A6) MOVEQ #0,D0 JSR SetBPen(A6) MOVE.L D6,D4 MOVE.B Pointer+3(A4),D0 ANDI.W #$000F,D0 MOVEQ #16,D6 SUB.B D0,D6 SUBQ.B #1,D6 ADD.W D4,D0 BSR.S Print MOVEQ #2,D0 JSR SetAPen(A6) MOVEQ #3,D0 JSR SetBPen(A6) MOVEQ #1,D0 BSR.S Print MOVEQ #1,D0 JSR SetAPen(A6) MOVEQ #0,D0 JSR SetBPen(A6) MOVE.L D6,D0 BSR.S Print MOVE.L (A7)+,D6 BRA.W Return Print MOVE.L D0,D4 BEQ.W TextOver SUBQ.B #1,D0 LEA TextImage(PC),A0 MoveNextChar MOVEQ #0,D1 MOVE.B (A3)+,D1 LSL.W #3,D1 LEA Fonts(PC,D1.W),A2 MOVE.B (A2)+,(A0)+ MOVE.B (A2)+,53(A0) MOVE.B (A2)+,107(A0) MOVE.B (A2)+,161(A0) MOVE.B (A2)+,215(A0) MOVE.B (A2)+,269(A0) MOVE.B (A2)+,323(A0) MOVE.B (A2),377(A0) DBF D0,MoveNextChar SUBA.W D4,A0 MOVEQ #0,D0 MOVEQ #54,D1 MOVE.W 36(A1),D2 EXT.L D2 MOVE.W 38(A1),D3 EXT.L D3 LSL.W #3,D4 ADD.W D4,36(A1) MOVEQ #8,D5 JSR BltTemplate(A6) JMP WaitBlit(A6) Fonts INCBIN Fonts.CE BufferToHex MOVEQ #0,D0 TST.B (A2) BEQ.S ErrorBuffer 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 ErrorBuffer LSL.L #4,D0 ADD.B D1,D0 BRA.S ConvertBuffer ErrorBuffer MOVEQ #-1,D0 EndBuffer RTS ******************** Request subroutine **************************************** Insufficient LEA MemoryRequest(PC),A1 Request LEA RequestWW(PC),A0 MOVE.L A1,RequestIText-RequestWW+12(A0) MOVE.L IntBase(A4),A6 MOVE.L 68(A6),D0 SUBI.W #174,D0 BPL.S Rq1 CLR.W D0 BRA.S Rq2 Rq1 CMPI.W #386,D0 BCS.S Rq2 MOVE.W #420,D0 Rq2 SWAP D0 LSR.W #1,D0 SUBI.W #34,D0 BPL.S Rq3 CLR.W D0 BRA.S Rq4 Rq3 CMPI.W #178,D0 BCS.S Rq4 MOVE.W #212,D0 Rq4 MOVE.L D0,(A0) JSR OpenWindow(A6) MOVE.L D0,D7 BEQ.S EndBuffer RequestLoop MOVE.L D7,A0 MOVE.L 86(A0),A0 MOVE.L 4.W,A6 JSR GetMsg(A6) TST.L D0 BEQ.S RequestLoop MOVE.L D0,A1 MOVE.W 22(A1),D2 MOVE.B 25(A1),D3 JSR ReplyMsg(A6) CMPI.B #$40,D2 BEQ.S ExitRequest CMPI.B #$35,D3 BEQ.S ExitRequest CMPI.B #$45,D3 BEQ.S ExitRequest CMPI.B #$34,D3 BNE.S RequestLoop ExitRequest MOVE.L D7,A0 MOVE.L IntBase(A4),A6 JMP CloseWindow(A6) ******************** Structures ************************************************ MainWindow DC.W 66,0,508,200 DC.B 3,2 DC.L $568,$21000,WWFrontGG,0,0,0,0 DC.W 0,0,0,0,1 WWFrontGG DC.L WWBackGG DC.W -43,5,37,14,$14,1,1 DC.L 0,0,0,0,0 DC.W 0,0,0 WWBackGG DC.L DragGG DC.W -43,25,37,13,$14,1,1 DC.L 0,0,0,0,0 DC.W 0,0,0 DragGG DC.L ArrowUpGG DC.W 0,0,0,40,$27,0,$20 DC.L Image,0,0,0,0 DC.W 0,0,0 ArrowUpGG DC.L ArrowDownGG DC.W 462,64,32,32,6,3,1 DC.L ImageArrowUp1,ImageArrowUp2,0,0,0 DC.W 0,0,0 ArrowDownGG DC.L ModeGG DC.W 462,158,32,32,6,3,1 DC.L ImageArrowDown1,ImageArrowDown2,0,0,0 DC.W 0,0,0 ModeGG DC.W 0,0,160,47,82,10,3,3,1 DC.L BlueBorder,0,0,0,0 DC.W 0,0,0 ImageArrowUp1 DC.W 0,0,32,32,2 DC.L ArrowUp DC.B 3,0,0,0,0,0 ImageArrowUp2 DC.W 0,0,32,32,2 DC.L ArrowUp DC.B 1,3,0,0,0,0 ImageArrowDown1 DC.W 0,0,32,32,2 DC.L ArrowDown DC.B 3,0,0,0,0,0 ImageArrowDown2 DC.W 0,0,32,32,2 DC.L ArrowDown DC.B 1,3,0,0,0,0 ArrowUp DC.L %00000000000000000000000000000000 DC.L %00000000000000111100000000000000 DC.L %00000000000011111111000000000000 DC.L %00000000001111111111110000000000 DC.L %00000000111111111111111100000000 DC.L %00000011111111111111111111000000 DC.L %00001111111111111111111111110000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000001111111111110000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000111100000000000000 DC.L %00000000000011000011000000000000 DC.L %00000000001100000000110000000000 DC.L %00000000110000000000001100000000 DC.L %00000011000000000000000011000000 DC.L %00001100000000000000000000110000 DC.L %00110000000000000000000000001100 DC.L %11111111110000000000001111111111 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000111111111111111100000000 DC.L %00000000000000000000000000000000 DC.L %00000000111111111111111100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000111111111111111100000000 DC.L %00000000000000000000000000000000 DC.L %00000000111111111111111100000000 DC.L %00000000110000000000001100000000 DC.L %00000000111111111111111100000000 DC.L %00000000000000000000000000000000 DC.L %00000000111111111111111100000000 DC.L %00000000111111111111111100000000 ArrowDown DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000001111111111110000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00000000001111111111110000000000 DC.L %00001111111111111111111111110000 DC.L %00000011111111111111111111000000 DC.L %00000000111111111111111100000000 DC.L %00000000001111111111110000000000 DC.L %00000000000011111111000000000000 DC.L %00000000000000111100000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000000000000000000000000000 DC.L %00000000111111111111111100000000 DC.L %00000000111111111111111100000000 DC.L %00000000000000000000000000000000 DC.L %00000000111111111111111100000000 DC.L %00000000110000000000001100000000 DC.L %00000000111111111111111100000000 DC.L %00000000000000000000000000000000 DC.L %00000000111111111111111100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000111111111111111100000000 DC.L %00000000000000000000000000000000 DC.L %00000000111111111111111100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %00000000110000000000001100000000 DC.L %11111111110000000000001111111111 DC.L %00110000000000000000000000001100 DC.L %00001100000000000000000000110000 DC.L %00000011000000000000000011000000 DC.L %00000000110000000000001100000000 DC.L %00000000001100000000110000000000 DC.L %00000000000011000011000000000000 DC.L %00000000000000111100000000000000 Image DC.W 0,0,508,40,2 DC.L ImageData DC.B 3,0,0,0,0,0 ImageData INCBIN Image.CE BlueBorder DC.W 0,0 DC.B 2,0,0,9 DC.L BlueLines,Shadows1 BlueLines DC.W 301,16,334,16,334,143,301,143,301,16,301,49,334,49,334,110,301,110 Shadows1 DC.W 0,0 DC.B 1,0,0,3 DC.L UpLines,Shadows2 UpLines DC.W -158,-7,345,-7,345,150 Shadows2 DC.W 0,0 DC.B 3,0,0,3 DC.L DownLines,0 DownLines DC.W -158,-6,-158,151,345,151 Line DC.B 'Address: Mode: view Area: ' FirstArea DC.L $000000,$07FFFF DC.B ' Chip RAM ' DC.L $080000,$1FFFFF DC.B 'copy of chip RAM' DC.L $200000,$9FFFFF DC.B ' Fast RAM ' DC.L $A00000,$BFFFFF DC.B ' CIAs ' DC.L $C00000,$C7FFFF DC.B ' Expansion ' DC.L $C80000,$DBFFFF DC.B ' Unused ' DC.L $DC0000,$DEFFFF DC.B ' Realtime clock ' DC.L $E00000,$E7FFFF DC.B ' Unused ' DC.L $E80000,$EFFFFF DC.B ' Expansion slot ' DC.L $F00000,$F7FFFF DC.B ' ROM module ' DC.L $F80000,$FBFFFF DC.B ' copy of ROM ' DC.L $FC0000,$FFFFFF DC.B ' KickStart ROM ' PrintCodes DCB.B 54,' ' RememberKey DC.L 0 RequestWW DC.W 0,0,220,44 DC.B 2,1 DC.L $440,$31002,RequestGG,0,TitleRequest,0,0 DC.W 0,0,0,0,1 RequestGG DC.W 0,0,140,27,68,12,1,3,1 DC.L 0,0,RequestIText,0,0 DC.W 0,0,0 RequestIText DC.B 2,0,0,0 DC.W -130,-12 DC.L 0,0,ResumeIText ResumeIText DC.B 3,0,0,0 DC.W 10,2 DC.L 0,ResumeText,0 LoadSaveWW DC.W 180,60,280,136 DC.B 3,2 DC.L $68,$31012,ParentGadget,0,0,0,0 DC.W 0,0,0,0,1 ParentGadget DC.L OkGadget DC.W 8,15,71,8,0,$203,1 DC.L Borders,0,ParentIText,0,0 DC.W 0,0,0 ParentIText DC.B 3,0,0,0 DC.W 10,0 DC.L 0,ParentText,0 OkGadget DC.L GetdirGadget DC.W 8,-12,71,8,8,$203,1 DC.L Borders,0,OkIText,0,0 DC.W 0,0,0 Borders DC.W 0,0 DC.B 2,0,0,5 DC.L OkLines,0 OkLines DC.W -2,-2,72,-2,72,9,-2,9,-2,-2 OkIText DC.B 3,0,0,0 DC.W 25,0 DC.L 0,OkString,0 GetdirGadget DC.L CancelGadget DC.W 105,-12,71,8,8,$203,1 DC.L Borders,0,GetdirIText,0,0 DC.W 0,0,0 GetdirIText DC.B 3,0,0,0 DC.W 12,0 DC.L 0,GetdirString,0 CancelGadget DC.L PropGadget DC.W -79,-12,71,8,$18,$203,1 DC.L Borders,0,CancelIText,0,0 DC.W 0,0,0 CancelIText DC.B 3,0,0,0 DC.W 12,0 DC.L 0,CancelString,0 PropGadget DC.L DirGadget DC.W 255,26,18,60,4,3,3 DC.L ImageSlider,0,0,0,PropInfo DC.W 0,0,0 PropInfo DC.W 5,0,0,0,$FFFF,0,0,0,0,0,0 DirGadget DC.L FileGadget DC.W 88,90,180,10,0,3,4 DC.L LoadBorder1,0,DirIText,0,DirSInfo DC.W 0,0,0 DirIText DC.B 3,0,0,0 DC.W -80,0 DC.L 0,DirText,FileIText FileIText DC.B 3,0,0,0 DC.W -80,10 DC.L 0,FileText,0 DirSInfo DC.L DirBuffer,DirBuffer DC.W 0,101,0,0,0,0,0,0 DC.L 0,0,0 LoadBorder1 DC.W 0,0 DC.B 1,0,0,0 DC.L DirLines,LoadBorder2 DirLines DC.W 184,8,-4,8,-4,18,184,18,184,-2,-4,-2,-4,18,-4,28,62,28,62,18 LoadBorder2 DC.W 0,10 DC.B 2,0,0,5 DC.L FileLines,0 FileLines DC.W -82,-15,161,-15,161,-74,-82,-74,-82,-15 FileGadget DC.W 0,0,88,100,180,10,0,3,4 DC.L 0,0,0,0,FileSInfo DC.W 0,0,0 FileSInfo DC.L FileBuffer,FileBuffer DC.W 0,31,0,0,0,0,0,0 DC.L 0,0,0 LengthGadget DC.W 0,0,88,110,90,10,0,3,4 DC.L 0,0,LengthIText,0,LengthSInfo DC.W 0,0,0 LengthSInfo DC.L SaveLengthBuffer,SaveLengthBuffer DC.W 0,7,0,0,0,0,0,0 DC.L 0,0,0 LengthIText DC.B 3,0,0,0 DC.W -80,0 DC.L 0,LengthText,0 ModifyWW DC.W 216,96,208,65 DC.B 3,2 DC.L $240,$3100A,ByteGG,0,TextChange,0,0 DC.W 0,0,0,0,1 ByteGG DC.L WordGG DC.W 110,22,90,10,0,3,4 DC.L BorderL,0,ByteIText,0,ByteSInfo DC.W 0,0,0 ByteIText DC.B 3,0,0,0 DC.W -90,0 DC.L 0,ByteText,0 ByteSInfo DC.L ByteBuffer,ByteBuffer DC.W 0,3,0,0,0,0,0,0,0,0,0,0,0,0 WordGG DC.L LongGG DC.W 110,33,90,10,0,3,4 DC.L BorderL,0,WordIText,0,WordSInfo DC.W 0,0,0 WordIText DC.B 3,0,0,0 DC.W -90,0 DC.L 0,WordText,0 WordSInfo DC.L WordBuffer,WordBuffer DC.W 0,5,0,0,0,0,0,0,0,0,0,0,0,0 LongGG DC.W 0,0,110,44,90,10,0,3,4 DC.L BorderL,0,LongIText,0,LongSInfo DC.W 0,0,0 LongIText DC.B 3,0,0,0 DC.W -90,0 DC.L 0,LongText,0 LongSInfo DC.L LongBuffer,LongBuffer DC.W 0,9,0,0,0,0,0,0,0,0,0,0,0,0 BorderL DC.W 0,0 DC.B 1,0,0,5 DC.L LinesB,0 LinesB DC.W -4,-2,76,-2,76,9,-4,9,-4,-2 FillMoveWW DC.W 217,101,206,54 DC.B 3,2 DC.L $240,$3100A,LengthGG,0,TextFill,0,0 DC.W 0,0,0,0,1 LengthGG DC.L PatternGG DC.W 110,22,90,10,0,3,4 DC.L BorderL,0,FMLengthIText,0,FMLengthSInfo DC.W 0,0,0 FMLengthIText DC.B 3,0,0,0 DC.W -90,0 DC.L 0,FMLengthText,0 FMLengthSInfo DC.L LengthBuffer,LengthBuffer DC.W 0,7,0,0,0,0,0,0,0,0,0,0,0,0 PatternGG DC.W 0,0,110,33,90,10,0,3,4 DC.L BorderL,0,PatternIText,0,PatternSInfo DC.W 0,0,0 PatternIText DC.B 3,0,0,0 DC.W -90,0 DC.L 0,PatternText,0 PatternSInfo DC.L PatternBuffer,PatternBuffer DC.W 0,7,0,0,0,0,0,0,0,0,0,0,0,0 SetAddressWW DC.W 259,103,122,50 DC.B 3,2 DC.L $240,$3100A,SetAddrGG,0,TextSetAddress,0,0 DC.W 0,0,0,0,1 SetAddrGG DC.W 0,0,24,26,72,10,0,3,4 DC.L BorderL,0,0,0,SetAddrSInfo DC.W 0,0,0 SetAddrSInfo DC.L SetAddressBuffer,SetAddressBuffer DC.W 0,7,0,0,0,0,0,0,0,0,0,0,0,0 SearchWW DC.W 211,103,218,51 DC.B 3,2 DC.L $240,$3100A,SearchGG,0,0,0,0 DC.W 0,0,0,0,1 SearchGG DC.L 0 DC.W 16,26,190,10,0,3,4 DC.L SearchBorder,0,0,0,SearchSInfo DC.W 0,0,0 SearchSInfo DC.L SearchBuffer,SearchBuffer DCB.W 14,0 SearchBorder DC.W 0,0 DC.B 1,0,0,5 DC.L SearchLines,0 SearchLines DC.W -5,-2,188,-2,188,9,-5,9,-5,-2 MenuMemory DC.L MenuAddress DC.W 0,0,88,0,$101 DC.L MenuTitleMemory,ItemLoad,0,0 ItemLoad DC.L ItemSave DC.W 0,0,210,10,$56 DC.L 0,LoadIText,0 DC.B 'O',0 DC.W 0,0,-1 ItemSave DC.L ItemModify DC.W 0,10,210,10,$56 DC.L 0,SaveIText,0 DC.B 'W',0 DC.W 0,0,-1 ItemModify DC.L ItemFill DC.W 0,20,210,10,$56 DC.L 0,ModifyIText,0 DC.B 'M',0 DC.W 0,0,-1 ItemFill DC.L ItemMove DC.W 0,30,210,10,$56 DC.L 0,FillIText,0 DC.B 'F',0 DC.W 0,0,-1 ItemMove DC.L ItemQuit DC.W 0,40,210,10,$56 DC.L 0,MoveIText,0 DC.B 'C',0 DC.W 0,0,-1 ItemQuit DC.L 0 DC.W 0,53,210,10,$56 DC.L 0,QuitIText,0 DC.B 'Q',0 DC.W 0,0,-1 LoadIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextLoad,0 SaveIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextSave,0 ModifyIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextModify,0 FillIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextFill,0 MoveIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextMove,0 QuitIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextQuit,0 MenuAddress DC.L MenuSearch DC.W 88,0,96,0,$101 DC.L MenuTitleAddress,ItemSetAddress,0,0 ItemSetAddress DC.L ItemPgBackwards DC.W 0,0,180,10,$56 DC.L 0,SetAddressIText,0 DC.B 'A',0 DC.W 0,0,-1 ItemPgBackwards DC.L ItemPgForewards DC.W 0,10,180,10,$56 DC.L 0,PgBackwardsIText,0 DC.B 'U',0 DC.W 0,0,-1 ItemPgForewards DC.L 0 DC.W 0,20,180,10,$56 DC.L 0,PgForewardsIText,0 DC.B 'D',0 DC.W 0,0,-1 SetAddressIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextSetAddress,0 PgBackwardsIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextPgBackwards,0 PgForewardsIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextPgForewards,0 MenuSearch DC.W 0,0,184,0,88,0,$101 DC.L MenuTitleSearch,ItemSearch,0,0 ItemSearch DC.L ItemWord DC.W 0,0,180,10,$56 DC.L 0,SearchIText,0 DC.B 'S',0 DC.W 0,0,-1 ItemWord DC.L ItemLongWord DC.W 0,10,180,10,$56 DC.L 0,SWordIText,0 DC.B 'H',0 DC.W 0,0,-1 ItemLongWord DC.L ItemTask DC.W 0,20,180,10,$56 DC.L 0,LongWordIText,0 DC.B 'L',0 DC.W 0,0,-1 ItemTask DC.L ItemRepeat DC.W 0,30,180,10,$56 DC.L 0,TaskIText,0 DC.B 'T',0 DC.W 0,0,-1 ItemRepeat DC.W 0,0,0,40,180,10,$56 DC.L 0,RepeatIText,0 DC.B 'R',0 DC.W 0,0,-1 SearchIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextSearch,0 SWordIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextWord,0 LongWordIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextLongWord,0 TaskIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextTask,0 RepeatIText DC.B 3,2,0,0 DC.W 1,1 DC.L 0,TextRepeat,0 FileDoesNotExist DC.B 'File doesn',39,'t exist',0 RequestDevice DC.B 'Dir or device not found',0 ParityRequest DC.B 'Error! Not parity address',0 CustomChipsRq DC.B 'Error! Custom chips area',0 RequestString DC.B ' Given string not found',0 RequestWord DC.B ' Given word not found',0 RequestLongWord DC.B 'Given long word not found',0 TaskRequest DC.B ' Given task not exist',0 MemoryRequest DC.B ' Insufficient memory !',0 TitleRequest DC.B 'Request',0 ResumeText DC.B 'Resume',0 ParentText DC.B 'Parent',0 DirText DC.B 'Directory',0 FileText DC.B 'FileName',0 LengthText DC.B 'Length',0 OkString DC.B 'Ok!',0 GetdirString DC.B 'Getdir',0 CancelString DC.B 'Cancel',0 TextChange DC.B ' Change B. W. L. to.. ',0 ByteText DC.B 'byte $',0 WordText DC.B 'word $',0 LongText DC.B 'long $',0 FMLengthText DC.B 'Length $',0 PatternText DC.B 'Pattern $',0 MoveToText DC.B 'Move to $',0 MenuTitleMemory DC.B ' Memory',0 TextLoad DC.B 'Load file to memory',0 TextSave DC.B 'Save block to file',0 TextModify DC.B 'Modify',0 TextFill DC.B 'Fill block',0 TextMove DC.B 'Move block',0 TextQuit DC.B 'Quit',0 MenuTitleAddress DC.B ' Address',0 TextSetAddress DC.B 'Set address',0 TextPgBackwards DC.B 'Page backwards',0 TextPgForewards DC.B 'Page forewards',0 MenuTitleSearch DC.B ' Search',0 TextSearch DC.B 'Ascii string',0 TextWord DC.B 'Hex word',0 TextLongWord DC.B 'Hex long word',0 TextTask DC.B 'Task by name',0 TextTask2 DC.B 'Task name',0 TextRepeat DC.B 'Repeat search',0 IntName DC.B 'intuition.library',0 GfxName DC.B 'graphics.library',0 *DosName DC.B 'dos.library',0 EVEN ******************** Subroutine Quit ******************************************* Quit ADDQ.W #4,A7 TST.B Flags(A4) BEQ.S NoUnLock MOVE.L DosBase(A4),A6 MOVE.L SaveLock(A4),D1 JSR UnLock(A6) NoUnLock MOVE.L WW1(A4),A0 MOVE.L IntBase(A4),A6 JSR ClearMenuStrip(A6) MOVE.L WW1(A4),A0 JSR CloseWindow(A6) FreeMemory LEA RememberKey(PC),A0 MOVEQ #1,D0 JSR FreeRemember(A6) CloseAllLibs MOVE.L 4.W,A6 MOVE.L IntBase(A4),A1 JSR CloseLibrary(A6) CloseGfx MOVE.L GfxBase(A4),A1 JMP CloseLibrary(A6) * JSR CloseLibrary(A6) *CloseDos MOVE.L DosBase(A4),A1 * JSR CloseLibrary(A6) *GetOut UNLK A4 * MOVEQ #0,D0 * RTS EndProgram * DCB.B 732,0 ImageSlider EQU EndProgram DirBuffer EQU EndProgram+20 FileBuffer EQU EndProgram+121 TextImage EQU EndProgram+152 SearchBuffer EQU EndProgram+584 SaveLengthBuffer EQU EndProgram+687 PatternBuffer EQU EndProgram+694 LengthBuffer EQU EndProgram+701 ByteBuffer EQU EndProgram+708 WordBuffer EQU EndProgram+711 LongBuffer EQU EndProgram+716 SetAddressBuffer EQU EndProgram+725 ******************** End of program ********************************************