Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Any simpler way to get "next register" programatically?

A topic by Josh Goebel created Sep 19, 2022 Views: 218 Replies: 7
Viewing posts 1 to 4

Here is what I have now:

:macro assert_equal_16 REGPAIR VALUE {
	:calc hi { ( VALUE & 0xFF00 ) >> 8 }
	:calc low { VALUE & 0xFF }
	if REGPAIR != hi begin
		test-fail
		return
	end
	# rewrite REGPAIR to REGPAIR + 1
	:calc here { HERE + 8 }
	i := here 
	load vF - vF
	vF += 0x01
	save vF - vF
	if REGPAIR != low begin
		test-fail
		return
	end
}

I dunno how to find the address before I get there, and I don’t think I can use a label because I’m inside a macro and that would generate duplicates?

HostSubmitted

':alias' takes an optional expression, which can be used to compute a register by index. Consider, for example,

:alias first  v5
:alias second { first + 1 } # equivalent to v6
first  := 0xAA
second := 0xBB
Submitted

I have a question. WHY DID YOU DELETE MY OCTOJAM9 SUBMISSION

HostSubmitted (1 edit)

Your submission was inappropriate for the jam and clearly neither created during October nor targeting CHIP-8. If you continue to spam, you will be reported and banned.

Submitted

oh sorry geez i was making a creepy game for Halloween and i didn't know it was for chip-8 games I'm sorry

Submitted

i don't get it. where ever i go people attack me 

OMG, so much nicer! I thought it’d be here somewhere!