Algorithms that can only be written in the assembly

Any algorithm that you can implement in HLL that you can implement in an assembly. On the other hand, there are many algorithms that you can implement in an assembly that cannot be implemented in HLL. - Randall Hyde

I found this expression in the forefront of the assembly book. The book is here: https://courses.engr.illinois.edu/ece390/books/artofasm/fwd/fwd.html#109

Does anyone know an example of this type of algorithm?

+4
source share
4 answers

, : HLL, . , HLL .

, HLL (, , , , ), XOR . XOR, / , ( ). , node XOR, , .

HLL , ( ) goto. , , , , ( - ), , .

, , HLL, popcnt lzcnt, , .

+2

.

( CS ) turing.

, - : " , , , ", ...

, ....

+1

/ , .

, , .

. , . , .

0

How about this ? You need to write assembly code to access system registers and tables. But after the configuration is completed, no CPU instructions are executed (everything is done by complex processor exception handling mechanisms), and yet the matter is Turing-complete and can "run" programs.

0
source

Source: https://habr.com/ru/post/1617839/


All Articles