0 Members and 3 Guests are viewing this topic.
Asm(HEX): Native assembly code written in hexadecimal is inserted at the current position.
I can't see any point to using rotation instructions since you don't have control on the carry flag anyway.
-.- Yes, and this removed bit goes in the carry flag.Quote from: Matrefeytontias on January 22, 2014, 01:17:14 pmI can't see any point to using rotation instructions since you don't have control on the carry flag anyway.
;Left rotate HL circular, cheap method ld a,L add hl,hl rla ld L,a;Right rotate HL circular ld a,h rr h rr L rra ld h,a
ld a,lrrarr hrr l
By "add them together", do you mean the arithmetic operation "add" or the combining of the two binary strings (concatenate) ? From what you're saying, you want each to be rotated individually in the absence of each other? If that's the case, then you'll want something completely different than what we've supplied.What is it that you're trying to accomplish?
.A23114->A. Seed 1584->B.Seed 246931->C.Seed 3For(E,0,8)ClrHomeA->Dsub(ROT).D is input, W is outputW->AB->Dsub(ROT)W->BC->Dsub(ROT)W->CDisp A>Dec,[i],B>Dec,[i],C>DecPause 10400EndReturnLbl ROT(D and 255)->U.Getting the first 8 bits(D and 65280)->V.Getting the last 8 bits(2*U) or (U/e^(7))->W(2*V) or (V/e^(15))+W->WReturn
(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