{"id":426532,"date":"2024-07-17T21:00:37","date_gmt":"2024-07-17T21:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=426532"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=426532","title":{"rendered":"<span>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0437\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435:\u00a0\u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043e\u0431 \u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 \u043c\u043d\u043e\u0439 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 wend. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043c\u044b \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0432\u0435\u0445\u0438: \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u043a\u043e\u0434, \u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439. <\/p>\n<p>\u041d\u0443 \u0430 \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443: \u043a\u0430\u043a \u0441\u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 and-not-xor-or \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445.<\/p>\n<p>\u042d\u0442\u043e \u0443\u0436\u0435 \u0448\u0435\u0441\u0442\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043d\u0430\u0434\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438, \u0442\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439.<\/p>\n<h3>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u0430<\/h3>\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/786158\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0438 \u043d\u0430\u0438\u0432\u043d\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440 \u0432 \u043f\u0438\u0442\u043e\u043d<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/787800\/\" rel=\"noopener noreferrer nofollow\">\u041b\u0435\u043a\u0441\u0435\u0440\/\u043f\u0430\u0440\u0441\u0435\u0440<\/a><\/p>\n<p>2&#8242;. <a href=\"https:\/\/habr.com\/ru\/articles\/787442\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0301\u043a\u043b\u044f\u0442\u044b\u0439 \u043e\u0433\u043e\u043d\u044c, \u0438\u043b\u0438 \u043c\u0430\u0433\u0438\u044f \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 C<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/789310\/\" rel=\"noopener noreferrer nofollow\">\u0422\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/793524\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0442\u0435\u043a \u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440 \u0432 \u043f\u0438\u0442\u043e\u043d \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 <\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/829314\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440 \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440<\/strong><\/a><strong> (\u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f)<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u043e\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439: \u043f\u0438\u0448\u0435\u043c \u043b\u0435\u043a\u0441\u0435\u0440 \u0438 \u043f\u0430\u0440\u0441\u0435\u0440 \u0441\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440?<\/p>\n<\/li>\n<li>\n<p>\u0421\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430?<\/p>\n<\/li>\n<\/ol>\n<p>\u0420\u0430\u0431\u043e\u0442\u0443 \u0441\u043e \u0441\u0442\u0435\u043a\u043e\u043c \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435, \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u043d\u0438\u0447\u0435\u0433\u043e. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u043a\u043e\u0434, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u043c\u0443 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u043c\u0443. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f &#8212; \u044d\u0442\u043e \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0436\u0435 \u0440\u0435\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0433\u043e\u0442\u043e\u0432\u043e. <\/p>\n<h2>Hello world, \u0438\u043b\u0438 \u0432\u044b\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u044d\u043a\u0440\u0430\u043d<\/h2>\n<p>\u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u0445 \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 MIPS, \u043d\u043e \u043c\u043d\u0435 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435\u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u043b, \u0438 \u0432\u044b\u0431\u0440\u0430\u043b x86 GNU \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440, \u0431\u043b\u0430\u0433\u043e, \u043e\u043d \u0438\u0434\u0451\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 gcc. \u041d\u0435 \u043c\u043e\u0433\u0443 \u0442\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443, \u043d\u043e \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043c\u043d\u0435 32-\u0431\u0438\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0438 \u043a \u0447\u0435\u043c\u0443 \u0431\u044b\u0442\u044c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u043c \u0433\u0443\u0440\u0443, \u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0443\u0440\u043e\u0432\u043d\u044f \u0445\u0435\u043b\u043b\u043e\u0432\u043e\u0440\u043b\u0434 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0434\u043e \u0443\u043c\u0435\u0442\u044c. <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b helloworld.s \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code class=\"assembly\">.global _start         .data hello: .ascii \"hello world\\n\"         hello_len = . - hello         .align 2         .text _start:         movl $4, %eax         # sys_write system call (check asm\/unistd_32.h for the table)         movl $1, %ebx         # file descriptor (stdout)         movl $hello, %ecx     # message to write         movl $hello_len, %edx # message length         int  $0x80            # make system call  _end:         movl $1, %eax   # sys_exit system call         movl $0, %ebx   # error code 0         int $0x80       # make system call <\/code><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 as \u0438 ld \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">as --march=i386 --32 -o helloworld.o helloworld.s &amp;&amp; ld -m elf_i386 helloworld.o -o helloworld &amp;&amp; .\/helloworld<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u043e\u0448\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u043e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043a\u0440\u0430\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0440\u0434\u043e\u0435 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0436\u0435 \u0442\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0410 \u0442\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430 &#8212; sys_write \u0438 sys_exit. \u041d\u0430 \u0441\u044f\u0445 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">#include &lt;sys\/syscall.h> #include &lt;unistd.h>  int main(void) {         syscall(SYS_write, 1, \"hello world\\n\", 12);         return 0; }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0432\u0451\u0437\u0434\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u0439\u0434\u0443\u0442\u0441\u044f, \u0442\u043e gcc \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043d\u0443\u0436\u0434 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, write \u0438 exit \u043d\u0430\u043c \u0445\u0432\u0430\u0442\u0438\u0442 \u0437\u0430 \u0433\u043b\u0430\u0437\u0430, \u0432\u0435\u0434\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c \u0432 wend &#8212; \u044d\u0442\u043e \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<p>Wend \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0440\u043e\u0432\u043d\u043e \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e hello world. \u0414\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0432\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 true \u0438 false. \u0410 \u0447\u0442\u043e \u0441 \u0447\u0438\u0441\u043b\u0430\u043c\u0438? \u0410 \u0432\u043e\u0442 \u0442\u0443\u0442 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u042f \u043b\u0435\u043d\u0442\u044f\u0439, \u0438 \u043c\u043d\u0435 \u043d\u0435\u043e\u0445\u043e\u0442\u0430 \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u043e\u0439 glibc \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u043e\u0441\u043a\u043e\u0448\u044c printf \u043c\u043d\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u041d\u0443 \u0438 \u043b\u0430\u0434\u043d\u043e, \u043c\u044b \u0438 \u0441 sys_write \u0443\u043f\u0440\u0430\u0432\u0438\u043c\u0441\u044f \ud83d\ude42<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b<\/h2>\n<p>sys_write \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430 (\u0443 \u043c\u0435\u043d\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 32-\u0431\u0438\u0442\u043d\u044b\u0435) \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0437\u0430\u043a\u0430\u0442\u0430\u043b \u0440\u0443\u043a\u0430\u0432\u0430 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e print_int32:<\/p>\n<pre><code class=\"assembly\">.global _start         .data         .align 2         .text _start:         pushl $-729         call print_int32         addl $4, %esp _end:         movl $1, %eax   # sys_exit system call         movl $0, %ebx   # error code 0         int $0x80       # make system call  print_int32:         movl 4(%esp), %eax  # the number to print         cdq         xorl %edx, %eax         subl %edx, %eax     # abs(%eax)         pushl $10           # base 10         movl %esp, %ecx     # buffer for the string to print         subl $16, %esp      # max 10 digits for a 32-bit number (keep %esp dword-aligned) 0:      xorl %edx, %edx     #     %edx = 0         divl 16(%esp)       #     %eax = %edx:%eax\/10 ; %edx = %edx:%eax % 10         decl %ecx           #     allocate one more digit         addb $48, %dl       #     %edx += '0'       # 0,0,0,0,0,0,0,0,0,0,'1','2','3','4','5','6'         movb %dl, (%ecx)    #     store the digit   # ^                   ^                    ^         test %eax, %eax     #                       # %esp                %ecx (after)         %ecx (before)         jnz 0b              # until %eax==0         #                     &lt;----- %edx = 6 ----->         cmp %eax, 24(%esp)  # if the number is negative                            |         jge 0f              #                                                      |         decl %ecx           # allocate one more character                          |         movb $45, 0(%ecx)   # '-'                                                  | 0:      movl $4, %eax       # write system call                                    |         movl $1, %ebx       # stdout                                               |         leal 16(%esp), %edx # the buffer to print                                  |         subl %ecx, %edx     # number of digits    &lt;--------------------------------\u2518         int $0x80           # make system call         addl $20, %esp      # deallocate the buffer         ret<\/code><\/pre>\n<p>\u0427\u0443\u0436\u043e\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442 \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">def print_int32(n):     buffer = [ None ]*16 # output string buffer     ecx = 0              # number of characters stored in the buffer      eax = abs(n)     while True:         edx = eax %  10         eax = eax \/\/ 10         buffer[ecx] = chr(edx + ord('0'))         ecx += 1         if eax == 0: break      if n&lt;0:         buffer[ecx] = '-'         ecx += 1      print(''.join(buffer[ecx-1::-1]))   print_int32(-729)<\/code><\/pre>\n<p>Write \u044f \u0431\u0443\u0434\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u0431\u0443\u0444\u0435\u0440. 32-\u0431\u0438\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 11 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u044b\u0434\u0435\u043b\u044f\u044e 16 \u043f\u043e\u0434 \u0431\u0443\u0444\u0435\u0440 (\u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0435\u043a \u0431\u044b\u043b \u0432\u044b\u0440\u043e\u0432\u043d\u0435\u043d \u043f\u043e \u043a\u0440\u0430\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430). \u0417\u0430\u0442\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u043c\u043e\u0434\u0443\u043b\u044c \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u0440\u0438\u043a\u043b\u0435\u0438\u0432\u0430\u044e \u043c\u0438\u043d\u0443\u0441, \u0435\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u0431\u044b\u043b\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u0445\u0438\u0442\u0440\u043e\u0439 \u0433\u0438\u043c\u043d\u0430\u0441\u0442\u0438\u043a\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0447\u0438\u0441\u043b\u0430, \u0438, \u0447\u0442\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e, \u0431\u0435\u0437 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0441 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c 32-\u0431\u0438\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 libc \u043d\u0430 64-\u0431\u0438\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0410 \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 print \u043d\u0430\u0448\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u043d\u043e \u0438 \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438. GDB \u044d\u0442\u043e \u0434\u043b\u044f \u0441\u043b\u0430\u0431\u044b\u0445 \u0434\u0443\u0445\u043e\u043c, \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0433\u0434\u0435 \u043d\u0438 \u043f\u043e\u043f\u0430\u0434\u044f &#8212; \u044d\u0442\u043e \u043d\u0430\u0448\u0435 \u0432\u0441\u0451 \ud83d\ude09<\/p>\n<h2>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435<\/h2>\n<p>\u041d\u0443, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u0432\u0441\u0451. \u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0435\u0440\u0451\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u043e\u0433\u043e <code>print()<\/code> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <code>call print_int32<\/code>, \u0432\u043c\u0435\u0441\u0442\u043e <code>eax = eax * ebx<\/code> \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <code>imull %ebx, %eax<\/code>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043b\u0430\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0435, \u0438 \u0434\u0435\u043b\u043e \u0432 \u0448\u043b\u044f\u043f\u0435! \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0435\u0439 \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c, \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432. \u041c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c <a href=\"https:\/\/github.com\/ssloy\/tinycompiler\/releases\/tag\/v0.0.5\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043b\u0438\u0437 v0.0.5<\/a> \u0438 \u0441 \u043d\u0438\u043c \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c.<\/p>\n<h2>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 wend! \u041f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u043b\u0438 \u0437\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0432\u0448\u0438\u043c, \u0442\u043e \u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u0438\u0437 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0443 \u043c\u0435\u043d\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 32-\u0431\u0438\u0442\u043d\u044b\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0438 \u043d\u0430\u0434 \u043d\u0438\u043c\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0410 \u044f \u0447\u0442\u043e, \u0440\u044b\u0436\u0438\u0439? \u042f \u0442\u043e\u0436\u0435 \u043c\u043e\u0433\u0443 \ud83d\ude42<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u0435, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432 \u043c\u043e\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044f \u0436\u0435\u043b\u0435\u0437\u043d\u043e \u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0447\u0438\u0441\u043b\u0430 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u0438 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 undefined behavior \u043f\u0440\u0438 \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u0445 \ud83d\ude42<\/p>\n<h2>AND<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 &#171;\u0438&#187; \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438. \u042f, \u043d\u0435\u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u044f, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0443\u0441\u043a\u0430\u044e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043f\u043e 31 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u043c\u0443\u0441\u044f \u0431\u0438\u0442\u0443:<\/p>\n<pre><code class=\"cpp\">\/\/            _   _ _____ \/\/      \/\\   | \\ | |  __ \\ \/\/     \/  \\  |  \\| | |  | | \/\/    \/ \/\\ \\ | . ` | |  | | \/\/   \/ ____ \\| |\\  | |__| | \/\/  \/_\/    \\_\\_| \\_|_____\/      fun and(a:int, b:int) : int {         var result:int;         var pow:int;          result = 0;         if (a&lt;0 &amp;&amp; b&lt;0) {             result = -2147483648;         }         if (a&lt;0) {             a = a + 2147483648;         }         if (b&lt;0) {             b = b + 2147483648;         }         pow = 1;         while a>0 || b>0 {             if a % 2 == 1 &amp;&amp; b % 2 == 1 {                 result = result + pow;             }             a = a \/ 2;             b = b \/ 2;             pow = pow * 2;         }         return result;     }<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u0432\u0435\u0441\u044c\u043c\u0430 \u0434\u0443\u0431\u043e\u0432\u044b\u0439, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u044f\u0449\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u0441 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u043c\u0443!<\/p>\n<h2>NOT<\/h2>\n<p>\u041f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 &#171;\u043d\u0435&#187; \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0449\u0435:<\/p>\n<pre><code class=\"cpp\">\/\/   _   _  ____ _______ \/\/  | \\ | |\/ __ \\__   __| \/\/  |  \\| | |  | | | | \/\/  | . ` | |  | | | | \/\/  | |\\  | |__| | | | \/\/  |_| \\_|\\____\/  |_|      fun not(a:int) : int {         return -1 - a;     } <\/code><\/pre>\n<h2>XOR \u0438 OR<\/h2>\n<p>\u041d\u0443 \u0430 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 &#171;\u0438&#187; \u0438 &#171;\u043d\u0435&#187; \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0442\u043e &#171;\u0438\u043b\u0438&#187; \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"cpp\">\/\/  __   ______  _____ \/\/  \\ \\ \/ \/ __ \\|  __ \\ \/\/   \\ V \/ |  | | |__) | \/\/    > &lt;| |  | |  _  \/ \/\/   \/ . \\ |__| | | \\ \\ \/\/  \/_\/ \\_\\____\/|_|  \\_\\      fun xor(a:int, b:int) : int {         return a - and(a,b) +  b - and(a,b);     }  \/\/    ____  _____ \/\/   \/ __ \\|  __ \\ \/\/  | |  | | |__) | \/\/  | |  | |  _  \/ \/\/  | |__| | | \\ \\ \/\/   \\____\/|_|  \\_\\      fun or(a:int, b:int) : int {         return xor(xor(a,b),and(a,b));     } <\/code><\/pre>\n<h2>\u0422\u0435\u0441\u0442<\/h2>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c <a href=\"https:\/\/github.com\/ssloy\/tinycompiler\/blob\/5251bfd148a2ea7ffe59ed3e5bc2d0d378a09f76\/test-data\/bitwise.wend\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442<\/a> \u043d\u0430 \u0437\u0430\u0431\u043e\u0442\u043b\u0438\u0432\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u0441\u043c\u043e\u0442\u0440\u0438-\u043a\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442!<\/p>\n<pre><code>     bitwise and     -1804289383      1681692777      1957747793      -719885386       596516649      1025202362       783368690     -2044897763      -1804289383     -1804289383        70555657       338728977     -1810617712          268809       336599192        70254736     -2079059431       1681692777        70555657      1681692777      1680906305      1142163488       537663529       605558824       607125600        68947977       1957747793       338728977      1680906305      1957747793      1410353168       545266689       873486352       615530576        68178961       -719885386     -1810617712      1142163488      1410353168      -719885386        17173280       353585330        68239794     -2078981612        596516649          268809       537663529       545266689        17173280       596516649       554309672       578814240        34346505       1025202362       336599192       605558824       873486352       353585330       554309672      1025202362       739328178        68767768        783368690        70254736       607125600       615530576        68239794       578814240       739328178       783368690       101793808      -2044897763     -2079059431        68947977        68178961     -2078981612        34346505        68767768       101793808     -2044897763        bitwise or     -1804289383      1681692777      1957747793      -719885386       596516649      1025202362       783368690     -2044897763      -1804289383     -1804289383      -193152263      -185270567      -713557057     -1208041543     -1115686213     -1091175429     -1770127715       1681692777      -193152263      1681692777      1958534265      -180356097      1740545897      2101336315      1857935867      -432152963       1957747793      -185270567      1958534265      1957747793      -172490761      2008997753      2109463803      2125585907      -155328931       -719885386      -713557057      -180356097      -172490761      -719885386      -140542017       -48268354        -4756490      -685801537        596516649     -1208041543      1740545897      2008997753      -140542017       596516649      1067409339       801071099     -1482727619       1025202362     -1115686213      2101336315      2109463803       -48268354      1067409339      1025202362      1069242874     -1088463169        783368690     -1091175429      1857935867      2125585907        -4756490       801071099      1069242874       783368690     -1363322881      -2044897763     -1770127715      -432152963      -155328931      -685801537     -1482727619     -1088463169     -1363322881     -2044897763       bitwise xor     -1804289383      1681692777      1957747793      -719885386       596516649      1025202362       783368690     -2044897763      -1804289383               0      -263707920      -523999544      1097060655     -1208310352     -1452285405     -1161430165       308931716       1681692777      -263707920               0       277627960     -1322519585      1202882368      1495777491      1250810267      -501100940       1957747793      -523999544       277627960               0     -1582843929      1463731064      1235977451      1510055331      -223507892       -719885386      1097060655     -1322519585     -1582843929               0      -157715297      -401853684       -72996284      1393180075        596516649     -1208310352      1202882368      1463731064      -157715297               0       513099667       222256859     -1517074124       1025202362     -1452285405      1495777491      1235977451      -401853684       513099667               0       329914696     -1157230937        783368690     -1161430165      1250810267      1510055331       -72996284       222256859       329914696               0     -1465116689      -2044897763       308931716      -501100940      -223507892      1393180075     -1517074124     -1157230937     -1465116689               0                       -1804289383      1681692777      1957747793      -719885386       596516649      1025202362       783368690     -2044897763      bitwise not      1804289382     -1681692778     -1957747794       719885385      -596516650     -1025202363      -783368691      2044897762<\/code><\/pre>\n<h2>\u041f\u043e\u0434\u0432\u043e\u0434\u0438\u043c \u0438\u0442\u043e\u0433\u0438<\/h2>\n<p>\u041f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430: \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 x86 gnu \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u044f \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 sly, \u043d\u043e \u043f\u043e \u043f\u0443\u0442\u0438 \u043c\u0435\u043d\u044f \u0441\u043b\u0435\u0433\u043a\u0430 \u0437\u0430\u043d\u0435\u0441\u043b\u043e, \u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e. \u0410 \u0437\u0430\u043e\u0434\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0443 \u044f\u0437\u044b\u043a\u0430 \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e!<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0435\u043a\u0441\u0435\u0440 \u0438 \u043f\u0430\u0440\u0441\u0435\u0440, <a href=\"https:\/\/github.com\/ssloy\/tinycompiler\" rel=\"noopener noreferrer nofollow\">\u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0443\u0436\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a>.<\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0442\u043e\u043c&#8230; \u0415\u0441\u0442\u044c \u0443 \u043c\u0435\u043d\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0435 (\u044f \u043d\u0435\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0441\u0432\u0430\u0440\u0449\u0438\u043a, \u044f \u043c\u0430\u0441\u043a\u0443 \u043d\u0430\u0448\u0451\u043b!), \u0447\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0442\u043e\u043c. \u042f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0438 \u0437\u0430\u043e\u0434\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044f \u0432\u044b\u0431\u0435\u0440\u0443 LLVM IR, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 LLVM, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e <strong>\u0431\u0435\u0437<\/strong> LLVM. \u0411\u044e\u0434\u0436\u0435\u0442\u0430 \u043d\u0430 &#171;\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0439&#187; (\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f) \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u044f \u0441\u0435\u0431\u0435 \u043e\u0442\u0432\u0435\u0434\u0443 \u0432 \u0440\u0430\u0439\u043e\u043d\u0435 \u043f\u044f\u0442\u0438\u0441\u043e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \ud83d\ude42<\/p>\n<p>Stay tuned, have fun!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/829314\/\"> https:\/\/habr.com\/ru\/articles\/829314\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043e\u0431 \u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 \u043c\u043d\u043e\u0439 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 wend. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043c\u044b \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0432\u0435\u0445\u0438: \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u043a\u043e\u0434, \u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439. <\/p>\n<p>\u041d\u0443 \u0430 \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443: \u043a\u0430\u043a \u0441\u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 and-not-xor-or \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445.<\/p>\n<p>\u042d\u0442\u043e \u0443\u0436\u0435 \u0448\u0435\u0441\u0442\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043d\u0430\u0434\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438, \u0442\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439.<\/p>\n<h3>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u0430<\/h3>\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/786158\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0438 \u043d\u0430\u0438\u0432\u043d\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440 \u0432 \u043f\u0438\u0442\u043e\u043d<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/787800\/\" rel=\"noopener noreferrer nofollow\">\u041b\u0435\u043a\u0441\u0435\u0440\/\u043f\u0430\u0440\u0441\u0435\u0440<\/a><\/p>\n<p>2&#8242;. <a href=\"https:\/\/habr.com\/ru\/articles\/787442\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0301\u043a\u043b\u044f\u0442\u044b\u0439 \u043e\u0433\u043e\u043d\u044c, \u0438\u043b\u0438 \u043c\u0430\u0433\u0438\u044f \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 C<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/789310\/\" rel=\"noopener noreferrer nofollow\">\u0422\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/793524\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0442\u0435\u043a \u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440 \u0432 \u043f\u0438\u0442\u043e\u043d \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 <\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/829314\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440 \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440<\/strong><\/a><strong> (\u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f)<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u043e\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439: \u043f\u0438\u0448\u0435\u043c \u043b\u0435\u043a\u0441\u0435\u0440 \u0438 \u043f\u0430\u0440\u0441\u0435\u0440 \u0441\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440?<\/p>\n<\/li>\n<li>\n<p>\u0421\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430?<\/p>\n<\/li>\n<\/ol>\n<p>\u0420\u0430\u0431\u043e\u0442\u0443 \u0441\u043e \u0441\u0442\u0435\u043a\u043e\u043c \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435, \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u043d\u0438\u0447\u0435\u0433\u043e. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u043a\u043e\u0434, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u043c\u0443 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u043c\u0443. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f &#8212; \u044d\u0442\u043e \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0436\u0435 \u0440\u0435\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0433\u043e\u0442\u043e\u0432\u043e. <\/p>\n<h2>Hello world, \u0438\u043b\u0438 \u0432\u044b\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u044d\u043a\u0440\u0430\u043d<\/h2>\n<p>\u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u0445 \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 MIPS, \u043d\u043e \u043c\u043d\u0435 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435\u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u043b, \u0438 \u0432\u044b\u0431\u0440\u0430\u043b x86 GNU \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440, \u0431\u043b\u0430\u0433\u043e, \u043e\u043d \u0438\u0434\u0451\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 gcc. \u041d\u0435 \u043c\u043e\u0433\u0443 \u0442\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443, \u043d\u043e \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043c\u043d\u0435 32-\u0431\u0438\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0438 \u043a \u0447\u0435\u043c\u0443 \u0431\u044b\u0442\u044c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u043c \u0433\u0443\u0440\u0443, \u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0443\u0440\u043e\u0432\u043d\u044f \u0445\u0435\u043b\u043b\u043e\u0432\u043e\u0440\u043b\u0434 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0434\u043e \u0443\u043c\u0435\u0442\u044c. <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b helloworld.s \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code class=\"assembly\">.global _start         .data hello: .ascii \"hello world\\n\"         hello_len = . - hello         .align 2         .text _start:         movl $4, %eax         # sys_write system call (check asm\/unistd_32.h for the table)         movl $1, %ebx         # file descriptor (stdout)         movl $hello, %ecx     # message to write         movl $hello_len, %edx # message length         int  $0x80            # make system call  _end:         movl $1, %eax   # sys_exit system call         movl $0, %ebx   # error code 0         int $0x80       # make system call <\/code><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 as \u0438 ld \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">as --march=i386 --32 -o helloworld.o helloworld.s &amp;&amp; ld -m elf_i386 helloworld.o -o helloworld &amp;&amp; .\/helloworld<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u043e\u0448\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u043e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043a\u0440\u0430\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0440\u0434\u043e\u0435 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0436\u0435 \u0442\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0410 \u0442\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430 &#8212; sys_write \u0438 sys_exit. \u041d\u0430 \u0441\u044f\u0445 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">#include &lt;sys\/syscall.h> #include &lt;unistd.h>  int main(void) {         syscall(SYS_write, 1, \"hello world\\n\", 12);         return 0; }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0432\u0451\u0437\u0434\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u0439\u0434\u0443\u0442\u0441\u044f, \u0442\u043e gcc \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043d\u0443\u0436\u0434 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, write \u0438 exit \u043d\u0430\u043c \u0445\u0432\u0430\u0442\u0438\u0442 \u0437\u0430 \u0433\u043b\u0430\u0437\u0430, \u0432\u0435\u0434\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c \u0432 wend &#8212; \u044d\u0442\u043e \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<p>Wend \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0440\u043e\u0432\u043d\u043e \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e hello world. \u0414\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0432\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 true \u0438 false. \u0410 \u0447\u0442\u043e \u0441 \u0447\u0438\u0441\u043b\u0430\u043c\u0438? \u0410 \u0432\u043e\u0442 \u0442\u0443\u0442 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u042f \u043b\u0435\u043d\u0442\u044f\u0439, \u0438 \u043c\u043d\u0435 \u043d\u0435\u043e\u0445\u043e\u0442\u0430 \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u043e\u0439 glibc \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u043e\u0441\u043a\u043e\u0448\u044c printf \u043c\u043d\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u041d\u0443 \u0438 \u043b\u0430\u0434\u043d\u043e, \u043c\u044b \u0438 \u0441 sys_write \u0443\u043f\u0440\u0430\u0432\u0438\u043c\u0441\u044f \ud83d\ude42<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b<\/h2>\n<p>sys_write \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430 (\u0443 \u043c\u0435\u043d\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 32-\u0431\u0438\u0442\u043d\u044b\u0435) \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0437\u0430\u043a\u0430\u0442\u0430\u043b \u0440\u0443\u043a\u0430\u0432\u0430 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e print_int32:<\/p>\n<pre><code class=\"assembly\">.global _start         .data         .align 2         .text _start:         pushl $-729         call print_int32         addl $4, %esp _end:         movl $1, %eax   # sys_exit system call         movl $0, %ebx   # error code 0         int $0x80       # make system call  print_int32:         movl 4(%esp), %eax  # the number to print         cdq         xorl %edx, %eax         subl %edx, %eax     # abs(%eax)         pushl $10           # base 10         movl %esp, %ecx     # buffer for the string to print         subl $16, %esp      # max 10 digits for a 32-bit number (keep %esp dword-aligned) 0:      xorl %edx, %edx     #     %edx = 0         divl 16(%esp)       #     %eax = %edx:%eax\/10 ; %edx = %edx:%eax % 10         decl %ecx           #     allocate one more digit         addb $48, %dl       #     %edx += '0'       # 0,0,0,0,0,0,0,0,0,0,'1','2','3','4','5','6'         movb %dl, (%ecx)    #     store the digit   # ^                   ^                    ^         test %eax, %eax     #                       # %esp                %ecx (after)         %ecx (before)         jnz 0b              # until %eax==0         #                     &lt;----- %edx = 6 ----->         cmp %eax, 24(%esp)  # if the number is negative                            |         jge 0f              #                                                      |         decl %ecx           # allocate one more character                          |         movb $45, 0(%ecx)   # '-'                                                  | 0:      movl $4, %eax       # write system call                                    |         movl $1, %ebx       # stdout                                               |         leal 16(%esp), %edx # the buffer to print                                  |         subl %ecx, %edx     # number of digits    &lt;--------------------------------\u2518         int $0x80           # make system call         addl $20, %esp      # deallocate the buffer         ret<\/code><\/pre>\n<p>\u0427\u0443\u0436\u043e\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442 \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">def print_int32(n):     buffer = [ None ]*16 # output string buffer     ecx = 0              # number of characters stored in the buffer      eax = abs(n)     while True:         edx = eax %  10         eax = eax \/\/ 10         buffer[ecx] = chr(edx + ord('0'))         ecx += 1         if eax == 0: break      if n&lt;0:         buffer[ecx] = '-'         ecx += 1      print(''.join(buffer[ecx-1::-1]))   print_int32(-729)<\/code><\/pre>\n<p>Write \u044f \u0431\u0443\u0434\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u0431\u0443\u0444\u0435\u0440. 32-\u0431\u0438\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 11 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u044b\u0434\u0435\u043b\u044f\u044e 16 \u043f\u043e\u0434 \u0431\u0443\u0444\u0435\u0440 (\u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0435\u043a \u0431\u044b\u043b \u0432\u044b\u0440\u043e\u0432\u043d\u0435\u043d \u043f\u043e \u043a\u0440\u0430\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430). \u0417\u0430\u0442\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u043c\u043e\u0434\u0443\u043b\u044c \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u0440\u0438\u043a\u043b\u0435\u0438\u0432\u0430\u044e \u043c\u0438\u043d\u0443\u0441, \u0435\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u0431\u044b\u043b\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u0445\u0438\u0442\u0440\u043e\u0439 \u0433\u0438\u043c\u043d\u0430\u0441\u0442\u0438\u043a\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0447\u0438\u0441\u043b\u0430, \u0438, \u0447\u0442\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e, \u0431\u0435\u0437 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0441 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c 32-\u0431\u0438\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 libc \u043d\u0430 64-\u0431\u0438\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0410 \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 print \u043d\u0430\u0448\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u043d\u043e \u0438 \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438. GDB \u044d\u0442\u043e \u0434\u043b\u044f \u0441\u043b\u0430\u0431\u044b\u0445 \u0434\u0443\u0445\u043e\u043c, \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0433\u0434\u0435 \u043d\u0438 \u043f\u043e\u043f\u0430\u0434\u044f &#8212; \u044d\u0442\u043e \u043d\u0430\u0448\u0435 \u0432\u0441\u0451 \ud83d\ude09<\/p>\n<h2>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435<\/h2>\n<p>\u041d\u0443, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u0432\u0441\u0451. \u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0435\u0440\u0451\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u043e\u0433\u043e <code>print()<\/code> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <code>call print_int32<\/code>, \u0432\u043c\u0435\u0441\u0442\u043e <code>eax = eax * ebx<\/code> \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <code>imull %ebx, %eax<\/code>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043b\u0430\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0435, \u0438 \u0434\u0435\u043b\u043e \u0432 \u0448\u043b\u044f\u043f\u0435! \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0435\u0439 \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c, \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432. \u041c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c <a href=\"https:\/\/github.com\/ssloy\/tinycompiler\/releases\/tag\/v0.0.5\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043b\u0438\u0437 v0.0.5<\/a> \u0438 \u0441 \u043d\u0438\u043c \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c.<\/p>\n<h2>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 wend! \u041f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u043b\u0438 \u0437\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0432\u0448\u0438\u043c, \u0442\u043e \u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u0438\u0437 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0443 \u043c\u0435\u043d\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 32-\u0431\u0438\u0442\u043d\u044b\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0438 \u043d\u0430\u0434 \u043d\u0438\u043c\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0410 \u044f \u0447\u0442\u043e, \u0440\u044b\u0436\u0438\u0439? \u042f \u0442\u043e\u0436\u0435 \u043c\u043e\u0433\u0443 \ud83d\ude42<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u0435, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432 \u043c\u043e\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044f \u0436\u0435\u043b\u0435\u0437\u043d\u043e \u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0447\u0438\u0441\u043b\u0430 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u0438 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 undefined behavior \u043f\u0440\u0438 \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u0445 \ud83d\ude42<\/p>\n<h2>AND<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 &#171;\u0438&#187; \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438. \u042f, \u043d\u0435\u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u044f, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0443\u0441\u043a\u0430\u044e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043f\u043e 31 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u043c\u0443\u0441\u044f \u0431\u0438\u0442\u0443:<\/p>\n<pre><code class=\"cpp\">\/\/            _   _ _____ \/\/      \/\\   | \\ | |  __ \\ \/\/     \/  \\  |  \\| | |  | | \/\/    \/ \/\\ \\ | . ` | |  | | \/\/   \/ ____ \\| |\\  | |__| | \/\/  \/_\/    \\_\\_| \\_|_____\/      fun and(a:int, b:int) : int {         var result:int;         var pow:int;          result = 0;         if (a&lt;0 &amp;&amp; b&lt;0) {             result = -2147483648;         }         if (a&lt;0) {             a = a + 2147483648;         }         if (b&lt;0) {             b = b + 2147483648;         }         pow = 1;         while a>0 || b>0 {             if a % 2 == 1 &amp;&amp; b % 2 == 1 {                 result = result + pow;             }             a = a \/ 2;             b = b \/ 2;             pow = pow * 2;         }         return result;     }<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u0432\u0435\u0441\u044c\u043c\u0430 \u0434\u0443\u0431\u043e\u0432\u044b\u0439, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u044f\u0449\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u0441 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u043c\u0443!<\/p>\n<h2>NOT<\/h2>\n<p>\u041f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 &#171;\u043d\u0435&#187; \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0449\u0435:<\/p>\n<pre><code class=\"cpp\">\/\/   _   _  ____ _______ \/\/  | \\ | |\/ __ \\__   __| \/\/  |  \\| | |  | | | | \/\/  | . ` | |  | | | | \/\/  | |\\  | |__| | | | \/\/  |_| \\_|\\____\/  |_|      fun not(a:int) : int {         return -1 - a;     } <\/code><\/pre>\n<h2>XOR \u0438 OR<\/h2>\n<p>\u041d\u0443 \u0430 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 &#171;\u0438&#187; \u0438 &#171;\u043d\u0435&#187; \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0442\u043e &#171;\u0438\u043b\u0438&#187; \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"cpp\">\/\/  __   ______  _____ \/\/  \\ \\ \/ \/ __ \\|  __ \\ \/\/   \\ V \/ |  | | |__) | \/\/    > &lt;| |  | |  _  \/ \/\/   \/ . \\ |__| | | \\ \\ \/\/  \/_\/ \\_\\____\/|_|  \\_\\      fun xor(a:int, b:int) : int {         return a - and(a,b) +  b - and(a,b);     }  \/\/    ____  _____ \/\/   \/ __ \\|  __ \\ \/\/  | |  | | |__) | \/\/  | |  | |  _  \/ \/\/  | |__| | | \\ \\ \/\/   \\____\/|_|  \\_\\      fun or(a:int, b:int) : int {         return xor(xor(a,b),and(a,b));     } <\/code><\/pre>\n<h2>\u0422\u0435\u0441\u0442<\/h2>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c <a href=\"https:\/\/github.com\/ssloy\/tinycompiler\/blob\/5251bfd148a2ea7ffe59ed3e5bc2d0d378a09f76\/test-data\/bitwise.wend\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442<\/a> \u043d\u0430 <\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-426532","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/426532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=426532"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/426532\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=426532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=426532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=426532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}