Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Depends on the assembly and depends on the loop. x86 has multiple instructions that hint at knowing about loops: e.g. the `loop` instruction that does a decrement and jump, and the rep prefixes that let you implement memcpyish functions in a single instruction.


Fair point. The higher level languages have been leaking back down into assembly.


For a very long time, even PDP7, on which C was created, with ISZ – Increment the memory operand and Skip next instruction if result is Zero.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: