0 Members and 2 Guests are viewing this topic.
{Pointer}±e^(7-Bit#)→{Pointer}
{Pointer} xor %0000 0100will write the third bit to one. just replace the 1 with whichever bit you're trying to write, and convert the binary into a decmal number. remember, if you're writing a bit to a two-byte area, you need to use the plot-style token instead of xor.
Quote from: nemo on November 08, 2010, 03:35:56 pm{Pointer} xor %0000 0100will write the third bit to one. just replace the 1 with whichever bit you're trying to write, and convert the binary into a decmal number. remember, if you're writing a bit to a two-byte area, you need to use the plot-style token instead of xor.Actually, xor will flip the 3rd bit back and forth. If the 3rd bit equals zero, xor will make the 3rd bit equal to 1. If it's 1, xor will make the 3rd bit equal to zero.Try using {Pointer} and %11111011 to make the 3rd bit equal to zero, for example. Try using {Pointer} or %00000100 to make the 3rd bit equal to one.
Lbl SET{} or sub(BIT)Lbl SR2→{r₂}ReturnLbl RES{} and (sub(BIT) xor ᴇFF)Goto SR2Lbl BITe^(7-r₁)Return
Oh cool, thanks. So I'm guessing that the lack of an argument inside the {} is because it is taking HL as its argument, which is 'pointer' because when you store pointer to r2 it is stored to HL....like ans....kk i'm learning Does every Axe operation leave stuff in HL?
Wait!? DJ, you don't know ASM!?!? I've only been at it 2 weeks and I have almost completely remade Hexpipc (again, but this time it's only 500 bytes). Seriously though, I thought you (being the founder of this forum) would know ASM.