Camen Design Forum

Kroc's Work Log


This function is such drudgery! I haven't been able to do much in the last week. The Abstract Syntax Tree is now generated with the nodes linked together. I need to write more error messages and carefully check that all the possible validity checks are being made.

Once this is done I will flesh out the RAM Page feature explained a couple of posts up as the Sonic 1 code is not assembling with the correct RAM addresses at the moment.

I had a nice idea for handling appending to data tables, something that is very necessary in assembly and useful for making extensible code. For my needs, I would like all the mobs (enemies and interactive objects) in Sonic 1 insert their required code and table-entries (across the code-base) only when that mob's file is included, allowing fully dynamic inclusion and ordering of mobs.

An elegant way of handling this dynamic inclusion would be to define a table initially deft of data:

% OZ80
TABLE :pointers SECTION ::mobs

And then allow us to append a row of data to this table anywhere in the code-base:

% OZ80
ROW :pointers SECTION ::mobs {
WORD :sonic

This would also make row indexing and enumeration easier and more implicit too.


(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn