{"id":294645,"date":"2019-09-13T09:00:29","date_gmt":"2019-09-13T09:00:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=294645"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=294645","title":{"rendered":"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u043d\u043e\u0439 Unix \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 OS \u2014 GDT &amp; IDT (5)"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.<br \/>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 Intel i386.<br \/>  \u0410 \u0438\u043c\u0435\u043d\u043d\u043e: \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 (make, gcc, gas). \u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 (multiboot). \u0417\u0430\u043f\u0443\u0441\u043a (qemu). \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 C (strcpy, memcpy, strext).<br \/>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 C (sprintf, strcpy, strcmp, strtok, va_list &#8230;). \u0421\u0431\u043e\u0440\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u044f\u0434\u0440\u0430 \u0438 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>  \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u044f\u0434\u0440\u0430. \u0412\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u044c. \u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b (kprintf, kpanic, kassert).<br \/>  \u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c, \u043a\u0443\u0447\u0430 (kmalloc, kfree).<br \/>  \u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 (GDT, IDT, PIC, syscall). \u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<br \/>  \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c (\u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446).<br \/>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441. \u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a. \u041c\u043d\u043e\u0433\u043e\u0437\u0430\u0434\u0430\u0447\u043d\u043e\u0441\u0442\u044c. \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b (kill, exit, ps).<br \/>  \u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u044f\u0434\u0440\u0430 (initrd), elf \u0438 \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b (exec).<br \/>  \u0414\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b (ioctl, fopen, fread, fwrite). \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 C (fopen, fclose, fprintf, fscanf).<br \/>  \u041e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f \u044f\u0434\u0440\u0430.<br \/>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0437\u0430\u0449\u0438\u0442\u044b (ring3). \u0421\u0435\u0433\u043c\u0435\u043d\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 (tss).<\/p>\n<h4>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044f<\/h4>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 Intel \u0435\u0441\u0442\u044c 2 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b: Protected Mode x32 \u0438 IA-32e x64.<br \/>  \u0412\u043e\u043e\u0431\u0449\u0435 \u0417\u0443\u0431\u043a\u043e\u0432 \u043e\u0431 \u044d\u0442\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043f\u0438\u0448\u0435\u0442, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u0445\u043e\u0442\u044f \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0438 Intel Manual \u043c\u043e\u0436\u043d\u043e, \u043e\u043d \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439, \u043d\u043e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0439 \u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439.<br \/>  \u0423 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043c \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0435\u0433\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438 \u0447\u0438\u0442\u0430\u0442\u044c.<br \/>  \u0420\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u043a\u0440\u0430\u0442\u0446\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b.<br \/>  \u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u0430\u044f. \u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u0432\u0441\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e \u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0444\u0438\u0437\u0447\u0435\u0441\u043a\u0438\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0430\u0437\u044b \u0441\u0435\u0433\u043c\u0435\u0442\u043d\u044b\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0440\u0430\u0432\u043d\u044b \u043d\u0443\u043b\u044e, \u0438\u0431\u043e \u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435.<br \/>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0435\u0436\u0438\u043c\u0430 \u044f\u0434\u0440\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0440\u0438 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043f\u0430\u043c\u044f\u0442\u044c: \u0434\u043b\u044f \u043a\u043e\u0434\u0430, \u0441\u0442\u0435\u043a\u0430 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0437\u0430\u0449\u0438\u0442\u044b.<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u043a\u043e\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0431\u0430\u0437\u0443 \u043d\u0443\u043b\u044c \u0438 \u043b\u0438\u043c\u0438\u0442 \u0430\u0434\u0440\u0435\u0441\u0443\u0435\u043c\u044b\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430. \u0421\u0442\u0435\u043a \u0440\u0430\u0441\u0442\u0435\u0442 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438, \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0444\u043b\u0430\u0433 \u0432 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0435.<br \/>  \u0422\u0430\u043a, \u0442\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u043c\u044b \u0430\u0434\u0440\u0435\u0441\u0443\u0435\u043c \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e:<\/p>\n<pre><code class=\"cpp\">\/*  * Global descriptor table entry  *\/ struct GDT_entry_t {     u16 limit_low: 16;     u16 base_low: 16;     u8 base_middle: 8;     u8 type: 4; \/* whether code (0b1010), data (0b0010), stack (0b0110) or tss (0b1001) *\/     u8 s: 1; \/* whether system descriptor *\/     u8 dpl: 2; \/* privilege level *\/     u8 p: 1; \/* whether segment prensent *\/     u8 limit_high: 4;     u8 a: 1; \/* reserved for operation system *\/     u8 zero: 1; \/* zero *\/     u8 db: 1; \/* whether 16 or 32 segment *\/     u8 g: 1; \/* granularity *\/     u8 base_high: 8; } attribute(packed); <\/code><\/pre>\n<p>  \u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u043e\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 (cs, ds, ss) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0432\u043e\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0432 GDT, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0447\u0442\u043e-\u0442\u043e \u043f\u0438\u0448\u0435\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u044e \u043a\u043e\u0434\u0430, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0438\u0431\u043e \u0442\u0430\u043c \u0432 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0437\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u0437\u0430\u043f\u0438\u0441\u0438.<br \/>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0432\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 GDTR \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430:<\/p>\n<pre><code class=\"cpp\">\/*  * Global descriptor table pointer  *\/ struct GDT_pointer_t {     u16 limit;     u32 base; } attribute(packed); <\/code><\/pre>\n<p>  \u041b\u0438\u043c\u0438\u0442 \u2014 \u043a\u043e\u043d\u0435\u0446 \u0442\u0430\u0431\u043b\u0438\u0446\u044b GDT \u043c\u0438\u043d\u0443\u0441 1, \u0431\u0430\u0437\u0430 \u2014 \u0435\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<br \/>  GDT \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0442\u0430\u043a:<\/p>\n<p>  <code>\/*<br \/>   * Load global descriptor table<br \/>   * void asm_gdt_load(void *gdt_ptr)<br \/>   *\/<br \/>  asm_gdt_load:<br \/>   mov 4(%esp),%eax # eax = gdt_ptr<br \/>   lgdt (%eax)<br \/>   mov $0x10,%eax<br \/>   mov %ax,%ds<br \/>   mov %ax,%es<br \/>   mov %ax,%fs<br \/>   mov %ax,%gs<br \/>   mov %ax,%ss<br \/>   jmp $0x08,$asm_gdt_load_exit<br \/>  asm_gdt_load_exit:<br \/>   ret<br \/>  <\/code><\/p>\n<p>  \u0418 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432\u043e \u0432\u0441\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0434\u0440\u0430 \u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435 \u043d\u0430 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u043a\u043e\u043b\u044c\u0446\u043e \u0437\u0430\u0449\u0438\u0442\u044b).<br \/>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0439 \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438, \u043d\u043e \u043e \u043d\u0435\u0439 \u043f\u043e\u0437\u0436\u0435.<br \/>  \u041a\u0441\u0442\u0430\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0438 \u043f\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 multiboot \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e GDT, \u0445\u043e\u0442\u044f \u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u043e \u0441\u0430\u043c\u0438, \u043c\u043e\u043b \u0442\u0430\u043a \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435.<br \/>  \u041a\u0430\u043a \u0432\u0441\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0438 \u0432 \u0432\u0438\u0434\u0435\u043e\u0443\u0440\u043e\u043a\u0435.<\/p>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439<\/h4>\n<p>  \u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 GDT \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 IDTR, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u043e \u0443\u0436\u0435 \u043d\u0430 IDT.<br \/>  \u0421\u0430\u043c\u0430 \u0436\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438:<\/p>\n<pre><code class=\"cpp\">\/*  * Interrupt table entry  *\/ struct IDT_entry_t {     u16 offset_lowerbits;     u16 selector;     u8 zero;     u8 type_attr;     u16 offset_higherbits; }; <\/code><\/pre>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0438\u043f\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0448\u043b\u044e\u0437 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f. \u041b\u043e\u0432\u0443\u0448\u043a\u0438 \u0438 \u0448\u043b\u044e\u0437\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u043b\u0438\u0436\u0435 \u043a TSS \u0438 \u043a\u043e\u043b\u044c\u0446\u0430\u043c \u0437\u0430\u0449\u0438\u0442\u044b.<br \/>  \u0414\u0430\u0432\u0430\u0439 \u0441 \u0442\u043e\u0431\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u0442\u0438\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438. \u0418\u0445 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438 \u0437\u0430\u0431\u044b\u0442\u044c.<\/p>\n<pre><code class=\"cpp\">\/*  * Api  *\/ extern void gdt_init(); extern void idt_init(); <\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u044c\u044f\u0432\u0438\u043c \u0441\u0430\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439, \u0437\u0430\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0435 \u0432 \u0437\u0430\u043f\u0438\u0441\u0438 IDT.<br \/>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<pre><code class=\"cpp\">\/*  * Api - IDT  *\/ extern void ih_double_fault(); extern void ih_general_protect(); extern void ih_page_fault(); extern void ih_alignment_check(); extern void asm_ih_double_fault(); extern void asm_ih_general_protect(); extern void asm_ih_page_fault(); extern void asm_ih_alignment_check(); <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0430\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b:<\/p>\n<pre><code class=\"cpp\">\/*  * Api - IRQ  *\/ extern void ih_keyboard(); extern void asm_ih_keyboard(); <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 IDT.<br \/>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">extern void idt_init() {     size_t idt_address;     size_t idt_ptr[2];      pic_init();      \/* fill idt *\/     idt_fill_entry(INT_DOUBLE_FAULT, (size_t)asm_ih_double_fault);     idt_fill_entry(INT_GENERAL_PROTECT, (size_t)asm_ih_general_protect);     idt_fill_entry(INT_ALIGNMENT_CHECK, (size_t)asm_ih_alignment_check);     idt_fill_entry(INT_KEYBOARD, (size_t)asm_ih_keyboard);      \/* load idt *\/     idt_address = (size_t)IDT;     idt_ptr[0] = (LOW_WORD(idt_address) &lt;&lt; 16) + (sizeof(struct IDT_entry_t) * IDT_SIZE);     idt_ptr[1] = idt_address &gt;&gt; 16;     asm_idt_load(idt_ptr); } <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043c\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f.<br \/>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0432\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 IDTR \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0441 \u0431\u0430\u0437\u043e\u0439 \u0438 \u043b\u0438\u043c\u0438\u0442\u043e\u043c:<\/p>\n<p>  <code>\/*<br \/>   * Load interrupt table<br \/>   * void asm_idt_load(unsigned long *addr)<br \/>   *\/<br \/>  asm_idt_load:<br \/>   push %edx<br \/>   mov 8(%esp), %edx<br \/>   lidt (%edx)<br \/>   pop %edx<br \/>   ret<br \/>  <\/code><\/p>\n<p>  \u041b\u0438\u043c\u0438\u0442\u044b \u043d\u0443\u0436\u043d\u044b \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<br \/>  \u041f\u043e\u0440\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b:<\/p>\n<p>  <code>\/*<br \/>   * Handle IRQ1<br \/>   * void asm_ih_keyboard(unsigned int)<br \/>   *\/<br \/>  asm_ih_keyboard:<br \/>   pushal<br \/>   call ih_keyboard<br \/>   popal<br \/>   iretl<br \/>  <\/code><\/p>\n<p>  \u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0434\u0430\u043b\u0435\u0435 \u0438 \u0432\u0435\u0437\u0434\u0435 \u043f\u043e \u043a\u043e\u0434\u0443 \u00ab\u043d\u0438\u0436\u043d\u0438\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b\u00bb \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b \u00ab\u0432\u0435\u0440\u0445\u043d\u0438\u043c\u00bb \u0432 Linux. \u0410 \u00ab\u0432\u0435\u0440\u0445\u043d\u0438\u0438\u00bb \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u041f\u0440\u0438\u043d\u043e\u0448\u0443 \u0438\u0437\u0432\u0438\u043d\u0435\u043d\u0438\u044f, \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u043e\u0442\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \ud83d\ude00<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0440\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u043c\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443.<br \/>  \u0422\u043e\u0442 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0438\u0436\u043d\u0438\u0445 \u043f\u043e\u043b\u043e\u0432\u0438\u043d \u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0432\u0448\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f.<br \/>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<br \/>  \u041d\u0438\u0436\u043d\u0438\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u043d\u0443\u0436\u043d\u044b \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f, \u043d\u0435 \u0437\u0430\u0442\u043e\u0440\u043c\u0430\u0436\u0438\u0432\u0430\u044f \u0434\u0440\u0443\u0433\u0438\u0435, \u0430 \u043f\u043e\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u0435\u0440\u0445\u043d\u0438\u0445 \u043f\u043e\u043b\u043e\u0432\u0438\u043d \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443, \u0432\u0435\u0434\u044c \u0442\u0430\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0443\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0442\u0435\u0441\u043d\u044f\u0435\u043c (\u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f).<\/p>\n<pre><code class=\"cpp\">\/*  * Api - Keyboard interrupt handler  *\/ extern void ih_keyboard() {     printf(\"[IH]: irq %u\\n\", 1);      u_char status = asm_read_port(KEYBOARD_STATUS_PORT);     if (status &amp; 0x01) {         char keycode = asm_read_port(KEYBOARD_DATA_PORT);          if (keycode &lt; 1) {             goto end;         }          \/* call low half (bottom) interrupt handler *\/     }  end:     asm_write_port(PIC1_CMD_PORT, 0x20); \/* end of interrupt *\/ } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043c\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u044f\u0434\u0440\u0430 \u0431\u0443\u0434\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<h4>\u0421\u0441\u044b\u043b\u043a\u0438<\/h4>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c, <a href=\"https:\/\/www.youtube.com\/watch?v=ZpCU2NZIMqI\">\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0439 \u0432\u0438\u0434\u0435\u043e\u0443\u0440\u043e\u043a \u043a \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a><br \/>  \u0418 \u0441\u043c\u043e\u0442\u0440\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e <a href=\"https:\/\/github.com\/ArseniyBorezkiy\/oc-kernel\">git \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 (\u0442\u0435\u0431\u0435 \u043d\u0443\u0436\u043d\u0430 \u0432\u0435\u0442\u043a\u0430 lesson5)<\/a><\/p>\n<h4>\u0421\u043f\u0438\u0441\u043e\u043a \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/h4>\n<p>  1. James Molloy. Roll your own toy UNIX-clone OS.<br \/>  2. \u0417\u0443\u0431\u043a\u043e\u0432. \u0410\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0434\u043b\u044f DOS, Windows, Unix<br \/>  3. \u041a\u0430\u043b\u0430\u0448\u043d\u0438\u043a\u043e\u0432. \u0410\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e!<br \/>  4. \u0422\u0430\u043d\u0435\u043d\u0431\u0430\u0443\u043c. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430.<br \/>  5. \u0420\u043e\u0431\u0435\u0440\u0442 \u041b\u0430\u0432. \u042f\u0434\u0440\u043e Linux. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/467289\/\"> https:\/\/habr.com\/ru\/post\/467289\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.<br \/>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 Intel i386.<br \/>  \u0410 \u0438\u043c\u0435\u043d\u043d\u043e: \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439.  <\/p>\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-294645","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/294645","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=294645"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/294645\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=294645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=294645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=294645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}