-
Notifications
You must be signed in to change notification settings - Fork 0
JamesJanuszka/BinaryTree
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Binarytree 0.8a This is a beta of my Binary tree library, it is a collection of subroutines for the creation and manipulating of binary trees for the DCPU-16. This is just a beta it is still missing a subroutine to prune nodes from the tree. -------------------------------------------- Tree Specification -------------------------------------------- Each node is 32 words long. The first three words are pointers, the next 28 words are data, and the last word is 0x0000. null = 0xFFFF, this must be stored as a definition in your program somewhere, and eg :fill must be a variable #define null 0xFFFF :fill DAT 0x001C -------------------------------------------- EOT: Points to the next availble memory location after tree data. Parent: Points to the memory location of the Parent node. LC: Memory location of left child node. RC: Memory location of Right child node. -------------------------------------------- Node Structure -------------------------------------------- Root Node: EOT, LC, RC, Data(28), 0x0000 Branch Node: Parent, LC, RC, Data(28), 0x0000 Leaf node: Parent, NULL, NULL, Data(28), 0x0000 -------------------------------------------- Upcoming features in 1.0 Complete rewrite of fuctions, mainly merging the New Tree and AddNode functions, and change the way nodes are selected, ie not needing to reference them by memory loaction. Modifying the Root node to not point to EOT. Creating to header words, one to point to the root node, another to act as the EOT pointer Subroutine for the deletion of nodes. Pre-order traversal function. Removal of the 28 word data limit. Instead of the FillData routine filling the node with 0xFFFF, it will accept data from a buffer. Change log 0.8a Corrected some remarks in the code
About
Binary Tree Utility for the DCPU-16
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published