Hi Evan, Thank you for including my contribution in the Demonstration_Sources repository and for your other extensive involvement in the GCB project. It is always a pleasure for me to be able to make a small contribution from time to time. Regards
And if a variable determines the number of rounds, then it’s better to do it like this: wordvariable = 1 Do while ByteVariable > 0 STATUS.C = 0 Rotate wordvariable Left Loop In this case, '0' is also possible. Using LSLF saves you one instruction within the loop. But you're right—that’s not BASIC, of course.
How about this: Sub ShiftLeft(WordVariable, ByteVariable) Do while ByteVariable > 0 LSLF WordVariable RLF WordVariable_h Loop End Sub
Sorry for jumping into your discussion here, but I’m reading about "Rotate variable Left Simple": "... so the MSB of the variable fills the LSB of the variable on Rotate Left or the LSB fills the MSB on Rotate Right. " And I’m reading about "FnLSL(BitsIn, NumBits)": FnLSL (Logical Shift Left) performs a bitwise left shift. It returns BitsIn shifted left by NumBits places, equivalent to the C operation: BitsOut = BitsIn << NumBits This is not equivalent. In only a few cases will it be possible to...
Hello Roger, Yes, that works for me too. Thanks for your quick help. Regards Ralf
Hello, While compiling a file, I noticed the following: The command WordVariable = FnLSL(0x01, (13 - ByteVariable)) always sets WordVariable_h to 0, even when bit 12 should be set. I implemented a workaround by changing it to: WordVariable = FnLSL(0x8001, (13 - ByteVariable)) This ensures that bit 12 is set correctly. I don't know if there is another way to tell GCB that the first parameter of 'FnLSL' is a Word constant. I couldn't find one. Fortunately, bit 15 is not currently being used. Ultimately,...
Hello, Because they will be easier to maintain, I will probably translate all my old assembler programs that I am currently still using into GCB. This will now also be done with a control unit for an audio amplifier. As this system also incorporates an RC5 decoder, I looked for existing templates but found very little that was directly usable. In short: From what I found, I cobbled together these two, in my opinion, useful programs (attached). Best regards Ralf