0 Members and 1 Guest are viewing this topic.
Quote from: SamTebbs33 on January 23, 2014, 02:45:52 am(D and 255)->U.Getting the first 8 bits(D and 65280)->V.Getting the last 8 bitsI fear those don't work since "and" is a 8-bit operation IIRC. To do a 16-bit operation you need the "." (which is somewhere in Catalog, not the "." you'd put between 3.14). But since you want to take the 8 first bits and the 8 last bits, you can also do {°D} and {°D+1}.Quote from: SamTebbs33 on January 23, 2014, 02:45:52 amI have some axe code that works on my calculator (below), but it doesn't function the same in SC3 on Cemetech.netThat doesn't really surprise me. SC3 is pretty new and SC2 didn't support Axe. I suggest you to use TokenIDE instead.
(D and 255)->U.Getting the first 8 bits(D and 65280)->V.Getting the last 8 bits
I have some axe code that works on my calculator (below), but it doesn't function the same in SC3 on Cemetech.net
Asm(2930012C)In assembly: add hl,hl jr nc,$+3 inc l
Asm(7C07CB05856F2600CB14) ld a,h rlca rlc l add a,l ld l,a ld h,0 rl h
Asm(CB04CB05) rlc h rlc l
;abcdefghijklmnop->pabcdefghijklmnoAsm(7C0FCB1DCB1C) ld a,h rrca rr l rr h
;abcdefghijklmnop->habcdefg+pijklmnoAsm(7C0FCB0D856F2600CB14) ld a,h rrca rrc l add a,l ld l,a ld h,0 rl h
;abcdefghijklmnop->habcdefgpijklmnoAsm(CB0CCB0D) rrc h rrc l
:A:Asm(STUFF):->A
Oh no, I meant how would I send the numbers to the asm routine :p sorry for not being clear.For example, would I set A to the number to rotate?
Just put them in HL (Axe's Ans) - that is usually the last value you worked with. Just write the expression (or the single varibale) in the line before the routine. The same way (with the sto-> operator) you can retrieve the value returned by the routine.Code: [Select]:A:Asm(STUFF):->A