@DATABASE "OS_DevKit Extension" @INDEX "os_index.guide/main" @AUTHOR "Fromentin BRICE & Jens Vang Petersen" @node MAIN "OS_DevKit, exec.library support" @toc "os_Documentation.guide/main" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Support Of 'exec.library'@{uu}@{ub} @{" Memory Control " link "MEMO"} @{" Libraries " link "LIBS"} @{" Message Ports " link "MESS"} @{" Nodes " link "NODE"} @{" Signals " link "SIGN"} @{" Interrupts " link "INTR"} @{" Tasks " link "TASK"} @endnode @node INTR "OS_DevKit, exec.library-Interrupts support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Support Of 'exec.library'@{uu}@{ub} @{b}@{u}Interrupts@{uu}@{ub} @{u}Using Interrupts:@{uu} @{" _int Alloc " Link "_int Alloc"} @{" _int Free " Link "_int Free"} @{" _int Add " Link "_int Add" } @{" _int Rem " Link "_int Rem" } @{" _int Set " Link "_int Set" } The interrupts are some parts of programs executed each asked event. eg: all the VBL. These programs are in assembler and must respect some rules that will be in the specialized books. @ENDNODE @NODE "_int Alloc" @toc "INTR" _int Alloc This function allocates some memory and initializes the interrupt. It sends back its pointer. INT=_int Alloc @ENDNODE @NODE "_int Free" @toc "INTR" _int Free This function liberates the interrupt of the memory. _int Free INT INT -> Pointer of Interrupt. @ENDNODE @NODE "_int Set" @toc "INTR" _int Set This function sets the datas of the interrupt. _int set INT,DATA,CODE INT -> Pointer of Interrupt. DATA -> Address of datas for the code. CODE -> Address of assembly code. @ENDNODE @NODE "_int Add" @toc "INTR" _int Add This function adds the interrupt to the system list and starts it. _int Add TYPE,INT TYPE -> Type of interrupt. INT -> Pointer of Interrupt. @ENDNODE @NODE "_int Rem" @toc "INTR" _int Rem This function withdraws the interrupt of the system list and stop it. _int Rem TYPE,INT TYPE -> Type of interrupt. INT -> Pointer of Interrupt. @ENDNODE @node MEMO "OS_DevKit, exec.library-Memory support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Support Of 'exec.library'@{uu}@{ub} @{b}@{u}Controling Memory@{uu}@{ub} @{u}Using Memory:@{uu} @{" _mem Alloc " Link "_mem Alloc"} @{" _mem Abs Alloc " Link "_mem Abs Alloc"} @{" _mem Free " Link "_mem Free"} @{" _vec Alloc " Link "_vec Alloc"} @{" _vec Free " Link "_vec Free"} @{u}Memory Commands:@{uu} @{" _mem Avail " Link "_mem Avail"} @{" _mem Copy " Link "_mem Copy"} @{" _mem Type " Link "_mem Type"} @ENDNODE @NODE "_mem Alloc" @toc "MEMO" _mem Alloc This function allocates a memory block of the size and of type asked. It sends back the address of the reserved block. MEMBLOCK=_mem Alloc(SIZE,REQUIREMENTS) SIZE -> Size in bytes. REQUIREMENTS -> Type of memory : 1 PUBLIC 2 CHIP 4 FAST $100 LOCAL $200 24BITDMA $400 KICK $10000 CLEAR $20000 LARGEST $40000 REVERSE $80000 TOTAL Example : - MEMBLOCK=_mem Alloc(1024,$10004) ~~~~~~~~~ Allocates 1024 bytes in Fast ($4) and CLEAR ($10000) @ENDNODE @NODE "_mem Free" @toc "MEMO" _mem Free This function renders the memory to the system. For it, it is necessary to specify the address of block obtained by @{" _mem Alloc " Link "_mem Alloc"} thus that the size. _mem Free MEMBLOCK,SIZE MEMBLOCK -> Address of block. SIZE -> Size of block. @ENDNODE @NODE "_mem Avail" @toc "MEMO" _mem Avail This function sends back the available memory according to the type asked. SIZE=_mem Avail(REQUIREMENTS) REQUIREMENTS -> Type of memory : 1 PUBLIC 2 CHIP 4 FAST $100 LOCAL $200 24BITDMA $400 KICK $10000 CLEAR $20000 LARGEST $40000 REVERSE $80000 TOTAL @ENDNODE @NODE "_mem Copy" @toc "MEMO" _mem Copy This function copies a portion memory toward an other site. _mem Copy SOURCEBLOCK,TARGETBLOCK,SIZE SOURCEBLOCK -> Source Address. TARGETBLOCK -> Target Address. SIZE -> Size to copy. @ENDNODE @NODE "_mem Abs Alloc" @toc "MEMO" _mem Abs Alloc This function tries to reserve a part of the memory starting from an absolute address. If the block is already used, a zero is turnup. BLOCK=_mem Abs Alloc(SIZE,ADDRESS) SIZE -> Size of the required block. ADDRESS -> Address of the block. @ENDNODE @NODE "_mem Type" @toc "MEMO" _mem Type This function sends back the type of memory of a certain block of memory. TYPE=_mem Type(ADDRESS) ADDRESS -> Address of block. @ENDNODE @NODE "_vec Alloc" @toc "MEMO" _vec Alloc This function allocates memory of the size and of type asked. It sends back the address of the reserved block. MEMBLOCK=_vec Alloc(SIZE,REQUIREMENTS) SIZE -> Size of the block. REQUIREMENTS -> Type of memory : 1 PUBLIC 2 CHIP 4 FAST $100 LOCAL $200 24BITDMA $400 KICK $10000 CLEAR $20000 LARGEST $40000 REVERSE $80000 TOTAL Example : - MEMBLOCK=_vec Alloc(1024,$10004) ~~~~~~~~~ Allocates 1024 bytes in Fast ($4) and CLEAR ($10000) @ENDNODE @NODE "_vec Free" @toc "MEMO" _vec Free This function renders the memory to the system. For it, it is necessary to specify the address of block obtained by @{" _vec Alloc " Link "_vec Alloc"}. _vec Free MEMBLOCK MEMBLOCK -> Address of block @ENDNODE @NODE UnDocs "Pas Documenté" Undocumented features ~~~~~~~~~~~~~~~~~~~~~ POOL=_pool Create(TYPE,BLOCKSIZE,MAXALLOCATION) _pool Free POOL MEMBLOCK=_pool Alloc(POOL,SIZE) _pool Free POOL,MEMBLOCK,SIZE @ENDNODE @node MESS "OS_DevKit, exec.library-MessagePorts support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Support Of 'exec.library'@{uu}@{ub} @{b}@{u}Message Ports@{uu}@{ub} A messages port is like a snail mail. So, one receives of mail therefore it is necessary to go to see if there is a message then take it and answer to it. @{u}Message Ports, General:@{uu} @{" _mem Alloc " Link "_mem Alloc"} @{" MsgPort Structure " Link "_port_struct"} @{" How To ? " Link "_port"} @{" _port Create " Link "_port Create"} @{" _port Delete " Link "_port Delete"} @{" _port Add " Link "_port Add"} @{" _port Rem " Link "_port Rem"} @{" _port Find " Link "_port Find"} @{" _port Wait " Link "_port Wait"} @{" _port What Sig Nb " Link "_port What Sig Nb"} @{" _port What Sig Task " Link "_port What Sig Task"} @{u}The messages themselves@{uu} @{" Message Structure " Link "_msg_struct"} @{" How To ? " Link "_msg"} @{" _msg Get " Link "_msg Get"} @{" _msg Reply " Link "_msg Reply"} @{" _msg Put " Link "_msg Put"} @{" _msg What Length " Link "_msg What Length"} @{u}The messages from GadTools@{uu} @{" How To ? " Link "_gmsg"} @{" _gmsg Get " Link "_gmsg Get"} @{" _gmsg Reply " Link "_gmsg Reply"} @{u}The messages from Intuition@{uu} @{"IntuiMessage Structure " Link "_imsg_struct"} @{" _imsg What Class " Link "_imsg What Class"} @{" _imsg What Code " Link "_imsg What Code"} @{" _imsg What Qualifier " Link "_imsg What Qualifier"} @{" _imsg What Item " Link "_imsg What Item"} @{" _imsg What X Mouse " Link "_imsg What X Mouse"} @{" _imsg What Y Mouse " Link "_imsg What Y Mouse"} @{" _imsg What Seconds " Link "_imsg What Seconds"} @{" _imsg What Micros " Link "_imsg What Micros"} @{" _imsg What Wnd " Link "_imsg What Wnd"} @ENDNODE @NODE "_port Add" @toc "MESS" _port Add This function adds a messages port to the system list of ports. _port Add PORT PORT -> Pointer of MsgPort. @ENDNODE @NODE "_port Rem" @toc "MESS" _port Rem This function removes a messages port from the system list of ports. _port Rem PORT PORT -> Pointer of MsgPort. @ENDNODE @NODE "_port Find" @toc "MESS" _port Find This function search a messages port among the list of prts of system by its name. PORT=_port Find(PTXT) PTXT -> Pointer of name string. @ENDNODE @NODE "_port Wait" @toc "MESS" _port Wait This function waits that a message is puts down in the messages port. It sends back the pointer of message. Note that if you want to process it, you must 'Get' it and after 'Reply'. MSG=_port Wait(PORT) PORT -> Pointer of MsgPort. @ENDNODE @NODE "_port Create" @toc "MESS" _port Create This function creates, initializes a messages port and sends back its pointer. PORT=_port Create PORT -> Pointer of MsgPort. @ENDNODE @NODE "_port Delete" @toc "MESS" _port Delete This function erases a messages port of the memory. _port Delete(PORT) PORT -> Pointer of MsgPort. @ENDNODE @NODE "_msg Get" @toc "MESS" _msg Get This function takes a message from the port and sends back its pointer. If the return is 0, then there is no simple message, but it's possible that GadTools'messages are here. So try to get too. MSG=_msg Get(PORT) PORT -> Pointer of MsgPort. @ENDNODE @NODE "_msg Reply" @toc "MESS" _msg Reply This function answers to a message. In fact, it returns the message to its attached reply-port. _msg Reply MSG MSG -> Pointer of Message. @ENDNODE @NODE "_msg Put" @toc "MESS" _msg Put This function puts down a message in a port. _msg Put(PORT,MSG) PORT -> Pointer of MsgPort. MSG -> Pointer of Message. @ENDNODE @NODE "_gmsg Get" @toc "MESS" _gmsg Get This function takes a message from the port and sends back its pointer, it manages the GADTOOLS messages. If the return is 0, then there is no GADTOOLS message in the port. MSG=_gmsg Get(PORT) PORT -> Pointer of MsgPort. @ENDNODE @NODE "_gmsg Reply" @toc "MESS" _gmsg Reply This function answers to a GADTOOLS message. _gmsg Reply MSG MSG -> Pointer of Message. @ENDNODE @NODE "_msg What Length" @toc "MESS" _msg What Length This function sends back the length of the datas of message in bytes. NB=_msg What Length(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_imsg What Class" @toc "MESS" _imsg What Class This function sends back the class of Intuition message, its IDCMP code. NB=_imsg What Class(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_imsg What Code" @toc "MESS" _imsg What Code This function sends back the code of Intuition message. This code is some special data that completes gadget returns, or menus. NB=_imsg What Code(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_imsg What Qualifier" @toc "MESS" _imsg What Qualifier This function sends back the qualifier of Intuition message. NB=_imsg What Qualifier(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_imsg What Item" @toc "MESS" _imsg What Item This function sends back the pointer of the concerned item. Most of the time, it will be the Gadget Pointer. ITEMPTR=_imsg What Item(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_imsg What X Mouse" @toc "MESS" _imsg What X Mouse This function sends back the abscissa of the mouse when the event came. X=_imsg What X Mouse(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_imsg What Y Mouse" @toc "MESS" _imsg What Y Mouse This function sends back the ordinate of the mouse when the event came. Y=_imsg What Y Mouse(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_imsg What Seconds" @toc "MESS" _imsg What Seconds This function sends back the seconds when the event came. S=_imsg What Seconds(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_imsg What Micros" @toc "MESS" _imsg What Micros This function sends back the micros second when the event came. M=_imsg What Micros(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_imsg What Wnd" @toc "MESS" _imsg What Wnd This function sends back the pointer of the window source of the event. WND=_imsg What Wnd(MSG) MSG -> Pointer of Message. @ENDNODE @NODE "_port What Sig Nb" @toc "MESS" _port What Sig Nb This function sends back the signal number allocated by the messages port. SIG=_port What Sig Nb(PRT) PORT -> Pointer of MsgPort. @ENDNODE @NODE "_port What Sig Task" @toc "MESS" _port What Sig Task This function sends back the pointer of the owner Task of signal of the messages port. TASK=_port What Sig Task(PRT) PORT -> Pointer of MsgPort. @ENDNODE @NODE _port "How to ?" @toc "MESS" How to ? To create and use the messages prots, here a little example : **************************** * MsgPort Creation * **************************** PRT=@{"_port Create" Link "_port create"} **************************** * Put the port PUBLIC * **************************** @{"_port Add PRT" Link "_port add"} **************************** * Use of the @{"Port" Link _msg} * **************************** **************************** * Remove the PUBLIC Port * **************************** @{"_port Rem PRT" Link "_port rem"} **************************** * Free Port * **************************** @{"_port Delete PRT" Link "_port Delete"} @ENDNODE @NODE _msg "How to ?" @toc "MESS" How to ? To manage the messages of one Port, Here the method YOU MUST DO: BOUCLE: **************************** * Get a message * **************************** MSG=@{"_msg Get(PRT)" Link "_msg get"} if MSG=0 : Goto FIN : End If **************************** * Process Message * **************************** L=@{"_msg What Length(MSG)" Link "_msg what length"} . . . **************************** * Reply to Message * **************************** @{"_msg Reply MSG" Link "_msg reply"} Goto BOUCLE FINGESTION: @ENDNODE @NODE _gmsg "How to ?" @toc "MESS" How to ? To manage the window's messages (VIA ITS PORT), YOU MUST DO LIKE THIS : BOUCLE: **************************** * Get a message * **************************** MSG=@{"_gmsg Get(PRT)" Link "_gmsg get"} if MSG=0 : Goto FIN : End If **************************** * Process Message * **************************** CLASS=@{"_imsg What Class(MSG)" Link "_imsg what class"} CODE=@{"_imsg What Code(MSG)" Link "_imsg what code"} ITEM=@{"_imsg What Item(MSG)" Link "_imsg what item"} . . . **************************** * Answer to Message * **************************** @{"_gmsg Reply MSG" Link "_gmsg reply"} Goto BOUCLE FINGESTION: @ENDNODE @NODE _port_struct "Structure MsgPort" @toc "MESS" Detail of the MsgPort structure. $0022 34 sizeof(MsgPort) $0000 0 14 mp_Node $000e 14 1 mp_Flags $000f 15 1 mp_SigBit $0010 16 4 mp_SigTask $0014 20 14 mp_MsgList @ENDNODE @NODE _msg_struct "Structure Message" @toc "MESS" Detail of the Message structure. $0014 20 Size of structure $0000 0 14 mn_Node $000e 14 4 mn_ReplyPort $0012 18 2 mn_Length @ENDNODE @NODE _imsg_struct "Structure IntuiMessage" @toc "MESS" Detail of the IntuiMessage structure. $0034 52 Size of structure $0000 0 20 ExecMessage $0014 20 4 Class $0018 24 2 Code $001a 26 2 Qualifier $001c 28 4 IAddress $0020 32 2 MouseX $0022 34 2 MouseY $0024 36 4 Seconds $0028 40 4 Micros $002c 44 4 IDCMPWindow $0030 48 4 SpecialLink @ENDNODE @DATABASE "Controle des Noeuds" @node NODE "OS_DevKit, exec.library-Nodes support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Support Of 'exec.library'@{uu}@{ub} @{b}@{u}Nodes@{uu}@{ub} Here again a subtlety of the OS, the nodes are the links of the chained lists of system. However, distrust with these last for it is not very flexible for the experimentations. @{u}The List Headers@{uu} @{" List Structure " Link _lnod_struct} @{" _lnod Alloc " Link "_lnod Alloc"} @{" _lnod Free " Link "_lnod Free"} @{" _lnod What Head " Link "_lnod What Head"} @{" _lnod Set Head " Link "_lnod Set Head"} @{" _lnod What Tail " Link "_lnod What Tail"} @{" _lnod Set Tail " Link "_lnod Set Tail"} @{" _lnod What Type " Link "_lnod What Type"} @{" _lnod Set Type " Link "_lnod Set Type"} @{u}The Nodes@{uu} @{" Node Structure " Link _nod_struct} @{" _nod Alloc " Link "_nod Alloc"} @{" _nod Free " Link "_nod Free"} @{" _nod Ins " Link "_nod Ins"} @{" _nod Rem " Link "_nod Rem"} @{" _nod H Add " Link "_nod H Add"} @{" _nod H Rem " Link "_nod H Rem"} @{" _nod T Add " Link "_nod T Add"} @{" _nod T Rem " Link "_nod T Rem"} @{" _nod Enqueue " Link "_nod Enqueue"} @{" _nod Find Name " Link "_nod Find Name"} @{" _nod What Start " Link "_nod What Start"} @{" _nod What Succ " Link "_nod What Succ"} @{" _nod Set Succ " Link "_nod Set Succ"} @{" _nod What Pred " Link "_nod What Pred"} @{" _nod Set Pred " Link "_nod Set Pred"} @{" _nod What Type " Link "_nod What Type"} @{" _nod Set Type " Link "_nod Set Type"} @{" _nod What Pri " Link "_nod What Pri"} @{" _nod Set Pri " Link "_nod Set Pri"} @{" _nod What Name " Link "_nod What Name"} @{" _nod Set Name " Link "_nod Set Name"} @ENDNODE @NODE "_lnod Set Head" @toc "NODE" _lnod Set Head This function sets the first Node of the List, in the header. _lnod Set Head LIST,NODE LIST -> Pointer of List Header. NODE -> Pointer of Node. @ENDNODE @NODE "_lnod Set Tail" @toc "NODE" _lnod Set Tail This function sets the last Node of the List, in the header. _lnod Set Tail LIST,NODE LIST -> Pointer of List Header. NODE -> Pointer of Node. @ENDNODE @NODE "_lnod Set Type" @toc "NODE" _lnod Set Type This function sets the type of the List. _lnod Set Type LIST,TYPE LIST -> Pointer of List Header. TYPE -> Type of list (0 to 255) @ENDNODE @NODE "_nod Set Succ" @toc "NODE" _nod Set Succ This function sets the following Node. _nod Set Succ NODE,NODE1 NODE -> Pointer of Node. NODE1 -> Pointer of following Node. @ENDNODE @NODE "_nod Set Pred" @toc "NODE" _nod Set Pred This function sets the previous Node. _nod Set Pred NODE,NODE1 NODE -> Pointer of Node. NODE -> Pointer of previous Node. @ENDNODE @NODE "_nod Set Type" @toc "NODE" _nod Set Type This function sets the type of Node. _nod Set Type NODE,TYPE NODE -> Pointer of Node. TYPE -> Type of Node (0 to 255) @ENDNODE @NODE "_nod Set Name" @toc "NODE" _nod Set Name This function sets the name of Node. _nod Set Name NODE,PTXT NODE -> Pointer of Node. PTXT -> Pointer of name string. @ENDNODE @NODE "_nod Set Pri" @toc "NODE" _nod Set Pri This function sets the priority of Node. _nod Set Pri NODE,PRI NODE -> Pointer of Node. PRI -> Priority (-127 to 128) @ENDNODE @NODE "_lnod Alloc" @toc "NODE" _lnod Alloc This function allocates a List Header and sends back its pointer. It initializes the list header, if a list header is empty then @{"_lnod What Tail" Link "_lnod What Tail"}(LIST) = LIST LIST=_lnod Alloc @ENDNODE @NODE "_lnod Free" @toc "NODE" _lnod Free This function liberates a List Header of the memory. _lnod Free LIST LIST -> Pointer of List Header. @ENDNODE @NODE "_nod Alloc" @toc "NODE" _nod Alloc This function allocates a node and sends back its pointer. NODE=_nod Alloc(SIZE) SIZE -> Size in bytes of the datas. @ENDNODE @NODE "_nod Free" @toc "NODE" _nod Free This function liberates a Node of the memory. _nod Free NODE NODE -> Pointer of Node. @ENDNODE @NODE "_nod Ins" @toc "NODE" _nod Ins This function inserts a Node in a List. _nod Ins LIST,NODE,NODE0 LIST -> Pointer of List Header. NODE -> Pointer of Node. NODE0 -> Pointer of Node that will become the previous one. @ENDNODE @NODE "_nod Rem" @toc "NODE" _nod Rem This function removes a Node of its List. _nod Rem NODE NODE -> Pointer of Node. @ENDNODE @NODE "_nod H Add" @toc "NODE" _nod H Add This function adds a Node in first position in a List. _nod H Add LIST,NODE LIST -> Pointer of List Header. NODE -> Pointer of Node. @ENDNODE @NODE "_nod H Rem" @toc "NODE" _nod H Rem This function removes the first Node of the List. _nod H Rem LIST LIST -> Pointer of List Header. @ENDNODE @NODE "_nod T Add" @toc "NODE" _nod T Add This function adds a Node in last position in a List. _nod T Add LIST,NODE LIST -> Pointer of List Header. NODE -> Pointer of Node. @ENDNODE @NODE "_nod T Rem" @toc "NODE" _nod T Rem This function removes the last Node of the List. _nod T Rem LIST LIST -> Pointer of List Header. @ENDNODE @NODE "_nod Enqueue" @toc "NODE" _nod Enqueue This function adds a Node in a List and sorts the Nodes according to their priorities. _nod Enqueue LIST,NODE LIST -> Pointer of List Header. NODE -> Pointer of Node. @ENDNODE @NODE "_nod Find Name" @toc "NODE" _nod Find Name This function looks for a Node in a List by its name. NODE=_nod Find Name(LIST,PTXT) LIST -> Pointer of List Header. PTXT -> Pointer of name String. @ENDNODE @NODE "_lnod What Head" @toc "NODE" _lnod What Head This function sends back the pointer of the first Node of the List. NODE=_lnod What Head(LIST) LIST -> Pointer of List Header. @ENDNODE @NODE "_lnod What Tail" @toc "NODE" _lnod What Tail This function sends back the pointer of the last Node of the List. NODE=_lnod What Tail(LIST) LIST -> Pointer of List Header. @ENDNODE @NODE "_lnod What Type" @toc "NODE" _lnod What Type This function sends back the type of the List. TYPE=_lnod What Type(LIST) LIST -> Pointer of List Header. @ENDNODE @NODE "_nod What Succ" @toc "NODE" _nod What Succ This function sends back the pointer of next Node of the List. NODE=_nod What Succ(NODE) NODE -> Pointer of Node. @ENDNODE @NODE "_nod What Pred" @toc "NODE" _nod What Pred This function sends back the pointer of previous Node of the List. NODE=_nod What Pred(NODE) NODE -> Pointer of Node. @ENDNODE @NODE "_nod What Type" @toc "NODE" _nod What Type This function sends back the type of Node. TYPE=_nod What Type(NODE) NODE -> Pointer of Node. @ENDNODE @NODE "_nod What Pri" @toc "NODE" _nod What Pri This function sends back the priority of Node. PRI=_nod What Pri(NODE) NODE -> Pointer of Node. @ENDNODE @NODE "_nod What Name" @toc "NODE" _nod What Name This function sends back the pointer of the Name of Node. PTXT=_nod What Name(NODE) NODE -> Pointer of Node. @ENDNODE @NODE "_nod What Start" @toc "NODE" _nod What Start This function sends back the start pointer of the datas of Node. PTR=_nod What Start(NODE) NODE -> Pointer of Node. @ENDNODE @NODE _lnod_struct "Structure List" @toc "NODE" Detail of the List structure. $000e 14 Size of structure. $0000 0 4 lh_Head $0004 4 4 lh_Tail $0008 8 4 lh_TailPred $000c 12 1 lh_Type $000d 13 1 l_pad @ENDNODE @NODE _nod_struct "Structure Node" @toc "NODE" Detail of the Node structure. $000e 14 Size of structure $0000 0 4 ln_Succ $0004 4 4 ln_Pred $0008 8 1 ln_Type $0009 9 1 ln_Pri $000a 10 4 ln_Name @ENDNODE @node SIGN "OS_DevKit, exec.library-Signals support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Support Of 'exec.library'@{uu}@{ub} @{b}@{u}Signals@{uu}@{ub} It is the signals whose allow to warn the tasks of various events, they have of it in all 32, which some used by the system. @{u}Commands@{uu} @{" _sig Alloc " Link "_sig Alloc"} @{" _sig Free " Link "_sig Free"} @{" _sig Set " Link "_sig Set"} @{" _sig Put " Link "_sig Put"} @{" _sig Wait " Link "_sig Wait"} @ENDNODE @NODE "_sig Alloc" @toc "SIGN" _sig Alloc This function allocates a signal for its personal use, it sends back the number allocated. A mistake is signalled by a return of -1. NBSIGNAL=_sig Alloc(NBSIGNAL) NBSIGNAL-> Signal Number to allocate (-1 Indifferent) @ENDNODE @NODE "_sig Free" @toc "SIGN" _sig Free This function liberates a previously allocated signal. _sig Free(NBSIGNAL) NBSIGNAL-> Signal Number to free. @ENDNODE @NODE "_sig Set" @toc "SIGN" _sig Set This function sets several signals and sends back the older. OLDSIGNALS=_sig Set(NEWSIG,MASK) NEWSIG -> New Signals. MASK -> Mask for signals selection. @ENDNODE @NODE "_sig Put" @toc "SIGN" _sig Put This function sends some signals to an other task. _sig Put TASK,SIG TASK -> Pointer of Task. SIG -> Signals. @ENDNODE @NODE "_sig Wait" @toc "SIGN" _sig Wait This function waits the arrival of signals, and sends back the signals received. SIGNAL=_sig Wait(MASK) MASK -> Mask of required signals. @ENDNODE @node TASK "OS_DevKit, exec.library-Tasks support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Support Of 'exec.library'@{uu}@{ub} @{b}@{u}Tasks@{uu}@{ub} I refuse me to present them. If you don't know what they represent, it is that you don't have an AMIGA Computer. @{u}Commands@{uu} @{" Task Structure " Link "_task_struct"} @{" _task Find " Link "_task Find"} @{" _task Set Pri " Link "_task Set Pri"} @ENDNODE @NODE "_task Find" @toc "TASK" _task Find Look for a task by its name, and sends back its pointer. If the name pointer is to 0 then, you obtain the pointer of your AMOS Task. TASK=_task Find(PTXT) PTXT -> Pointer of Name String. @ENDNODE @NODE "_task Set Pri" @toc "TASK" _task Set Pri Change the priority of the task, and sends back the older priority. OLDPRI=_task Set Pri(TASK,NEWPRI) TASK -> Pointer of Task. NEWPRI -> New priority (-127 to 128) @ENDNODE @NODE _task_struct "Structure Task" @toc "TASK" Detail of the Task structure. $005c 92 Size of structure $0000 0 14 tc_Node $000e 14 1 tc_Flags $000f 15 1 tc_State $0010 16 1 tc_IDNestCnt $0011 17 1 tc_TDNestCnt $0012 18 4 tc_SigAlloc $0016 22 4 tc_SigWait $001a 26 4 tc_SigRecvd $001e 30 4 tc_SigExcept $0022 34 2 tc_TrapAlloc $0024 36 2 tc_TrapAble $0026 38 4 tc_ExceptData $002a 42 4 tc_ExceptCode $002e 46 4 tc_TrapData $0032 50 4 tc_TrapCode $0036 54 4 tc_SPReg $003a 58 4 tc_SPLower $003e 62 4 tc_SPUpper $0042 66 4 tc_Switch $0046 70 4 tc_Launch $004a 74 14 tc_MemEntry $0058 88 4 tc_UserData @ENDNODE @node LIBS "OS_DevKit, exec.library-libraries support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Support Of 'exec.library'@{uu}@{ub} @{b}@{u}Libraries@{uu}@{ub} No, we're not talking about books, but procedures. Ordinary AMOS provides commands for accessing the Amiga system-libraries directly, and also any other public library. But they're limited to only 4 at the same time, they can easily be filled when using private boopsi classes, as they each act as a library. So Os-DevKit provides additional functions for getting in touch with libraries, the amount is limited by memory only.. @{u}Commands@{uu} @{" _lib Open " Link "_lib Open"} @{" _lib Close " Link "_lib Close"} @{" _dreg " Link "_dreg"} @{" _areg " Link "_areg"} @{" _lib Call " Link "_lib Call"} @endnode @node "_lib Open" @toc "LIBS" LIB=@{b}_lib Open@{ub}(NAME$,VERSION) LIB = Pointer of library (0 if not found, or to old).. NAME$ = Name of the library to open.. (!!! Case sensitive !!!) VER = The oldest version to accept @ENDNODE @node "_lib Close" @toc "LIBS" @{b}_lib Close@{ub} LIB LIB = Pointer of library to close.. @ENDNODE @node "_dreg" @toc "LIBS" D=@{b}_dreg@{ub}(REG)=D D = Value REG = Processor DATA-register (0-7 are valid) Use this to pass/return values when calling libraries.. @ENDNODE @node "_areg" @toc "LIBS" D=@{b}_areg@{ub}(REG)=D D = Value REG = Processor ADDRESS-register.. (0-5 are valid, 6-7 exists but may not be touched..) Use this to pass/return values when calling libraries.. @ENDNODE @node "_lib Call" @toc "LIBS" R=@{b}_lib Call@{ub}(LIB,OFF) R = Value in D0 after the call LIB = Pointer to library you wish to use.. OFF = Offset to function in library to call.. @ENDNODE