Created
April 26, 2011 13:13
-
-
Save dector/942232 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
link l1:ct | |
accept r9: 0 \ R9:R10 <- Z | |
accept r10: 0 | |
\ ---------- CONFIG BEGINS -----------\ | |
accept r6: 2h \ R6 <- X | |
accept r7: 0fffeh \ R7:R8 <- 0.Y | |
\ ---------- CONFIG ENDS -------------\ | |
accept r8: 0 \!!! ALWAYS NULL | |
{add srl, r7, z;} | |
{add sr.9, r8, z;} | |
iter {and nil, r6, 8000h; load rm, flags;} \ Check first bit | |
{cjp rm_z, var1;} \ If it is not 1 | |
{add r10, r8; load rm, flags;} \ Count sum | |
{add r9, r7, rm_c;} | |
var1 {add sll, r6, z;} \ Shift other registers | |
{add srl, r7, z;} | |
{add sr.9, r8, z;} | |
{or r6, r6; load rm, flags;} \ Check multipiyer emptynes | |
{cjp not rm_z, iter;} \ If it's not 0 - count next iteration | |
{} \ End of counting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment