Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Well done!

For the comment about writing bytes by hand, is that different from just negating a character value (i.e. ".data -'0'")?

(1 edit) (+1)

If I use subleq, I would have to use the value range 0-255, and so instead, I write the bytes in the .data directive to use the - sign so it’s slightly easier to understand. By writing the bytes ‘by hand’ in the .data directive, I also have to handle the jumps, which are normally handled by the assembler.

Example:

subleq @OUT 2 -‘0’ isn’t allowed, but you can subtract from 256
subleq @OUT 2 208 is what it will be, but it’s less expressive
So,
@prog: .data @OUT, 2, -‘0’ is the best choice in my opinion