{"id":459568,"date":"2025-05-14T09:07:00","date_gmt":"2025-05-14T09:07:00","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=459568"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=459568","title":{"rendered":"<span>\u041d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434 8086 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0445, \u0447\u0430\u0441\u0442\u044c 2<\/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<h2>\u0414\u043b\u0438\u043d\u043d\u043e\u0435 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0423\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u043d\u0435 \u0441 \u0437\u0430\u043f\u0430\u0445\u0430 \u043a\u043e\u0444\u0435, \u0430 \u0441 <a href=\"https:\/\/ozhegov.textologia.ru\/definit\/naftalin\/?q=742&amp;n=188628\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u043f\u0430\u0445\u0430 \u043d\u0430\u0444\u0442\u0430\u043b\u0438\u043d\u0430<\/a>, \u0442\u043e\u043b\u0441\u0442\u044b\u043c \u0441\u043b\u043e\u0435\u043c \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043c\u0438\u043a\u0440\u043e\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u044d\u043f\u043e\u0445\u0438 \u043a\u043e\u043d\u0446\u0430 1970-\u0445 \u0433\u043e\u0434\u043e\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0437\u043d\u0430\u043c\u0435\u043d\u0438\u0442\u043e\u0439 \u043f\u043b\u0435\u044f\u0434\u0435 \u0442\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u0430, \u043a\u0430\u043a  <a href=\"https:\/\/en.wikipedia.org\/wiki\/Zilog_Z80\" rel=\"noopener noreferrer nofollow\">Zilog Z80<\/a>, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Motorola_68000\" rel=\"noopener noreferrer nofollow\">Motorola 68000<\/a>, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Intel_8086\" rel=\"noopener noreferrer nofollow\">Intel 8086<\/a>. \u0412\u0441\u0435 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u044b \u0441 \u0440\u0430\u0437\u043d\u0438\u0446\u0435\u0439 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0433\u043e\u0434\u0430 \u0434\u0432\u0430-\u0442\u0440\u0438, \u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0440\u043e\u0432\u0435\u0441\u043d\u0438\u043a\u0430\u043c\u0438.<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/users\/AGalilov\/articles\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/a> \u0443\u0434\u043e\u0441\u0442\u043e\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441\u0442\u0430\u0440\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0447\u0442\u043e \u043d\u0435\u043c\u0430\u043b\u043e \u0443\u0434\u0438\u0432\u043b\u044f\u0435\u0442: 16-\u0431\u0438\u0442\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 8086 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f x86-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c\u0438 CPU. \u0412 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, Z80 \u0438 \u0435\u0433\u043e \u043a\u043b\u043e\u043d\u044b \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432 \u0441\u0432\u043e\u0451\u043c \u043f\u0435\u0440\u0432\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u043d\u043e \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u043b\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Z80 \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c\u0438. \u041f\u043e\u0441\u0435\u043c\u0443, \u0430\u0432\u0442\u043e\u0440 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u0443\u044e, \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e, \u0447\u0430\u0441\u0442\u044c \u043f\u043e 8086.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0435\u0441\u043b\u0438 \u0437\u0432\u0451\u0437\u0434\u044b \u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0438 \u0441\u043e\u0439\u0434\u0443\u0442\u0441\u044f \u043c\u0435\u0436 \u0441\u043e\u0431\u043e\u0439, \u0431\u0443\u0434\u0443\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0430\u0437\u043d\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 amd64. 32-\u0431\u0438\u0442\u043d\u044b\u0435 \u0438 64-\u0431\u0438\u0442\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b x86 &#171;\u0440\u0430\u0441\u0442\u0443\u0442&#187; \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u0433\u043e 16-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430, \u0437\u043d\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u043c.<\/p>\n<h2>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/h2>\n<p>\u041d\u0430\u0441 \u0436\u0434\u0451\u0442 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u041c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0446\u0438\u043a\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 &#171;\u0437\u043d\u0430\u044e\u0449\u0438\u043c\u0438&#187; \u043e \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u043c \u043a\u043e\u0434\u0435, \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044e\u0449\u0435\u043c \u0437\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041f\u043e \u0445\u043e\u0434\u0443 \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u043d\u044b \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c, \u043a\u0440\u043e\u043c\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/902412\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>.<\/p>\n<p><a href=\"https:\/\/raw.githubusercontent.com\/galilov\/PreemptiveMultitasking\/refs\/heads\/ForFlatAssembler\/demo.asm\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430<\/a> \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 <a href=\"https:\/\/flatassembler.net\/\" rel=\"noopener noreferrer nofollow\"><strong>Flat Assembler<\/strong><\/a> \u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043c\u0435\u0442\u043e\u043a. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Flat Assembler \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u0430 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f. \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0438, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u0441 Microsoft Macro Assembler \u0438\u043b\u0438 Borland Turbo Assembler, \u043d\u0435 \u0443\u0432\u0438\u0434\u044f\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0433\u043e, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"assembly\">mov    [es:bx], ax    ; \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e mov es:[bx], ax mov    [name], ax     ; \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e mov name, ax \u0432 masm\/tasm mov    name, ax       ; \u043e\u0448\u0438\u0431\u043a\u0430! \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c [name] mov    ax, name       ; \u044d\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e mov ax, offset name jmp    dword [handler] ; \u0437\u0434\u0435\u0441\u044c dword \u0432\u043c\u0435\u0441\u0442\u043e dword ptr \u0432 indirect far jump or call<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0442\u043e\u0436\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u0430\u0447\u0435:<\/p>\n<pre><code class=\"assembly\">TimerVector = 8h     ; \u0432\u043c\u0435\u0441\u0442\u043e TimerVector equ 8h<\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u0442\u043e\u0447\u043a\u0438. \u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440 \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u0430 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0439 \u0432\u0432\u0435\u0440\u0445 \u043f\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0443 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0438 \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439:<\/p>\n<pre><code class=\"assembly\">MyProc1:            ; \"Normal\" label .ThisIsALocalLabel: ; Local label in scope between two neares\u0435 normal lables   cmp    ax, cx   ret  MyProc2:   ret<\/code><\/pre>\n<p><a href=\"https:\/\/flatassembler.net\/docs.php\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u043f\u043e Flat assembler.<\/p>\n<p>Flat assembler \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 DOS, Linux, Windows \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<h2>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0423 \u043d\u0430\u0441 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0443\u0441\u043a\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0443\u0441\u043e\u043a &#171;\u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f&#187; \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 &#171;\u0434\u0443\u043c\u0430\u0435\u0442&#187;, \u0447\u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0441\u0432\u043e\u0438\u043c\u0438, \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u043c\u0438, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u0430\u0437\u043e\u0432\u0451\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0434\u0430 \u0432 \u0446\u0438\u043a\u043b\u0435 <strong>\u043d\u0438\u0442\u044c\u044e<\/strong>. <\/p>\n<blockquote>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d <strong>\u043f\u043e\u0442\u043e\u043a<\/strong> \u0432 \u0442\u043e\u043c \u0436\u0435 \u0441\u0430\u043c\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435, \u0447\u0442\u043e \u0438 <strong>\u043d\u0438\u0442\u044c<\/strong>: \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u043d\u0438\u0442\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, &#171;\u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c&#187; \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 &#171;\u043c\u043d\u043e\u0433\u043e\u043d\u0438\u0442\u0435\u0432\u043e\u0441\u0442\u044c&#187; (<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D0%BD%D0%BE%D0%B3%D0%BE%D0%BF%D0%BE%D1%82%D0%BE%D1%87%D0%BD%D0%BE%D1%81%D1%82%D1%8C\" rel=\"noopener noreferrer nofollow\">multithreading<\/a>).<\/p>\n<\/blockquote>\n<p>\u041a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u043d\u0438\u0442\u0435\u0439 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u044f\u0434\u0440\u0435? \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043d\u043e \u043c\u044b \u043b\u0451\u0433\u043a\u0438\u0445 \u043f\u0443\u0442\u0435\u0439 \u043d\u0435 \u0438\u0449\u0435\u043c.<\/p>\n<h2>\u0412\u0437\u0433\u043b\u044f\u0434 \u0438\u0437\u0434\u0430\u043b\u0435\u043a\u0430<\/h2>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u043a\u0435 \u043d\u0438\u0436\u0435 (\u0440\u0438\u0441. 1) \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0439 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438. \u041e\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u043d\u0438\u0437, \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041d\u0430\u0434\u043f\u0438\u0441\u0438 \u043f\u043e\u0434 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430\u043c\u0438 &#8212; \u0441\u043e\u0431\u044b\u0442\u0438\u044f, &#171;\u043f\u0440\u043e\u0432\u043e\u0446\u0438\u0440\u0443\u044e\u0449\u0438\u0435&#187; \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c5f\/642\/62c\/c5f64262c6805475301bf422cce27148.png\" alt=\"\u0420\u0438\u0441. 1. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.\" title=\"\u0420\u0438\u0441. 1. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.\" width=\"639\" height=\"1000\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c5f\/642\/62c\/c5f64262c6805475301bf422cce27148.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c5f\/642\/62c\/c5f64262c6805475301bf422cce27148.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 1. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0438 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a <s>\u0448\u0430\u043c\u043f\u0443\u0440\u0430\u043c \u0438 \u0441\u043e\u0441\u0438\u0441\u043a\u0430\u043c<\/s> \u043b\u0438\u043d\u0438\u044f\u043c \u0436\u0438\u0437\u043d\u0438 \u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041b\u0438\u043d\u0438\u0438 \u0436\u0438\u0437\u043d\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u043d\u043a\u0442\u0438\u0440\u043e\u043c, \u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f &#8212; \u0443\u0437\u043a\u0438\u043c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u043d\u0430 \u043b\u0438\u043d\u0438\u0438 \u0436\u0438\u0437\u043d\u0438.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f &#8212; \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. \u041b\u0438\u043d\u0438\u044f \u0436\u0438\u0437\u043d\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u0438\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u0434\u043b\u044f \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442: <strong>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432<\/strong>, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0444\u043b\u0430\u0433\u043e\u0432 <code>FLAGS<\/code>, <strong>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/strong> (\u0443 \u043d\u0430\u0441 \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0438\u0445 \u043d\u0435\u0442, \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438), <strong>\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430<\/strong>.<\/p>\n<p>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0432 <strong>\u043e\u0431\u044a\u0435\u043a\u0442\u044b<\/strong>. \u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043e\u043d\u0438 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0440\u0430\u0441\u043d\u044b\u043c\u0438 \u043d\u0430\u0434\u043f\u0438\u0441\u044f\u043c\u0438. \u0418\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, <s>\u0448\u0430\u043c\u043f\u0443\u0440 \u0438 \u0441\u043e\u0441\u0438\u0441\u043a\u0438<\/s> \u043b\u0438\u043d\u0438\u044f \u0436\u0438\u0437\u043d\u0438 \u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u0442\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p> <strong>Main code<\/strong> &#8212; \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043d\u0438\u0442\u0435\u0439. \u0412 \u044d\u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043d\u0438\u0442\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p> <strong>Switcher<\/strong> &#8212; \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043d\u0438\u0442\u0435\u0439. \u0412 \u043d\u0451\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0438\u043b\u0438, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u0442\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>T1, T2, T3<\/strong> &#8212; \u0441\u0430\u043c\u0438 \u043d\u0438\u0442\u0438. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0445 \u0437\u0434\u0435\u0441\u044c \u0442\u0440\u0438. \u041a\u0430\u0436\u0434\u0430\u044f \u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0435\u043a\u0438\u0439 \u043a\u043e\u0434 \u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0437\u0430\u0446\u0438\u043a\u043b\u0435\u043d\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u043b\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u043d\u0438\u0442\u0438. \u041f\u043e\u0437\u0434\u043d\u0435\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u044d\u0442\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0412\u0437\u0433\u043b\u044f\u0434 \u043f\u043e\u0431\u043b\u0438\u0436\u0435: \u0438\u0434\u0435\u0439\u043a\u0430<\/h2>\n<p>\u041a\u0430\u043a \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430? \u041e\u0442\u0432\u0435\u0442 \u0435\u0441\u0442\u044c \u0443 \u043c\u0435\u043d\u044f, \u0438 \u043e\u043d \u0434\u043e \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u0431\u0430\u043d\u0430\u043b\u0435\u043d: \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0430\u0439\u043c\u0435\u0440\u0430. \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0434 \u043d\u0438 \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u0439, \u0435\u0441\u043b\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b \u0441\u0431\u0440\u043e\u0441\u043e\u043c \u0444\u043b\u0430\u0433\u0430 <code>IF<\/code> \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 <code>FLAGS<\/code>, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0438\u0442\u0435\u043b\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043e\u0442 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f (<code>ISR<\/code>).<\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/902412\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439, \u0437\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u0438 \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0436\u0435, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/556\/e7d\/ff0\/556e7dff03f9fe5190446eb288c0b9ba.png\" alt=\"\u0420\u0438\u0441. 2. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 8086.\" title=\"\u0420\u0438\u0441. 2. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 8086.\" width=\"813\" height=\"601\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/556\/e7d\/ff0\/556e7dff03f9fe5190446eb288c0b9ba.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/556\/e7d\/ff0\/556e7dff03f9fe5190446eb288c0b9ba.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 2. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 8086.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u043b \u0432\u0435\u0440\u043d\u043e: \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u0442\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435\u043c, \u0434\u0430 \u043d\u0435 \u0443\u0441\u043f\u0435\u043b\u0430. \u0412\u044b\u0437\u043e\u0432\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 &#171;\u0440\u0432\u0443\u0442&#187; \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e. \u041e\u043d\u0438 \u0432\u043a\u043b\u0438\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u0440\u0442\u043e\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0435 \u043d\u0430\u0441 \u0431\u043e\u043b\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u043a \u0431\u044b \u0441\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435: \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0435\u043a, \u0430\u0434\u0440\u0435\u0441\u0443\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u043e\u0439 <code>SS:SP<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 <code>FLAGS<\/code>, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 <code>CS<\/code> \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 <code>IP<\/code>.<\/p>\n<blockquote>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0432 \u0441\u0442\u0435\u043a \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0435\u0433\u0438\u0441\u0442\u0440 <code>SP<\/code> \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u043d\u0430 2 (\u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043b\u043e\u0432\u0430), \u0437\u0430\u0442\u0435\u043c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>SS \u00d7 4 + SP<\/code>  \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e (2 \u0431\u0430\u0439\u0442\u0430).<\/p>\n<\/blockquote>\n<p>\u041d\u0430 \u044d\u0442\u043e \u043c\u044b \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u043c, \u043d\u043e \u043d\u0430\u043c \u0438 \u043d\u0435 \u043d\u0430\u0434\u043e. \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0435\u0431\u0435 \u044d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f. \u041c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438. \u041c\u044b &#8212; \u0443\u043c\u043d\u0438\u0446\u044b!<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0441\u0432\u043e\u044e \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0440\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 <code>IRET<\/code>. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0420\u0438\u0441. 2 \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0438\u0437 \u0441\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0430\u0440\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>CS:IP<\/code> \u0438 <code>FLAGS<\/code>.<\/p>\n<blockquote>\n<p>\u0412\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0441\u0442\u0435\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 (2 \u0431\u0430\u0439\u0442\u0430) \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>SS \u00d7 4 + SP<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c <code>SP<\/code> \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 2 (\u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043b\u043e\u0432\u0430).<\/p>\n<\/blockquote>\n<p><strong>\u0410 \u0432\u043e\u0442 \u0442\u0443\u0442 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c!<\/strong> \u0421\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u0442\u0435\u043a\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u043e\u043c\u0435\u0449\u0451\u043d \u0442\u0443\u0434\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0418 \u0442\u043e\u0433\u0434\u0430 <code>IRET<\/code> \u0432\u0435\u0440\u043d\u0451\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043a\u043e\u0434\u0443, \u043d\u0435 \u0442\u043e\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u0440\u0435\u0440\u0432\u0430\u043d!<\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0435\u0441\u044c, \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u0436\u0435 \u043c\u0435\u0436\u0434\u0443 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0437\u0430\u0446\u0438\u043a\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430, \u0432\u044b\u0434\u0435\u043b\u044f\u044f \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0431\u043b\u043e\u043a\u0443 \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c\u043e\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u043c\u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439.<\/p>\n<h2>\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0448\u0435\u0441\u0442\u0435\u0440\u0451\u043d\u043a\u0438<\/h2>\n<p>\u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u041d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 \u0442\u0440\u0438 <s>\u0433\u0440\u0438\u0431\u043e\u0447\u043a\u0430<\/s> \u0437\u0432\u043e\u043d\u043e\u0447\u043a\u0430 \u0438\u0437 \u043f\u044f\u0442\u0438 \u043f\u043e \u0448\u043a\u0430\u043b\u0435 \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0443\u043b\u0438\u0441\u0442\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0442\u0435\u043a \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043d\u043e\u0432\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f, \u043c\u044b \u043f\u043e\u0439\u0434\u0451\u043c \u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043d\u043e\u0439 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 (\u0420\u0438\u0441. 3).<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d9c\/1ec\/425\/d9c1ec425270a197f41893c18b14b633.jpg\" alt=\"\u0420\u0438\u0441. 3. \u0411\u043b\u0430\u0433\u043e\u0441\u043b\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u0434\u0442\u0438 \u0432\u0435\u0440\u043d\u044b\u043c \u043f\u0443\u0442\u0451\u043c. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a https:\/\/neolurk.org\/wiki\/\u0412\u0435\u0440\u043d\u043e\u0439_\u0434\u043e\u0440\u043e\u0433\u043e\u0439_\u0438\u0434\u0451\u0442\u0435,_\u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0438!\" title=\"\u0420\u0438\u0441. 3. \u0411\u043b\u0430\u0433\u043e\u0441\u043b\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u0434\u0442\u0438 \u0432\u0435\u0440\u043d\u044b\u043c \u043f\u0443\u0442\u0451\u043c. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a https:\/\/neolurk.org\/wiki\/\u0412\u0435\u0440\u043d\u043e\u0439_\u0434\u043e\u0440\u043e\u0433\u043e\u0439_\u0438\u0434\u0451\u0442\u0435,_\u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0438!\" width=\"800\" height=\"585\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d9c\/1ec\/425\/d9c1ec425270a197f41893c18b14b633.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d9c\/1ec\/425\/d9c1ec425270a197f41893c18b14b633.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 3. \u0411\u043b\u0430\u0433\u043e\u0441\u043b\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u0434\u0442\u0438 \u0432\u0435\u0440\u043d\u044b\u043c \u043f\u0443\u0442\u0451\u043c. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a <a href=\"https:\/\/neolurk.org\/wiki\/%D0%92%D0%B5%D1%80%D0%BD%D0%BE%D0%B9_%D0%B4%D0%BE%D1%80%D0%BE%D0%B3%D0%BE%D0%B9_%D0%B8%D0%B4%D1%91%D1%82%D0%B5,_%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D0%B8%D1%89%D0%B8\" rel=\"noopener noreferrer nofollow\">https:\/\/neolurk.org\/wiki\/\u0412\u0435\u0440\u043d\u043e\u0439_\u0434\u043e\u0440\u043e\u0433\u043e\u0439_\u0438\u0434\u0451\u0442\u0435,_\u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0438<\/a>!<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043d\u0430\u0431\u0434\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u0442\u0435\u043a\u043e\u043c, \u0438 \u0442\u043e\u0433\u0434\u0430, \u043f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f, \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043a \u043a\u043e\u0434\u0443 \u043d\u0438\u0442\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043f\u0430\u0434\u0451\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0441\u0442\u0435\u043a, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u044d\u0442\u043e\u0439 \u0441\u0430\u043c\u043e\u0439 \u043d\u0438\u0442\u0438.<\/p>\n<p>\u041d\u0430 \u0440\u0438\u0441. 4 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438\u0437 \u0442\u0440\u0451\u0445 \u043d\u0438\u0442\u0435\u0439 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/337\/a42\/e2d\/337a42e2d9e4a07c4fe9bb6570d500e9.png\" alt=\"\u0420\u0438\u0441. 4. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u043e\u0432 \u043d\u0438\u0442\u0435\u0439.\" title=\"\u0420\u0438\u0441. 4. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u043e\u0432 \u043d\u0438\u0442\u0435\u0439.\" width=\"1123\" height=\"1442\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/337\/a42\/e2d\/337a42e2d9e4a07c4fe9bb6570d500e9.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/337\/a42\/e2d\/337a42e2d9e4a07c4fe9bb6570d500e9.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 4. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u043e\u0432 \u043d\u0438\u0442\u0435\u0439.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 <strong>\u0436\u0435\u043b\u0442\u043e\u0432\u0430\u0442\u0435\u043d\u044c\u043a\u0438\u0445 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430\u0445<\/strong> \u0443 \u043d\u0430\u0441 \u0436\u0438\u0432\u0443\u0442 \u0442\u0440\u0438 \u043d\u0438\u0442\u0438: <code>Thread1<\/code>, <code>Thread2<\/code>, <code>Thread3<\/code>. \u041f\u043e\u043b\u0435 <code>Offset<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u043e\u0433 \u0431\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u0434 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043d\u0438\u0442\u0438. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u044f \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0421\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u043d\u0438\u0442\u0435\u0439 <strong>\u0433\u043e\u043b\u0443\u0431\u044b\u043c\u0438 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430\u043c\u0438<\/strong> \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u0438\u0442\u0438 \u0441\u0432\u043e\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a \u0441\u0445\u0435\u043c\u0435 \u0431\u043b\u043e\u043a\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a &#171;High byte | Low byte&#187;. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u043e\u0432, \u043a\u0430\u0436\u0434\u043e\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 2 \u0431\u0430\u0439\u0442\u0430. \u0421\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0435\u043a\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c <code>Offset<\/code> \u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0442 \u0441\u043d\u0438\u0437\u0443 \u0432\u0432\u0435\u0440\u0445. \u0422\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0435\u043a\u0430: \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u043d \u0440\u0430\u0441\u0442\u0451\u0442 \u0432\u043d\u0438\u0437, \u043a \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c (\u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f\u043c). \u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043d\u0438\u0442\u044f\u043c\u0438, \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f <code>Offset<\/code> \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u0430\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b. \u041e\u043d\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0440\u0443\u0433\u0438\u043c\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u0442\u0435\u043a \u0440\u0430\u0441\u0442\u0451\u0442 \u0432\u043d\u0438\u0437<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u0441\u0442\u0435\u043a \u0440\u0430\u0441\u0442\u0451\u0442 &#171;\u0432\u043d\u0438\u0437&#187;, \u0442\u043e \u0432\u043e\u0442 \u0447\u0442\u043e \u0438\u043c\u0435\u044e\u0442 \u0432\u0432\u0438\u0434\u0443: \u043f\u043e \u043c\u0435\u0440\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f PUSH) \u0441\u0442\u0435\u043a \u0440\u0430\u0441\u0442\u0435\u0442 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0432\u0435\u0434\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430-\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0441\u0442\u0435\u043a\u0430 SP \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f.  \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0441\u0442\u0435\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 POP.  \u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u043e, \u0447\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 &#171;\u0441\u043d\u0438\u0437\u0443 \u0432\u0432\u0435\u0440\u0445&#187;, \u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 &#8212; &#171;\u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437&#187;, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043f\u0430\u043c\u044f\u0442\u044c \u044d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043e\u0441\u044c Y \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435.  \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u0442\u0435\u043a \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437: \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u044b\u0439 \u0432\u0435\u0440\u0445 \u0441\u0442\u0435\u043a\u0430 (\u0432 \u0441\u043b\u043e\u0432\u043e \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0430\u0434\u0440\u0435\u0441\u043e\u043c), \u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f &#171;\u043f\u043e\u0434&#187; \u043d\u0438\u043c (\u0432\u043d\u0438\u0437\u0443).<\/p>\n<\/div>\n<\/details>\n<p><strong>\u0417\u0435\u043b\u0451\u043d\u044b\u043c\u0438 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430\u043c\u0438<\/strong> \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 <code>SavedSP<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u0441\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0440\u0435\u0440\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0438\u0442\u0438. \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u0430, \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0445\u0440\u0430\u043d\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 <code>SP<\/code> \u043f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043d\u0438\u0442\u044c.<\/p>\n<p>\u0412 <strong>\u043a\u0440\u0430\u0441\u043d\u043e\u043c \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0435<\/strong> <code>ThreadIndex<\/code> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u043e\u043c\u0435\u0440 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043d\u0438\u0442\u0438. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u0442\u0430\u0439\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u0438\u043d\u0434\u0435\u043a\u0441 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 <code>SavedSP<\/code> \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043d\u0438\u0442\u0438.<\/p>\n<p><strong>\u041a\u043e\u0440\u0438\u0447\u043d\u0435\u0432\u044b\u0439<\/strong> <code>MainThreadSP<\/code> \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f <code>SP<\/code> \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0442\u0435\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432\u0441\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 <code>SP<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 <code>MainThreadSP<\/code>.<\/p>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0451 \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f?<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u0435\u043a\u0438 \u043d\u0438\u0442\u0435\u0439 (\u0441\u043c. \u0440\u0438\u0441. 4, \u0433\u043e\u043b\u0443\u0431\u044b\u0435 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438), \u043f\u043e\u043c\u0435\u0449\u0430\u044f \u0442\u0443\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 <code>FLAGS<\/code>, \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043d\u0438\u0442\u0438 <code>CS<\/code>, <em>\u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043a\u043e\u0434 \u043d\u0438\u0442\u0438<\/em> <code>IP<\/code> \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 <code>AX<\/code>, <code>BX<\/code>, <code>CX<\/code>, <code>DX<\/code>, <code>SI<\/code>, <code>DI<\/code>, <code>BP<\/code>, <code>ES<\/code>, <code>DS<\/code>. \u041a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0441\u043e\u0431\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0438 \u0444\u043b\u0430\u0433\u043e\u0432 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043d\u0438\u0442\u044c \u0431\u044b\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u044b, \u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0444\u043b\u0430\u0433\u043e\u0432 <code>FLAGS<\/code> \u043d\u0435 \u0431\u044b\u043b \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a-\u0442\u043e \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0422\u0430\u043a \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u043d\u0443\u0436\u043d\u044b\u0439 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043d\u0438\u0442\u0438 <strong>\u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435<\/strong> \u0438\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0442\u0430\u0439\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u043e\u0439 \u0441\u0442\u0435\u043a\u0430 \u043d\u0438\u0442\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 <code>AddThread<\/code>:<\/p>\n<pre><code class=\"assembly\">; ==== Adds a new Thread to multithreading manager ; Input: ;     DX: Thread routine offset ; Uses: ;     AX, BX, CX, DX AddThread:   ; Save the current Thread counter to BL for future usage in GetThreadSPAddr call.   mov    bl, [AddedThreadCounter] ; bl = *AddedThreadCounter   ; Calculate the new Thread stack pointer address.   ; Stack pointer must point to the top of the stack.   mov    al, bl                 ; al = bl   inc    al                     ; al++   mov    [AddedThreadCounter], al  ; *AddedThreadCounter = al   mov    bh, ThreadStackSize    ; bh = ThreadStackSize -- number of bytes in the stack   mul    bh                     ; ax = al * bh -- select the top of the stack   add    ax, ThreadStacks       ; ax += &amp;ThreadStacks -- now ax points to the top of the Thread stack   ; Save the current value of SP to CX.   mov    cx, sp                 ; cx = sp   ; Switch SP to the top of a Thread stack.   mov    sp, ax                 ; sp = ax   ; Prepare the Thread stack to switch to the beginning of the Thread with IRET instruction.   pushf                         ; *((ss &lt;&lt; 4) + (--sp)) = flags   push   cs                     ; *((ss &lt;&lt; 4) + (--sp)) = cs -- code segment   push   dx                     ; *((ss &lt;&lt; 4) + (--sp)) = dx -- Thread offset   ; Save reqired registers to be restored when switching to the Thread.   pushregs                      ; use macro pushregs here   ; Save SP to the array of Thread-specific stack pointers.   ; SP will be restored from the array element when switching to the Thread.   callGetSavedSPOffset        ; call GetSavedSPOffset, input parameter is BL, output is BX   ; Now BX points to the Thread-specific stack pointer address, save SP to it.   mov    [bx], sp               ; *(ds &lt;&lt; 4) + bx) = sp   ; Restore previously saved SP from CX. Required to return from 'AddThread'back to a calling code.   mov    sp, cx                 ; sp = cx   ret                           ; return  ; ===== Calculate the address to store a stack pointer for specific Thread ; Input: ;     BL: Thread index ; Output: ;     BX: Thread-specific Stack pointer address GetSavedSPOffset:   ; bx = bl * 2 + &amp;SavedSPs   xor    bh, bh                 ; bh = 0   shl    bx, 1                  ; bx &lt;&lt;= 1 -- multiply bx by 2 to get the index of the Thread stack pointer in SavedSPs array   add    bx, SavedSPs           ; bx += &amp;SavedSPs -- add SavedSPs's offset   ret                           ; return<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"assembly\">TimerVector       =     8h ; constant: Timer interrupt vector ThreadStackSize   =     128; constant: Size of the Thread stack, bytes NThreads          =     3  ; constant: Max number of Threads  ThreadStacks      db    (ThreadStackSize * NThreads) dup (0)  ; The memory block for stacks SavedSPs          dw    NThreads dup (0); Array of NThreads words to store Thread-specific SP (stack pointer) addresses. MainThreadSP      dw    0  ; Word variable to store a stack pointer for the main (startup) code. CurrentThreadIndex db  -1  ; Byte variable to store currently executing Thread number. AddedThreadCounter db   0  ; Byte variable used as counter of added Threads. PrevTimerVector   dd    0  ; Double word variable to save the original Timer interrupt vector here. TickCounter       dw    0  ; Counter used to count the number of ticks since switcher is started. MsgDone           db    'Done', 10, 13, '$' ; Message to print on exit. Done              db    0  ; Flag to indicate that the switcher is done.<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0430\u043a\u0440\u043e\u043a\u043e\u043c\u0430\u043d\u0434\u044b pushregs \u0438 popregs<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043d\u0430\u043c\u0438 <strong>Flat assembler<\/strong> \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u0430\u043a\u0440\u043e\u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439:<\/p>\n<pre><code class=\"assembly\">; ===== Macro command which saves all the required registers to stack macro pushregs {   push   ax                     ; *((ss &lt;&lt; 4) + (--sp)) = ax   push   bx                     ; *((ss &lt;&lt; 4) + (--sp)) = bx   push   cx                     ; *((ss &lt;&lt; 4) + (--sp)) = cx   push   dx                     ; *((ss &lt;&lt; 4) + (--sp)) = dx   push   si                     ; *((ss &lt;&lt; 4) + (--sp)) = si   push   di                     ; *((ss &lt;&lt; 4) + (--sp)) = di   push   bp                     ; *((ss &lt;&lt; 4) + (--sp)) = bp   push   es                     ; *((ss &lt;&lt; 4) + (--sp)) = es   push   ds                     ; *((ss &lt;&lt; 4) + (--sp)) = ds }  ; ===== Macro command which loads the previously saved registers from stack macro popregs {   pop    ds                     ; ds = *((ss &lt;&lt; 4) + (sp++))   pop    es                     ; es = *((ss &lt;&lt; 4) + (sp++))   pop    bp                     ; bp = *((ss &lt;&lt; 4) + (sp++))   pop    di                     ; di = *((ss &lt;&lt; 4) + (sp++))   pop    si                     ; si = *((ss &lt;&lt; 4) + (sp++))   pop    dx                     ; dx = *((ss &lt;&lt; 4) + (sp++))   pop    cx                     ; cx = *((ss &lt;&lt; 4) + (sp++))   pop    bx                     ; bx = *((ss &lt;&lt; 4) + (sp++))   pop    ax                     ; ax = *((ss &lt;&lt; 4) + (sp++)) }<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442 \u043d\u0430 C. \u041d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440 <code>SP<\/code> \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u0445 <code>PUSH<\/code> \u0438 <code>POP<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 2 \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u043b\u043e\u0432\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 2 \u0431\u0430\u0439\u0442\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 <code>PUSH<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b  <code>AX<\/code>, <code>BX<\/code>, <code>CX<\/code>, <code>DX<\/code>, <code>SI<\/code>, <code>DI<\/code>, <code>BP<\/code>, <code>ES<\/code>, <code>DS<\/code> \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0435\u043a. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u044f\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0438 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<ol>\n<li>\n<p><strong>\u0415\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0440\u0430\u043d\u0435\u0435 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0441\u044f<\/strong>, \u0442\u043e <code>ThreadIndex<\/code> == -1 (\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u043d\u0430 \u0440\u0438\u0441. 4) \u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0430 \u043d\u0435 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0438\u0442\u0435\u0439, \u0442.\u043a. \u043d\u0438\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<br \/>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code>SP<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 <code>MainThreadSP<\/code> (\u0441\u043c. \u0440\u0438\u0441. 4, \u043a\u043e\u0440\u0438\u0447\u043d\u0435\u0432\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a), \u0430 <code>ThreadIndex<\/code> \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u044b\u043c \u043d\u0443\u043b\u044e: <code>ThreadIndex = ThreadIndex + 1 = 0<\/code><\/p>\n<\/li>\n<li>\n<p><strong>\u0415\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0443\u0436\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0441\u044f \u0440\u0430\u043d\u0435\u0435<\/strong>, \u0442\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440 <code>SP<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <code>Saved SPs array<\/code>, \u0438\u043d\u0434\u0435\u043a\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>ThreadIndex<\/code>:<br \/><code>SavedSP[ThreadIndex] = SP<\/code><br \/>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e <code>ThreadIndex<\/code> \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <code>Saved SPs array<\/code>, \u0438\u043b\u0438 \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430:<br \/><code>ThreadIndex = (ThreadIndex + 1) % NumThreads<\/code><br \/>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>NumThreads<\/code> = \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0438\u0442\u0435\u0439 = 3.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 SP \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <code>Saved SPs array<\/code> \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c <code>ThreadIndex<\/code>:<br \/><code>SP = SavedSP[ThreadIndex]<\/code><\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u0437, <em>\u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e<\/em>, \u0441\u0442\u0435\u043a\u0430 \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u0442\u0430\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 <code>DS<\/code>. <code>ES<\/code>, <code>BP<\/code>, <code>DI<\/code>, <code>SI<\/code>, <code>DX<\/code>, <code>CX<\/code>, <code>BX<\/code>, <code>AX<\/code> \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 <code>POP<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0430\u043b\u044c\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434<br \/><code>JMP DWORD [PrevTimerVector]<\/code><br \/>\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u0432 32-\u0431\u0438\u0442\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>PrevTimerVector<\/code> \u0441\u0435\u0433\u043c\u0435\u043d\u0442:\u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0447\u0430\u0441\u043e\u0432, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>IRET<\/code> . \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0442\u0435\u043a \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0443 \u043d\u0430\u0441 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u0430, \u0442\u043e <code>IRET<\/code> \u0432\u0435\u0440\u043d\u0451\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043d\u0438\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u0442\u0435\u043a\u043e\u043c.<\/p>\n<\/li>\n<\/ol>\n<blockquote>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044e \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0432\u0430\u0436\u043d\u044b. \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041d\u0438\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043e\u043d\u0430 \u043c\u043e\u043d\u043e\u043f\u043e\u043b\u044c\u043d\u043e \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438.<\/p>\n<\/blockquote>\n<p>\u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u043d\u0438\u0442\u0438 \u0437\u0430\u0446\u0438\u043a\u043b\u0435\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f, \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0442\u0430\u0439\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u044e\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043d\u0438\u0442\u044c. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0440\u0430\u0432\u043d\u043e\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0443 \u0442\u0430\u0439\u043c\u0435\u0440\u0430. \u041f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 55 \u043c\u0441.<\/p>\n<blockquote>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043d\u0438\u0442\u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <strong>\u043d\u0435<\/strong> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0422\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430.<\/p>\n<\/blockquote>\n<p>\u041a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0442\u0430\u0439\u043c\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439:<\/p>\n<pre><code class=\"assembly\">; ==== Time interrupt handler, switches threads. It is called every 55 ms. TimerHandler: ; Save registers to a current stack.   pushregs                      ; use macro pushregs here   ; Set DS=CS to address our data   mov    ax, cs                 ; ax = cs   mov    ds, ax                 ; ds = ax   ; Increment the tick counter.   inc    [TickCounter]          ; *(TickCounter)++   ; Check if the handler interrupted the main code.   cmp    [CurrentThreadIndex], -1; compare *CurrentThreadIndex to -1   jne    .SaveThread            ; if *CurrentThreadIndex != -1 goto .SaveThread   ; save main SP to MainThreadSP   mov    [MainThreadSP], sp     ; *MainThreadSP = sp   jmp    short .NextThread      ; goto .NextThread .SaveThread:   ; save SP to a Thread-specific pointer variable.   mov    bl, [CurrentThreadIndex]; bl = *CurrentThreadIndex   call   GetSavedSPOffset       ; call GetSavedSPOffset, input is BL, returns offset in bx   mov    [bx], sp               ; *bx = sp .NextThread:   ; Select next Thread.   ; Correct the Thread number: CurrentThreadIndex %= NThreads   xor    ah, ah                 ; ah = 0   mov    al, [CurrentThreadIndex]; al = *CurrentThreadIndex   inc    al                     ; al++   mov    bl, NThreads           ; bl = NThreads   div    bl                     ; al = ax \/ bl , ah = ax % bl   mov    [CurrentThreadIndex], ah; *CurrentThreadIndex = ah   ; Load SP from a Thread-specific pointer variable.   mov    bl, ah                 ; bl = ah   call   GetSavedSPOffset       ; call GetSavedSPOffset   mov    sp, [bx]               ; sp = *bx   popregs                       ; Restore the registers from stack.   jmp    dword [PrevTimerVector]; far jump to segment:offset saved in PrevTimerVector<\/code><\/pre>\n<h3>\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043d\u0438\u0442\u0435\u0439<\/h3>\n<p>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0438\u0442\u0438 \u043d\u0435 \u043a\u0440\u0443\u0442\u0438\u0442\u044c\u0441\u044f, \u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e. \u041b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e. \u0418 \u043c\u044b \u0442\u0430\u043a \u0441\u043c\u043e\u0436\u0435\u043c!<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f, \u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 <code>CLI<\/code> (CLear Interrupt flag), \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>PrevTimerVector<\/code>, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 SP \u0432\u0435\u0440\u0448\u0438\u043d\u0443 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0441\u0442\u0435\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u0443\u044e \u0432 <code>MainThreadSP<\/code> (\u0441\u043c \u0440\u0438\u0441. 4), \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b <code>DS<\/code>. <code>ES<\/code>, <code>BP<\/code>, <code>DI<\/code>, <code>SI<\/code>, <code>DX<\/code>, <code>CX<\/code>, <code>BX<\/code>, <code>AX<\/code> \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 <code>POP<\/code> \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 <code>IRET<\/code> \u0432 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u0434, \u0432 \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u0441\u0430\u043c\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0438 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a.<\/p>\n<p>\u041d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u043a\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"assembly\">; ===== TerminateSwitcher ; This function restores the data segment, stack segment, timer vector, and main SP. ; It also sets the Done flag to 1 and returns from the interrupt to the main code. TerminateSwitcher:   xor    ax, ax   mov    es, ax   cli                           ; disable interrupts   mov    ax, word [PrevTimerVector]    ; ax = *PrevTimerVector   mov    word [es:4 * TimerVector], ax ; *((es &lt;&lt; 4) + 4 * TimerVector) = ax   mov    ax, word [PrevTimerVector + 2]; ax = *(PrevTimerVector + 2)   mov    word [es:4 * TimerVector + 2], ax; *((es &lt;&lt; 4) + 4 * TimerVector + 2) = ax   ; restore main SP   mov    sp, [MainThreadSP]     ; sp = *MainThreadSP   mov    [Done], 1              ; *Done = 1   popregs                       ; restore registers   iret                          ; return from interrupt<\/code><\/pre>\n<p>\u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 <code>CALL<\/code> \u0438\u043b\u0438 <code>JMP<\/code> \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u043d\u0438\u0442\u0438. \u041a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442, \u0442.\u043a. \u0441\u0442\u0435\u043a \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 (main thread).<\/p>\n<p>\u0412\u043e\u0442 \u043a\u043e\u0434 \u043d\u0438\u0442\u0435\u0439. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0445 4 \u0448\u0442\u0443\u043a\u0438:<\/p>\n<pre><code class=\"assembly\">; ===== Thread 1 Thread1:   mov    ax, 0b800h             ; ax = 0xB800, a segment address of a text line 0   mov    es, ax                 ; es = ax   mov    ah, 01h                ; ah = 01h -- attribute to print \"blue on black\" .Loop:   mov    al, '0'                ; al = '0' -- character to print .NextDigit:   mov    [es:0], ax             ; print the character in ax at the very first   inc    al                     ; al++ -- change the character   cmp    al, '9'                ; compare al to '9'   jbe    .NextDigit             ; if al &lt;= '9' goto .NextDigit   mov    al, '0'                ; al = '0'   jmp    .Loop                  ; goto .Loop  ; ===== Thread 2 Thread2:   mov    ax, 0b800h             ; ax = 0xB800, a segment address of a text line 0   mov    es, ax                 ; es = ax   mov    ah, 02h                ; ah = 02h -- attribute to print \"green on black\" .Loop:   mov    al, 'A'                ; al = 'A' -- character to print .NextChar:   mov    [es:2], ax             ; print the character in ax at the second position   inc    al                     ; al++ -- change the character   cmp    al, 'Z'                ; compare al to 'Z'   jbe    .NextChar              ; if al &lt;= 'Z' goto .NextChar   jmp    .Loop                  ; goto .Loop  ; ===== Thread 3 Thread3:   mov    ax, 0b800h             ; ax = 0xB800, a segment address of a text line 0   mov    es, ax                 ; es = ax   mov    ax, 0040h              ; ah = 00h -- attribute to print \"black on black\", al = '@' .Loop:   mov    [es:4], ax             ; print the character '@' at the third position   inc    ah                     ; ah++ -- change the attribute   jmp    .Loop                  ; goto .Loop  ; ===== Thread 4 Thread4:   mov    dx, [TickCounter]   mov    bx, 0100h              ; line 1, column 0   call   DumpHex                ; dump the tick counter in hex   cmp    [TickCounter], 100h    ; compare *TickCounter to 100h (256)   jb     Thread4                ; if *TickCounter &lt; 100h goto Thread4   jmp    TerminateSwitcher      ; go to TerminateSwitcher <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 DumpHex<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"assembly\">==== DumpHex ; Input: ;     DX: value to dump ;     BH: line number ;     BL: column number ; Output: ;     None ; Uses: ;     AX, BX, CX, DX, ES ; Description: ;     This function dumps the value in DX to the screen at the specified line and column. ;     It converts the value to a string of hex digits and stores them directly in the video memory. DumpHex:   mov    ax, 0b800h        ; ax = 0xB800, a segment address of a text line 0   mov    es, ax            ; es = ax   mov    al, 160           ; al = 160 -- number of bytes per line (2 bytes per character)   mul    bh                ; ax = bh * al -- calculate the offset of the line   xor    bh, bh            ; bh = 0   shl    bx, 1             ; bx &lt;&lt;= 1 -- multiply by 2 to get the index of the column   add    bx, ax            ; bx += ax -- add the offset of the line   mov    cl, 12            ; cl = 12 -- counter for the number of bits to shift .DoLoop:   mov    ax, dx            ; ax = dx -- copy the value to ax   shr    ax, cl            ; shift right to get the next nibble   and    al, 0fh           ; mask the nibble   cmp    al, 9             ; compare the nibble to 9   jbe    .Decimal          ; if the nibble is less than 9, jump to .Decimal   add    al, 7             ; correct for hex digits .Decimal:   add    al, '0'           ; convert to ascii   mov    ah, 02h           ; character attribute 'green on black   mov    [es:bx], ax       ; store character and attribute   add    bx, 2             ; move to next position   sub    cl, 4             ; move to next nibble   jge   .DoLoop            ; if cl &gt;= 0, jump to .DoLoop   ret                      ; return<\/code><\/pre>\n<\/div>\n<\/details>\n<h2>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<\/h2>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/902412\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 <strong>DOSBox Staging<\/strong> \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043d\u0435\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 debug. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430\u0448 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0441 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 &#8212; <a href=\"https:\/\/flatassembler.net\/\" rel=\"noopener noreferrer nofollow\"><strong>Flat Assembler<\/strong><\/a>. \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e <a href=\"https:\/\/flatassembler.net\/fasm17332.zip\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0440\u0441\u0438\u044e \u0434\u043b\u044f DOS<\/a>. \u0414\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b Flat assembler \u0442\u0440\u0435\u0431\u0443\u0435\u0442 <a href=\"https:\/\/sandmann.dotster.com\/cwsdpmi\/\" rel=\"noopener noreferrer nofollow\"><strong>DPMI (DOS Protected Mode Interface)<\/strong><\/a>. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c <a href=\"https:\/\/sandmann.dotster.com\/cwsdpmi\/csdpmi7b.zip\" rel=\"noopener noreferrer nofollow\">\u0430\u0440\u0445\u0438\u0432<\/a>.<\/p>\n<p>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u043e\u0431\u0430 \u0430\u0440\u0445\u0438\u0432\u0430 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e dos \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/65d\/06c\/1cd\/65d06c1cd1fad0593c1a1409a5d047f4.png\" alt=\"\u0420\u0438\u0441. 5. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438\" title=\"\u0420\u0438\u0441. 5. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438\" width=\"281\" height=\"612\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/65d\/06c\/1cd\/65d06c1cd1fad0593c1a1409a5d047f4.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/65d\/06c\/1cd\/65d06c1cd1fad0593c1a1409a5d047f4.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 5. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b DOSBox Staging. \u042f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b DOSBox Staging \u0438\u0437 Flatpak \u0438 \u043a\u043e\u043d\u0444\u0438\u0433, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 <code>\/home\/user\/.var\/app\/io.github.dosbox-staging\/config\/dosbox\/dosbox-staging.conf<\/code>. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u0441\u0435\u043a\u0446\u0438\u044e <code>[autoexec]<\/code> \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435. \u0414\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>[autoexec] # Each line in this section is executed at startup as a DOS command. mount c ~\/dos c: c:\\csdpmi7b\\bin\\cwsdpmi.exe -p path %PATH%;c:\\fasm<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0432 <a href=\"https:\/\/habr.com\/ru\/articles\/902412\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c DOSBox Staging. \u0415\u0441\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u043e\u043a\u043e\u0448\u043a\u043e \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0432\u043d\u0438\u0437\u0443 (\u0440\u0438\u0441. 6), \u0442\u043e \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fa7\/0f1\/046\/fa70f10469648d42ed212513915ba3eb.png\" alt=\"\u0420\u0438\u0441. 6. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 DOSBox Staging c CWDPMI\" title=\"\u0420\u0438\u0441. 6. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 DOSBox Staging c CWDPMI\" width=\"1418\" height=\"890\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/fa7\/0f1\/046\/fa70f10469648d42ed212513915ba3eb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fa7\/0f1\/046\/fa70f10469648d42ed212513915ba3eb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 6. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 DOSBox Staging c CWDPMI<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430. \u0412 DOSBox \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <strong>fasm<\/strong>. \u0415\u0441\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442, \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 (\u0440\u0438\u0441. 7), \u0442\u043e \u0434\u0435\u043d\u044c \u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u0447\u043d\u044b\u043c:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/97d\/4d8\/d3d\/97d4d8d3dbce6e3255d176fbcb0a1351.png\" alt=\"\u0420\u0438\u0441. 7. Fasm \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f\" title=\"\u0420\u0438\u0441. 7. Fasm \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f\" width=\"1096\" height=\"332\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/97d\/4d8\/d3d\/97d4d8d3dbce6e3255d176fbcb0a1351.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/97d\/4d8\/d3d\/97d4d8d3dbce6e3255d176fbcb0a1351.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 7. Fasm \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0434\u0440\u0443\u0433 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e dos \u043d\u0430 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0435 \u0444\u0430\u0439\u043b <code>demo.asm<\/code> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<blockquote>\n<p><code>fasm demo.asm<\/code><\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/73f\/a38\/133\/73fa3813301fb179c05075766cb7d3b2.png\" alt=\"\u0420\u0438\u0441. 8. \u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" title=\"\u0420\u0438\u0441. 8. \u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" width=\"1183\" height=\"191\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/73f\/a38\/133\/73fa3813301fb179c05075766cb7d3b2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/73f\/a38\/133\/73fa3813301fb179c05075766cb7d3b2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 8. \u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>DEMO.COM<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/25e\/ac8\/889\/25eac8889630950dece290a583339dcc.png\" alt=\"\u0420\u0438\u0441. 9. \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e.\" title=\"\u0420\u0438\u0441. 9. \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e.\" width=\"1177\" height=\"203\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/25e\/ac8\/889\/25eac8889630950dece290a583339dcc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/25e\/ac8\/889\/25eac8889630950dece290a583339dcc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 9. \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e.<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/strong> \u043c\u043e\u0436\u043d\u043e \u0441 \u043c\u043e\u0435\u0433\u043e <a href=\"https:\/\/raw.githubusercontent.com\/galilov\/PreemptiveMultitasking\/refs\/heads\/ForFlatAssembler\/demo.asm\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 github.com<\/a><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0438 \u0430\u0432\u0442\u043e\u0440\u0443 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u043c \u043a\u043b\u044e\u0447\u0435, \u043d\u043e \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u044f\u0441\u044c \u043d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0433\u043e\u043b\u043e\u0441\u0443\u0439\u0442\u0435 \u0437\u0430 \u0441\u0442\u0430\u0442\u044c\u044e \u0438 \u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043f\u043b\u044e\u0441\u0438\u043a\u0438 \u0432 \u043a\u0430\u0440\u043c\u0443.<\/p>\n<p>\u041d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043e \u043e\u043a\u043e\u043b\u043e \u043d\u0435\u0434\u0435\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u044f \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u0435\u043d \u0437\u0430 \u0432\u0430\u0448\u0438 \u043e\u0442\u0437\u044b\u0432\u044b. \u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043e\u0447\u0435\u043f\u044f\u0442\u043a\u0438, \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f &#8212; \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/907312\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u041d\u0443\u0436\u043d\u043e \u043b\u0438 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u043d\u043e\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">97.14% <\/span><span class=\"tm-article-poll__answer-label\">\u0425\u043e\u0447\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435!<\/span><span class=\"tm-article-poll__answer-votes\">68<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 97.14%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">2.86% <\/span><span class=\"tm-article-poll__answer-label\">\u0410\u0432\u0442\u043e\u0440, \u0432\u044b\u043f\u0435\u0439 \u0419\u043e\u0434\u0443!<\/span><span class=\"tm-article-poll__answer-votes\">2<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 2.86%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 70 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 4 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \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\/907312\/\"> https:\/\/habr.com\/ru\/articles\/907312\/<\/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<h2>\u0414\u043b\u0438\u043d\u043d\u043e\u0435 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0423\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u043d\u0435 \u0441 \u0437\u0430\u043f\u0430\u0445\u0430 \u043a\u043e\u0444\u0435, \u0430 \u0441 <a href=\"https:\/\/ozhegov.textologia.ru\/definit\/naftalin\/?q=742&amp;n=188628\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u043f\u0430\u0445\u0430 \u043d\u0430\u0444\u0442\u0430\u043b\u0438\u043d\u0430<\/a>, \u0442\u043e\u043b\u0441\u0442\u044b\u043c \u0441\u043b\u043e\u0435\u043c \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043c\u0438\u043a\u0440\u043e\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u044d\u043f\u043e\u0445\u0438 \u043a\u043e\u043d\u0446\u0430 1970-\u0445 \u0433\u043e\u0434\u043e\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0437\u043d\u0430\u043c\u0435\u043d\u0438\u0442\u043e\u0439 \u043f\u043b\u0435\u044f\u0434\u0435 \u0442\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u0430, \u043a\u0430\u043a  <a href=\"https:\/\/en.wikipedia.org\/wiki\/Zilog_Z80\" rel=\"noopener noreferrer nofollow\">Zilog Z80<\/a>, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Motorola_68000\" rel=\"noopener noreferrer nofollow\">Motorola 68000<\/a>, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Intel_8086\" rel=\"noopener noreferrer nofollow\">Intel 8086<\/a>. \u0412\u0441\u0435 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u044b \u0441 \u0440\u0430\u0437\u043d\u0438\u0446\u0435\u0439 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0433\u043e\u0434\u0430 \u0434\u0432\u0430-\u0442\u0440\u0438, \u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0440\u043e\u0432\u0435\u0441\u043d\u0438\u043a\u0430\u043c\u0438.<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/users\/AGalilov\/articles\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/a> \u0443\u0434\u043e\u0441\u0442\u043e\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441\u0442\u0430\u0440\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0447\u0442\u043e \u043d\u0435\u043c\u0430\u043b\u043e \u0443\u0434\u0438\u0432\u043b\u044f\u0435\u0442: 16-\u0431\u0438\u0442\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 8086 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f x86-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c\u0438 CPU. \u0412 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, Z80 \u0438 \u0435\u0433\u043e \u043a\u043b\u043e\u043d\u044b \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432 \u0441\u0432\u043e\u0451\u043c \u043f\u0435\u0440\u0432\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u043d\u043e \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u043b\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Z80 \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c\u0438. \u041f\u043e\u0441\u0435\u043c\u0443, \u0430\u0432\u0442\u043e\u0440 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u0443\u044e, \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e, \u0447\u0430\u0441\u0442\u044c \u043f\u043e 8086.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0435\u0441\u043b\u0438 \u0437\u0432\u0451\u0437\u0434\u044b \u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0438 \u0441\u043e\u0439\u0434\u0443\u0442\u0441\u044f \u043c\u0435\u0436 \u0441\u043e\u0431\u043e\u0439, \u0431\u0443\u0434\u0443\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0430\u0437\u043d\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 amd64. 32-\u0431\u0438\u0442\u043d\u044b\u0435 \u0438 64-\u0431\u0438\u0442\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b x86 &#171;\u0440\u0430\u0441\u0442\u0443\u0442&#187; \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u0433\u043e 16-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430, \u0437\u043d\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u043c.<\/p>\n<h2>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/h2>\n<p>\u041d\u0430\u0441 \u0436\u0434\u0451\u0442 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u041c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0446\u0438\u043a\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 &#171;\u0437\u043d\u0430\u044e\u0449\u0438\u043c\u0438&#187; \u043e \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u043c \u043a\u043e\u0434\u0435, \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044e\u0449\u0435\u043c \u0437\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041f\u043e \u0445\u043e\u0434\u0443 \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u043d\u044b \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c, \u043a\u0440\u043e\u043c\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/902412\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>.<\/p>\n<p><a href=\"https:\/\/raw.githubusercontent.com\/galilov\/PreemptiveMultitasking\/refs\/heads\/ForFlatAssembler\/demo.asm\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430<\/a> \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 <a href=\"https:\/\/flatassembler.net\/\" rel=\"noopener noreferrer nofollow\"><strong>Flat Assembler<\/strong><\/a> \u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043c\u0435\u0442\u043e\u043a. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Flat Assembler \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u0430 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f. \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0438, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u0441 Microsoft Macro Assembler \u0438\u043b\u0438 Borland Turbo Assembler, \u043d\u0435 \u0443\u0432\u0438\u0434\u044f\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0433\u043e, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"assembly\">mov    [es:bx], ax    ; \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e mov es:[bx], ax mov    [name], ax     ; \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e mov name, ax \u0432 masm\/tasm mov    name, ax       ; \u043e\u0448\u0438\u0431\u043a\u0430! \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c [name] mov    ax, name       ; \u044d\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e mov ax, offset name jmp    dword [handler] ; \u0437\u0434\u0435\u0441\u044c dword \u0432\u043c\u0435\u0441\u0442\u043e dword ptr \u0432 indirect far jump or call<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0442\u043e\u0436\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u0430\u0447\u0435:<\/p>\n<pre><code class=\"assembly\">TimerVector = 8h     ; \u0432\u043c\u0435\u0441\u0442\u043e TimerVector equ 8h<\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u0442\u043e\u0447\u043a\u0438. \u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440 \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u0430 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0439 \u0432\u0432\u0435\u0440\u0445 \u043f\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0443 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0438 \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439:<\/p>\n<pre><code class=\"assembly\">MyProc1:            ; \"Normal\" label .ThisIsALocalLabel: ; Local label in scope between two neares\u0435 normal lables   cmp    ax, cx   ret  MyProc2:   ret<\/code><\/pre>\n<p><a href=\"https:\/\/flatassembler.net\/docs.php\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u043f\u043e Flat assembler.<\/p>\n<p>Flat assembler \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 DOS, Linux, Windows \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<h2>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0423 \u043d\u0430\u0441 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0443\u0441\u043a\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0443\u0441\u043e\u043a &#171;\u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f&#187; \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 &#171;\u0434\u0443\u043c\u0430\u0435\u0442&#187;, \u0447\u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0441\u0432\u043e\u0438\u043c\u0438, \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u043c\u0438, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u0430\u0437\u043e\u0432\u0451\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0434\u0430 \u0432 \u0446\u0438\u043a\u043b\u0435 <strong>\u043d\u0438\u0442\u044c\u044e<\/strong>. <\/p>\n<blockquote>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d <strong>\u043f\u043e\u0442\u043e\u043a<\/strong> \u0432 \u0442\u043e\u043c \u0436\u0435 \u0441\u0430\u043c\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435, \u0447\u0442\u043e \u0438 <strong>\u043d\u0438\u0442\u044c<\/strong>: \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u043d\u0438\u0442\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, &#171;\u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c&#187; \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 &#171;\u043c\u043d\u043e\u0433\u043e\u043d\u0438\u0442\u0435\u0432\u043e\u0441\u0442\u044c&#187; (<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D0%BD%D0%BE%D0%B3%D0%BE%D0%BF%D0%BE%D1%82%D0%BE%D1%87%D0%BD%D0%BE%D1%81%D1%82%D1%8C\" rel=\"noopener noreferrer nofollow\">multithreading<\/a>).<\/p>\n<\/blockquote>\n<p>\u041a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u043d\u0438\u0442\u0435\u0439 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u044f\u0434\u0440\u0435? \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043d\u043e \u043c\u044b \u043b\u0451\u0433\u043a\u0438\u0445 \u043f\u0443\u0442\u0435\u0439 \u043d\u0435 \u0438\u0449\u0435\u043c.<\/p>\n<h2>\u0412\u0437\u0433\u043b\u044f\u0434 \u0438\u0437\u0434\u0430\u043b\u0435\u043a\u0430<\/h2>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u043a\u0435 \u043d\u0438\u0436\u0435 (\u0440\u0438\u0441. 1) \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0439 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438. \u041e\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u043d\u0438\u0437, \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041d\u0430\u0434\u043f\u0438\u0441\u0438 \u043f\u043e\u0434 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430\u043c\u0438 &#8212; \u0441\u043e\u0431\u044b\u0442\u0438\u044f, &#171;\u043f\u0440\u043e\u0432\u043e\u0446\u0438\u0440\u0443\u044e\u0449\u0438\u0435&#187; \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0438\u0441. 1. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0438 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a <s>\u0448\u0430\u043c\u043f\u0443\u0440\u0430\u043c \u0438 \u0441\u043e\u0441\u0438\u0441\u043a\u0430\u043c<\/s> \u043b\u0438\u043d\u0438\u044f\u043c \u0436\u0438\u0437\u043d\u0438 \u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041b\u0438\u043d\u0438\u0438 \u0436\u0438\u0437\u043d\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u043d\u043a\u0442\u0438\u0440\u043e\u043c, \u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f &#8212; \u0443\u0437\u043a\u0438\u043c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u043d\u0430 \u043b\u0438\u043d\u0438\u0438 \u0436\u0438\u0437\u043d\u0438.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f &#8212; \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. \u041b\u0438\u043d\u0438\u044f \u0436\u0438\u0437\u043d\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u0438\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u0434\u043b\u044f \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442: <strong>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432<\/strong>, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0444\u043b\u0430\u0433\u043e\u0432 <code>FLAGS<\/code>, <strong>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/strong> (\u0443 \u043d\u0430\u0441 \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0438\u0445 \u043d\u0435\u0442, \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438), <strong>\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430<\/strong>.<\/p>\n<p>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0432 <strong>\u043e\u0431\u044a\u0435\u043a\u0442\u044b<\/strong>. \u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043e\u043d\u0438 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0440\u0430\u0441\u043d\u044b\u043c\u0438 \u043d\u0430\u0434\u043f\u0438\u0441\u044f\u043c\u0438. \u0418\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, <s>\u0448\u0430\u043c\u043f\u0443\u0440 \u0438 \u0441\u043e\u0441\u0438\u0441\u043a\u0438<\/s> \u043b\u0438\u043d\u0438\u044f \u0436\u0438\u0437\u043d\u0438 \u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u0442\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p> <strong>Main code<\/strong> &#8212; \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043d\u0438\u0442\u0435\u0439. \u0412 \u044d\u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043d\u0438\u0442\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p> <strong>Switcher<\/strong> &#8212; \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043d\u0438\u0442\u0435\u0439. \u0412 \u043d\u0451\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0438\u043b\u0438, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u0442\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>T1, T2, T3<\/strong> &#8212; \u0441\u0430\u043c\u0438 \u043d\u0438\u0442\u0438. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0445 \u0437\u0434\u0435\u0441\u044c \u0442\u0440\u0438. \u041a\u0430\u0436\u0434\u0430\u044f \u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0435\u043a\u0438\u0439 \u043a\u043e\u0434 \u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0437\u0430\u0446\u0438\u043a\u043b\u0435\u043d\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u043b\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u043d\u0438\u0442\u0438. \u041f\u043e\u0437\u0434\u043d\u0435\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u044d\u0442\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0412\u0437\u0433\u043b\u044f\u0434 \u043f\u043e\u0431\u043b\u0438\u0436\u0435: \u0438\u0434\u0435\u0439\u043a\u0430<\/h2>\n<p>\u041a\u0430\u043a \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430? \u041e\u0442\u0432\u0435\u0442 \u0435\u0441\u0442\u044c \u0443 \u043c\u0435\u043d\u044f, \u0438 \u043e\u043d \u0434\u043e \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u0431\u0430\u043d\u0430\u043b\u0435\u043d: \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0430\u0439\u043c\u0435\u0440\u0430. \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0434 \u043d\u0438 \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u0439, \u0435\u0441\u043b\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b \u0441\u0431\u0440\u043e\u0441\u043e\u043c \u0444\u043b\u0430\u0433\u0430 <code>IF<\/code> \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 <code>FLAGS<\/code>, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0438\u0442\u0435\u043b\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043e\u0442 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f (<code>ISR<\/code>).<\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/902412\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439, \u0437\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u0438 \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0436\u0435, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0438\u0441. 2. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 8086.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u043b \u0432\u0435\u0440\u043d\u043e: \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u0442\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435\u043c, \u0434\u0430 \u043d\u0435 \u0443\u0441\u043f\u0435\u043b\u0430. \u0412\u044b\u0437\u043e\u0432\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 &#171;\u0440\u0432\u0443\u0442&#187; \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e. \u041e\u043d\u0438 \u0432\u043a\u043b\u0438\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u0440\u0442\u043e\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0435 \u043d\u0430\u0441 \u0431\u043e\u043b\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u043a \u0431\u044b \u0441\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435: \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0435\u043a, \u0430\u0434\u0440\u0435\u0441\u0443\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u043e\u0439 <code>SS:SP<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 <code>FLAGS<\/code>, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 <code>CS<\/code> \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 <code>IP<\/code>.<\/p>\n<blockquote>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0432 \u0441\u0442\u0435\u043a \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0435\u0433\u0438\u0441\u0442\u0440 <code>SP<\/code> \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u043d\u0430 2 (\u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043b\u043e\u0432\u0430), \u0437\u0430\u0442\u0435\u043c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>SS \u00d7 4 + SP<\/code>  \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e (2 \u0431\u0430\u0439\u0442\u0430).<\/p>\n<\/blockquote>\n<p>\u041d\u0430 \u044d\u0442\u043e \u043c\u044b \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u043c, \u043d\u043e \u043d\u0430\u043c \u0438 \u043d\u0435 \u043d\u0430\u0434\u043e. \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0435\u0431\u0435 \u044d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f. \u041c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438. \u041c\u044b &#8212; \u0443\u043c\u043d\u0438\u0446\u044b!<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0441\u0432\u043e\u044e \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0440\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 <code>IRET<\/code>. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0420\u0438\u0441. 2 \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0438\u0437 \u0441\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0430\u0440\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>CS:IP<\/code> \u0438 <code>FLAGS<\/code>.<\/p>\n<blockquote>\n<p>\u0412\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0441\u0442\u0435\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 (2 \u0431\u0430\u0439\u0442\u0430) \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>SS \u00d7 4 + SP<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c <code>SP<\/code> \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 2 (\u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043b\u043e\u0432\u0430).<\/p>\n<\/blockquote>\n<p><strong>\u0410 \u0432\u043e\u0442 \u0442\u0443\u0442 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c!<\/strong> \u0421\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u0442\u0435\u043a\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u043e\u043c\u0435\u0449\u0451\u043d \u0442\u0443\u0434\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0418 \u0442\u043e\u0433\u0434\u0430 <code>IRET<\/code> \u0432\u0435\u0440\u043d\u0451\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043a\u043e\u0434\u0443, \u043d\u0435 \u0442\u043e\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u0440\u0435\u0440\u0432\u0430\u043d!<\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0435\u0441\u044c, \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u0436\u0435 \u043c\u0435\u0436\u0434\u0443 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0437\u0430\u0446\u0438\u043a\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430, \u0432\u044b\u0434\u0435\u043b\u044f\u044f \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0431\u043b\u043e\u043a\u0443 \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c\u043e\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u043c\u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439.<\/p>\n<h2>\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0448\u0435\u0441\u0442\u0435\u0440\u0451\u043d\u043a\u0438<\/h2>\n<p>\u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u041d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 \u0442\u0440\u0438 <s>\u0433\u0440\u0438\u0431\u043e\u0447\u043a\u0430<\/s> \u0437\u0432\u043e\u043d\u043e\u0447\u043a\u0430 \u0438\u0437 \u043f\u044f\u0442\u0438 \u043f\u043e \u0448\u043a\u0430\u043b\u0435 \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0443\u043b\u0438\u0441\u0442\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0442\u0435\u043a \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043d\u043e\u0432\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f, \u043c\u044b \u043f\u043e\u0439\u0434\u0451\u043c \u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043d\u043e\u0439 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 (\u0420\u0438\u0441. 3).<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0438\u0441. 3. \u0411\u043b\u0430\u0433\u043e\u0441\u043b\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u0434\u0442\u0438 \u0432\u0435\u0440\u043d\u044b\u043c \u043f\u0443\u0442\u0451\u043c. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a <a href=\"https:\/\/neolurk.org\/wiki\/%D0%92%D0%B5%D1%80%D0%BD%D0%BE%D0%B9_%D0%B4%D0%BE%D1%80%D0%BE%D0%B3%D0%BE%D0%B9_%D0%B8%D0%B4%D1%91%D1%82%D0%B5,_%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D0%B8%D1%89%D0%B8\" rel=\"noopener noreferrer nofollow\">https:\/\/neolurk.org\/wiki\/\u0412\u0435\u0440\u043d\u043e\u0439_\u0434\u043e\u0440\u043e\u0433\u043e\u0439_\u0438\u0434\u0451\u0442\u0435,_\u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0438<\/a>!<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043d\u0430\u0431\u0434\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u0442\u0435\u043a\u043e\u043c, \u0438 \u0442\u043e\u0433\u0434\u0430, \u043f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f, \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043a \u043a\u043e\u0434\u0443 \u043d\u0438\u0442\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043f\u0430\u0434\u0451\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0441\u0442\u0435\u043a, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u044d\u0442\u043e\u0439 \u0441\u0430\u043c\u043e\u0439 \u043d\u0438\u0442\u0438.<\/p>\n<p>\u041d\u0430 \u0440\u0438\u0441. 4 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438\u0437 \u0442\u0440\u0451\u0445 \u043d\u0438\u0442\u0435\u0439 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0438\u0441. 4. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u043e\u0432 \u043d\u0438\u0442\u0435\u0439.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 <strong>\u0436\u0435\u043b\u0442\u043e\u0432\u0430\u0442\u0435\u043d\u044c\u043a\u0438\u0445 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430\u0445<\/strong> \u0443 \u043d\u0430\u0441 \u0436\u0438\u0432\u0443\u0442 \u0442\u0440\u0438 \u043d\u0438\u0442\u0438: <code>Thread1<\/code>, <code>Thread2<\/code>, <code>Thread3<\/code>. \u041f\u043e\u043b\u0435 <code>Offset<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u043e\u0433 \u0431\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u0434 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043d\u0438\u0442\u0438. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u044f \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0421\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u043d\u0438\u0442\u0435\u0439 <strong>\u0433\u043e\u043b\u0443\u0431\u044b\u043c\u0438 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430\u043c\u0438<\/strong> \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u0438\u0442\u0438 \u0441\u0432\u043e\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a \u0441\u0445\u0435\u043c\u0435 \u0431\u043b\u043e\u043a\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a &#171;High byte | Low byte&#187;. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u043e\u0432, \u043a\u0430\u0436\u0434\u043e\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 2 \u0431\u0430\u0439\u0442\u0430. \u0421\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0435\u043a\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c <code>Offset<\/code> \u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0442 \u0441\u043d\u0438\u0437\u0443 \u0432\u0432\u0435\u0440\u0445. \u0422\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0435\u043a\u0430: \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u043d \u0440\u0430\u0441\u0442\u0451\u0442 \u0432\u043d\u0438\u0437, \u043a \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c (\u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f\u043c). \u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043d\u0438\u0442\u044f\u043c\u0438, \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f <code>Offset<\/code> \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u0430\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b. \u041e\u043d\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0440\u0443\u0433\u0438\u043c\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u0442\u0435\u043a \u0440\u0430\u0441\u0442\u0451\u0442 \u0432\u043d\u0438\u0437<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u0441\u0442\u0435\u043a \u0440\u0430\u0441\u0442\u0451\u0442 &#171;\u0432\u043d\u0438\u0437&#187;, \u0442\u043e \u0432\u043e\u0442 \u0447\u0442\u043e \u0438\u043c\u0435\u044e\u0442 \u0432\u0432\u0438\u0434\u0443: \u043f\u043e \u043c\u0435\u0440\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f PUSH) \u0441\u0442\u0435\u043a \u0440\u0430\u0441\u0442\u0435\u0442 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0432\u0435\u0434\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430-\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0441\u0442\u0435\u043a\u0430 SP \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f.  \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <\/p>\n<\/div>\n<\/details>\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-459568","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459568","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=459568"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459568\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=459568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=459568"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=459568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}