my tildelog

a blog about tildes

Vacation on Black Sea

August 24, 2022 — ~danignat

I was away for three weeks and did nothing useful for work :) I just had fun on my vacation, with family and friends. All my projects were put on pause and I almost forgot what I had to do and what I wanted to do… Worst of everything, my plant dried up and died. I just harvest it and planted a new seed. Hope to have a longer life :)

Anyway, my vacation was very good; I went for scuba diving at Black Sea, in Romania and Bulgaria. I was lucky; it was great visibity underwater and I saw a lot of stuff. I even thought to make a site with the ecosystem of the litoral zone in our area, because there isn’t much information online about it.

Well, that’s it, it was fun, but now I’m back to work…

tags: vacation, black-sea, scuba-diving

Pointers in BBC BASIC (on RISC OS)

June 07, 2022 — ~danignat

I finally managed to get it working… so this is a quick note to myself, in case I forgot. I intend to use it mainly to get some kind of structures working, since BBC BASIC on RISC OS doesn’t have structs (unlike windows version…). Basically will reserve a zone of memory and divide it according the needs. Maybe (surely) exists a better method, but this is how I thought it right now.

For example, let’s say we want to reserve a zone of memory in which we’ll store an integer and a pointer to a string. Thus, we’ll need 32 bit for the integer (4 bytes) and another 4 bytes for the pointer. [I have yet to check the size of the pointer var, but I think 4 bytes is ok]

So, we’ll reserve 2 bytes of memory for this mememory block. Also we reserve 10 bytes for a string of 10 chars.

DIM mb% 7 -> bytes 0 through 7
DIM sb% 9

Now we’ll allocate values:

!mb% = 1234
$sb% = "Chars str."

The ! is used for integers indirection and $ for string indirection (also for bytes indirection). !mb% references the first byte in memory block, which is an integer represented on 32 bits. $sb% references the starting address of the string [$(sb%+1) references the second byte = the second character of the string and so on]

Now, on the second byte of our memory block we’ll put the address of the string:

!(mb%+4) = sb%

For testing the results, we’ll have to display something on the screen:

PRINT "At address ";mb%;" we have an integer: ";!mb%
PRINT "At address ";mb%+4;" we have the string address: ";!(mb%+4)
PRINT "At address ";\!(mb%+4);" we have the string: ";%(!(mb%+4))

All seems ok now; will try to experiment more and find some more info about the subject.

Note: For floating point indirection, the ‘|’ symbol is used. For BBC BASIC V, 5 bytes are used and for BBC BASIC VI, 8 bytes are used.

tags: RISC-OS, programming, pointers

Blogging, C

May 16, 2022 — ~danignat

Well, I still don’t know what I could use a blog for; I’ll just write some things that crossed my mind… And I just relized I don’t know how to use Markdown text, so I’ll go search for a quick cheat-sheet or something.

…. Searching …..

Found it!

It doesn’t seem very complicated, but I never used it. It is quite nice :)

Anyway, I was thinking today about C programming and why it isn’t used very much today. I used it a little when I was in school; I made some projects back then, on my 486 computer and I liked it a lot. Now I’m trying to resuscitate an old laptop using FreeDOS (but that is another story; maybe I’ll write about it) and I just want to write some C programs.

As I don’t remember it very well, I searched the net and I found a lot of resources, but most of them, if not all, are at a very beginner level. Or there are some videos on youtube or other sites, but same level, again. I didn'fine anything at intermediate-advanced level…

But I found the second edition of Kernighan & Ritchie book - The C Programming Language and I’ll give it a try. I’m also thinking to retry The Art of Computer Programming, but that’s a huge task :)

I also want to try some cgi stuff in C; I made today some very simple things to see if it’s working, right here, on tilde.team server. It is good. So, it seems I’ll have some days/weeks of fun with C. Wish me luck :)

tags: bla-bla, C

Just testing…

May 12, 2022 — ~danignat

Never made a blog; maybe I’ll try to write something when I’ll be in the mood :)

The rest of the text file is a Markdown blog post. The process will continue as soon as you exit your editor.

tags: keep-this-tag-format, tags-are-optional, beware-with-underscores-in-markdown, example