Linked by Thom Holwerda on Wed 3rd Apr 2013 21:45 UTC
Apple "Thanks to 35-year-old documents that have recently surfaced after three-plus decades in storage, we now know exactly how Apple navigated around that obstacle to create the company's first disk operating system. In more than a literal sense, it is also the untold story of how Apple booted up. From contracts - signed by both Wozniak and Jobs - to design specs to page after page of schematics and code, CNET had a chance to examine this document trove, housed at the DigiBarn computer museum in California's Santa Cruz Mountains, which shed important new light on those formative years at Apple."
Permalink for comment 557643
To read all comments associated with this story, please click here.
RE[2]: Not me
by Alfman on Thu 4th Apr 2013 19:09 UTC in reply to "RE: Not me "
Member since:

Here's another attempt at combining operations and using one less register. Anyone else give it a shot?

mov rax, A ; input
mov rbx, B ; input
xor rdx, rdx ; output

xor rcx, rcx
rcr rax ; isolate lsb into carry flag
sbc rcx, 0 ; rcx = 0 - carry = 0, 0xffff
and rcx, rbx ; rcx = 0 , rbx
add rdx, rcx ; add in
shl rbx, 1
jnz .next

; rdx = A * B

Depending on the typical values passed in, one might test whether rax=0 at each iteration and exit early when it is. The additional test might nevertheless save extraneous loop cycles.

Edited 2013-04-04 19:14 UTC

Reply Parent Score: 2