<> <> <> <> <> <> <> DIRECTORY Basics, DragOps; <> <<>> DragOpsUtils: DEFINITIONS IMPORTS Basics = BEGIN OPEN DragOps; <> <> <<>> PagesForWords: SAFE PROC [words: CARD] RETURNS [pages: PageCount] = TRUSTED INLINE { RETURN[Basics.ShiftRight[[int[int: words+(wordsPerPage-1)]], logWordsPerPage].int] }; WordsForPages: SAFE PROC [pages: PageCount] RETURNS [words: CARD] = TRUSTED INLINE { RETURN[Basics.ShiftLeft[[int[int: pages]], logWordsPerPage].int] }; PagesForBytes: SAFE PROC [bytes: CARD] RETURNS [pages: PageCount] = TRUSTED INLINE { RETURN[Basics.ShiftRight[[int[int: bytes+(bytesPerPage-1)]], logBytesPerPage].int] }; BytesForPages: SAFE PROC [pages: PageCount] RETURNS [bytes: CARD] = TRUSTED INLINE { RETURN[Basics.ShiftLeft[[int[int: pages]], logBytesPerPage].int] }; <<>> <<>> <> <<>> <<>> AddressForPageNumber: SAFE PROC [page: PageNumber] RETURNS [address: POINTER] = TRUSTED INLINE { RETURN[Basics.ShiftLeft[[int[int: page]], logWordsPerPage].ptr] }; PageNumberForAddress: SAFE PROC [address: POINTER] RETURNS [page: PageNumber] = TRUSTED INLINE { RETURN[Basics.ShiftRight[ [ptr[address]], logWordsPerPage].int] }; <<>> <> <> GetClockPulses: SAFE PROC RETURNS [CARD] = TRUSTED MACHINE CODE {-- NYI[] -- }; <> <<= TRUSTED MACHINE CODE {-- NYI[] -- };>> <<>> <> <> <> <> <<>> <> <<= MACHINE CODE {zLLB, returnOffset};>> <<>> <> <<= MACHINE CODE {zSLB, returnOffset};>> <<>> <> <<= TRUSTED INLINE {RETURN[link ~= UnboundLink AND link ~= NullLink]};>> <<>> <<>> <> <<>> <> <<= LOOPHOLE[GetReturnLink];>> <<>> <> <<= LOOPHOLE[SetReturnLink];>> <<>> <> <<= MACHINE CODE {zLADRB, 0};>> <<>> <> <<= TRUSTED INLINE {>> <> <= words THEN RETURN;>> <> <> <<};>> <<>> <> <<= TRUSTED INLINE {RETURN[FrameVec[fsi]]};>> <<>> <<>> <> <<>> <> <<= MACHINE CODE {zGADRB, 0};>> <<>> <> <<>> <> <<>> <<>> <> <<>> <> <<= INLINE { c: FrameCodeBase _ frame.code; c.out _ FALSE; RETURN[c.cseg] };>> <<>> <<>> <> <<>> <> <<= MACHINE CODE {zALLOC};>> <<>> <> <<= MACHINE CODE {zFREE};>> <> <> END.