This document attempts to make accessible to modern programmers the wonderful coding tricks invented at MIT in the late 60's/early 70's. It corresponds to the ` Programming Hacks ' section of PROGRAMMING HACKS Note the examples have been re-ordered to give the most C-like ones first: ITEM 155 (Liknaitzky): w (here two 16 bit values in an unsigned32) to subtract the ls half from the ms half just do: w = w * 0xffff0001; ITEM 161 (Gosper): Original swapped the contents of two memory locations without using a work register using EXCHANGE reg,mem only.
Read full article from HAKMEMC -- HAKMEM Programming hacks in C (NOT proof-read)
No comments:
Post a Comment