I've begun work on a new, masterful, project. I won't say much, partially because I'm feeling cryptic, and also because this project could easily become vaporware, so I'll give you a little snippet of some utility code. Enjoy speculating.

Code:

mAlloc:
   push hl
   ld a,1
   call peekAllocStack
   add hl,de
   pop bc
   push bc
   add hl,bc
   ld de,(varsLowEnd)
   call cpHLDE
   jr c,malloc_memgood
malloc_memfull:
   ld hl,malloc_memfullmsg
   jp errorReport
malloc_memfullmsg:
   .db "Unable to",newline
   .db "allocate memory.",0
malloc_memgood:
   or a
   sbc hl,bc
   pop de
   call pushAllocStack
   push hl
   pop iy
   ret
either a malloc library for assembly, or a new language that will have a malloc library Wink
Malloc Arrow Question
Harq wrote:
Malloc Arrow Question


memory allocation, keeps track of and assigns memory for dynamic variables.
Obviously a C compiler, lolz.
KermMartian wrote:
Obviously a C compiler, 0x5.


...or any compiler that allows for memory allocation Razz (which would be... letsee.... a vast majority of them? Very Happy )
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement