Re: SFML2 Demo Dilema

new topic     » goto parent     » topic index » view thread      » older message » newer message
Shian_Lee said...

But long time ago, when memory was very limited, I had to create my own efficient data type in BASIC. So I've created a very short library with about 5 functions, that accepts a string argument, start_bit argument, and end_bit argument, for example:

data = "xyz"

data string was treated by my library simply as 24 bits (3 bytes * 8 bits).
if start_bit,end_bit arguments were, for example 6,12 then my library returned an integer of 7 bits (bits 6,7,8,9,10,11,12), which actually started at the first byte ('x') and ended at the second byte ('y').

This library was very short and efficient, using only a fast bit manipulation code.

In this way I could store in a string of any length, as many variables as I needed, including single bits, nibbles, integers, floating points (in IEEE format), other strings, actually any type of variable that exists on earth.

Creating such library is very easy, you need only few utility functions to create, modify, retrieve, and even search for specific data within a string (string in this case is treated at the bit level of course).

I don't know how complex is your C struct. But with that library I did magics, in memory and on disk.



Again, old friend, GMTA (great minds think alike)
It was exactly the way I created an extensive database once for keeping track of info
that had to be shared between programs that ran under MSDos,
simulating multi-tasking by having small parts of each program as TSR's
however, I did it in 8086 asm at the same time Win3.11 was conceived by Steve Jobs

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu