0 Members and 1 Guest are viewing this topic.
And yes, executing interrupts at exact frequencies is a pain in Axe.
How long does Pause 1 actually last?
For(N)End
Also to search : http://megapowers.net/v/search.htmForum search is completely disabled because of lag. It was really slow anyway.
If you're interested in on-calc assembly coding, probably the best tool for that is Mimas.
If you want to pause for a very small, precise amount of time, I would suggest something like the following:Code: [Select]For(N)EndThis block of code just executes an empty loop N times, and it will do so at about 13 cycles per iteration.
Quote from: Runer112 on April 07, 2013, 12:24:04 pmIf you want to pause for a very small, precise amount of time, I would suggest something like the following:Code: [Select]For(N)EndThis block of code just executes an empty loop N times, and it will do so at about 13 cycles per iteration.Does the push bc \ pop bc get auto-optimized or something?
.Deletes the bullet at index r₁ (0-indexed).Updates bullet total NLbl DelCopy(N--*6+<list_start>,r₁*6+<list_start>,6)Return
There's a pretty ingenious (at least I thought so when I learned it years ago) way to handle this. Keep track of the total number of bullets with some variable. When you add a bullet, increase the bullet total and put the new bullet at the end of the list of bullets, which should be at the memory location old_total*6+list_start. This all probably seems pretty standard. But the trick is in bullet removal: decrease the bullet total and move the data for the last bullet in the list into the position of the bullet that was just removed. In Axe, the code for that might look something like this:Code: [Select].Deletes the bullet at index r₁ (0-indexed).Updates bullet total NLbl DelCopy(N--*6+<list_start>,r₁*6+<list_start>,6)Return
For(I,0,18)Pt-On(X,Y,Pic00+I)End