{"id":293627,"date":"2019-08-20T15:00:46","date_gmt":"2019-08-20T15:00:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293627"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293627","title":{"rendered":"\u0413\u0440\u044f\u0437\u043d\u044b\u0435 \u0445\u0430\u043a\u0438 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 6502"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u044e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043c\u043e\u0435\u0433\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e <a href=\"https:\/\/twitter.com\/nurpax\/status\/1159192477598965766\">\u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Commodore 64<\/a>. \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u044b: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b C64 (PRG), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0438\u0441\u0443\u0435\u0442 \u0434\u0432\u0435 \u043b\u0438\u043d\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435. \u041f\u043e\u0431\u0435\u0436\u0434\u0430\u043b \u0442\u043e\u0442, \u0447\u0435\u0439 \u0444\u0430\u0439\u043b \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3f4\/5d1\/afc\/3f45d1afc9817c6530b6b34c44dd0497.png\"><\/div>\n<p>  \u041a\u043e\u043d\u043a\u0443\u0440\u0441\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0442\u0432\u0438\u0442\u0430\u0445 \u0438 \u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0439\u0442\u044b PRG-\u0444\u0430\u0439\u043b\u0430 \u0438 \u0445\u044d\u0448 MD5.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u043f\u0438\u0441\u043e\u043a \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0441\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<ul>\n<li><a href=\"https:\/\/twitter.com\/fsphil\">\u0424\u0438\u043b\u0438\u043f \u0425\u0435\u0440\u043e\u043d<\/a> (<a href=\"https:\/\/github.com\/fsphil\/tinyx\">\u043a\u043e\u0434<\/a>\u00a0\u2014 34 \u0431\u0430\u0439\u0442\u0430, \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c)  <\/li>\n<li><a href=\"https:\/\/twitter.com\/GeirSigmund\">\u0413\u0435\u0439\u0440 \u0421\u0442\u0440\u0430\u0443\u043c\u0435<\/a> (<a href=\"https:\/\/c64prg.appspot.com\/downloads\/lines34b.zip\">\u043a\u043e\u0434<\/a>\u00a0\u2014 34 \u0431\u0430\u0439\u0442\u0430)  <\/li>\n<li><a href=\"https:\/\/twitter.com\/petrih3\">\u041f\u0435\u0442\u0440\u0438 \u0425\u0430\u043a\u043a\u0438\u043d\u0435\u043d<\/a> (<a href=\"https:\/\/github.com\/petrihakkinen\/c64-lines\">\u043a\u043e\u0434<\/a>\u00a0\u2014 37 \u0431\u0430\u0439\u0442)  <\/li>\n<li><a href=\"https:\/\/twitter.com\/laubzega\">\u041c\u0430\u0442\u043b\u0435\u0432 \u0420\u0430\u043a\u0441\u0435\u043d\u0431\u043b\u0430\u0442\u0446<\/a> (<a href=\"https:\/\/gist.github.com\/laubzega\/fb59ee6a3d482feb509dae7b77e925cf\">\u043a\u043e\u0434<\/a>\u00a0\u2014 38 \u0431\u0430\u0439\u0442)  <\/li>\n<li><a href=\"https:\/\/twitter.com\/achrenico\">\u042f\u043d \u0410\u0445\u0440\u0435\u043d\u0438\u0443\u0441<\/a> (<a href=\"https:\/\/twitter.com\/achrenico\/status\/1161383381835362305\">\u043a\u043e\u0434<\/a>\u00a0\u2014 48 \u0431\u0430\u0439\u0442)  <\/li>\n<li><a href=\"https:\/\/twitter.com\/jamie30dbs\">\u0414\u0436\u0435\u0439\u043c\u0438 \u0424\u0443\u043b\u043b\u0435\u0440<\/a> (<a href=\"https:\/\/github.com\/30dbs\/c64x\">\u043a\u043e\u0434<\/a>\u00a0\u2014 50 \u0431\u0430\u0439\u0442)  <\/li>\n<li><a href=\"https:\/\/twitter.com\/dagershman\">\u0414\u044d\u0432\u0438\u0434 \u0410. \u0413\u0435\u0440\u0448\u043c\u0430\u043d<\/a> (<a href=\"http:\/\/c64.dagertech.net\/cgi-bin\/cgiwrap\/c64\/index.cgi?p=xchallenge\/.git;a=tree\">\u043a\u043e\u0434<\/a>\u00a0\u2014 53 \u0431\u0430\u0439\u0442\u0430)  <\/li>\n<li><a href=\"https:\/\/twitter.com\/nurpax\">\u042f\u043d\u043d\u0435 \u0425\u0435\u043b\u043b\u0441\u0442\u0435\u043d<\/a> (<a href=\"https:\/\/gist.github.com\/nurpax\/d429be441c7a9f4a6ceffbddc35a0003\">\u043a\u043e\u0434<\/a>\u00a0\u2014 56 \u0431\u0430\u0439\u0442)<\/li>\n<\/ul>\n<p>  (\u0415\u0441\u043b\u0438 \u044f \u043a\u043e\u0433\u043e-\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u044f \u043e\u0431\u043d\u043e\u0432\u043b\u044e \u0441\u043f\u0438\u0441\u043e\u043a).<\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0442\u0440\u044e\u043a\u0430\u043c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u0432 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0435.<\/p>\n<h1>\u041e\u0441\u043d\u043e\u0432\u044b<\/h1>\n<p>  \u0413\u0440\u0430\u0444\u0438\u043a\u0430C64 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 40&#215;25. \u0424\u0440\u0435\u0439\u043c\u0431\u0443\u0444\u0435\u0440 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430:<\/p>\n<ul>\n<li><code>$0400<\/code> (Screen RAM, 40&#215;25 \u0431\u0430\u0439\u0442)  <\/li>\n<li><code>$d800<\/code> (Color RAM, 40&#215;25 \u0431\u0430\u0439\u0442)<\/li>\n<\/ul>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b, \u0432\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0435 \u0431\u0430\u0439\u0442 \u0432 \u044d\u043a\u0440\u0430\u043d\u043d\u043d\u043e\u0435 \u041e\u0417\u0423, \u0432 <code>$0400<\/code> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>$0400+y*40+x<\/code>). Color RAM \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u0435\u0442\u043b\u043e-\u0441\u0438\u043d\u0438\u043c (\u0446\u0432\u0435\u0442 14): \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0446\u0432\u0435\u0442 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u043b\u0438\u043d\u0438\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u041e\u0417\u0423 \u0446\u0432\u0435\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0442\u044c.<\/p>\n<p>  \u0412\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0446\u0432\u0435\u0442\u0430\u043c\u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0444\u043e\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0451\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u0432 <code>$d020<\/code> (\u0433\u0440\u0430\u043d\u0438\u0446\u0430) \u0438 <code>$d021<\/code> (\u0444\u043e\u043d).<\/p>\n<p>  \u041d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u043b\u0438\u043d\u0438\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043a\u043b\u043e\u043d \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438. \u0412\u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f C, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0438\u0441\u0443\u0435\u0442 \u043b\u0438\u043d\u0438\u0438 \u0438 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u043a\u0440\u0430\u043d\u0430 \u0432 stdout (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>malloc()<\/code>, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 PC):<\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h&gt; #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt;  void dump(const uint8_t* screen) {     const uint8_t* s = screen;     for (int y = 0; y &lt; 25; y++) {         for (int x = 0; x &lt; 40; x++, s++) {             printf(\"%c\", *s == 0xa0 ? '#' : '.');         }         printf(\"\\n\");     } }  void setreg(uintptr_t dst, uint8_t v) { \/\/  *((uint8_t *)dst) = v; }  int main() { \/\/  uint8_t* screenRAM = (uint_8*)0x0400;     uint8_t* screenRAM = (uint8_t *)calloc(40*25, 0x20);      setreg(0xd020, 0); \/\/ Set border color     setreg(0xd021, 0); \/\/ Set background color      int yslope = (25&lt;&lt;8)\/40;     int yf = yslope\/2;     for (int x = 0; x &lt; 40; x++) {         int yi = yf &gt;&gt; 8;         \/\/ First line         screenRAM[x + yi*40] = 0xa0;         \/\/ Second line (X-mirrored)         screenRAM[(39-x) + yi*40] = 0xa0;         yf += yslope;     }      dump(screenRAM); }<\/code><\/pre>\n<p>  \u041a\u043e\u0434\u044b \u044d\u043a\u0440\u0430\u043d\u0430 \u0432\u044b\u0448\u0435: <code>$20<\/code> (\u043f\u0443\u0441\u0442\u043e\u0439) \u0438 <code>$a0<\/code> (\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0431\u043b\u043e\u043a 8\u00d78). \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 ASCII-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441 \u0434\u0432\u0443\u043c\u044f \u043b\u0438\u043d\u0438\u044f\u043c\u0438:<\/p>\n<pre>##....................................## ..#..................................#.. ...##..............................##... .....#............................#..... ......##........................##...... ........##....................##........ ..........#..................#.......... ...........##..............##........... .............#............#............. ..............##........##.............. ................##....##................ ..................#..#.................. ...................##................... ..................#..#.................. ................##....##................ ..............##........##.............. .............#............#............. ...........##..............##........... ..........#..................#.......... ........##....................##........ ......##........................##...... .....#............................#..... ...##..............................##... ..#..................................#.. ##....................................##<\/pre>\n<p>  \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435:<\/p>\n<pre><code class=\"plaintext\">!include \"c64.asm\"  +c64::basic_start(entry)  entry: {     lda #0      ; black color     sta $d020   ; set border to 0     sta $d021   ; set background to 0      ; clear the screen     ldx #0     lda #$20 clrscr: !for i in [0, $100, $200, $300] {     sta $0400 + i, x }     inx     bne clrscr      ; line drawing, completely unrolled     ; with assembly pseudos     lda #$a0      !for i in range(40) {         !let y0 = Math.floor(25\/40*(i+0.5))         sta $0400 + y0*40 + i         sta $0400 + (24-y0)*40 + i     } inf: jmp inf  ; halt }<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f PRG \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 286 \u0431\u0430\u0439\u0442.<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0430 C64 \u0441 \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 ROM. \u0422\u0430\u043c \u043a\u0443\u0447\u0430 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u044d\u043a\u0440\u0430\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>JSR $E544<\/code>.<\/p>\n<p>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043d\u0430 8-\u0431\u0438\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u0442\u0438\u043f\u0430 6502 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u043c\u0438 \u0438 \u0441\u044a\u0435\u0434\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0431\u0430\u0439\u0442. \u0423 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u0442 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432\u0440\u043e\u0434\u0435 <code>y*40+i<\/code> \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043b\u0438\u0431\u043e \u043a\u0443\u0447\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0434\u0432\u0438\u0433\u043e\u0432, \u043b\u0438\u0431\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u043e\u0436\u0435 \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u0431\u0430\u0439\u0442\u044b. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 40, \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u043a\u0443\u0440\u0441\u043e\u0440 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"plaintext\">    int yslope = (25&lt;&lt;8)\/40;     int yf = yslope\/2;     uint8_t* dst = screenRAM;     for (int x = 0; x &lt; 40; x++) {         dst[x] = 0xa0;         dst[(39-x)] = 0xa0;         yf += yslope;         if (yf &amp; 256) { \/\/ Carry set?             dst += 40;             yf &amp;= 255;         }     }<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u043a \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u043e\u043c\u0443 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0443 <code>yf<\/code>, \u0430 \u043a\u043e\u0433\u0434\u0430 8-\u0431\u0438\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0444\u043b\u0430\u0433 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c 40.<\/p>\n<p>  \u0412\u043e\u0442 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435:<\/p>\n<pre><code class=\"plaintext\">!include \"c64.asm\"  +c64::basic_start(entry)  !let screenptr = $20 !let x0 = $40 !let x1 = $41 !let yf = $60  entry: {         lda #0         sta x0         sta $d020         sta $d021          ; kernal clear screen         jsr $e544          ; set screenptr = $0400         lda #&lt;$0400         sta screenptr+0         lda #&gt;$0400         sta screenptr+1          lda #80         sta yf          lda #39         sta x1 xloop:         lda #$a0         ldy x0         ; screenRAM[x] = 0xA0         sta (screenptr), y         ldy x1         ; screenRAM[39-x] = 0xA0         sta (screenptr), y          clc         lda #160  ; line slope         adc yf         sta yf         bcc no_add          ; advance screen ptr by 40         clc         lda screenptr         adc #40         sta screenptr         lda screenptr+1         adc #0         sta screenptr+1  no_add:         inc x0         dec x1         bpl xloop  inf:    jmp inf }<\/code><\/pre>\n<p>  \u0421 82 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u043e\u043d \u0435\u0449\u0451 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u0435\u043d\u043d\u044b\u0439. \u041e\u0434\u043d\u0430 \u0438\u0437 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u00a0\u2014 16-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>screenptr<\/code> \u0434\u043b\u044f \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e-\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u0439 \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"plaintext\">        ; set screenptr = $0400         lda #&lt;$0400         sta screenptr+0         lda #&gt;$0400         sta screenptr+1<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c <code>screenptr<\/code> \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c 40:<\/p>\n<pre><code class=\"plaintext\">        ; advance screen ptr by 40         clc         lda screenptr         adc #40         sta screenptr         lda screenptr+1         adc #0         sta screenptr+1<\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 16-\u0431\u0438\u0442\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<h1>\u0422\u0440\u044e\u043a 1. \u041f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0430!<\/h1>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043b\u0438\u043d\u0438\u044e \u0432 \u044d\u043a\u0440\u0430\u043d\u043d\u043e\u043c \u041e\u0417\u0423, \u0440\u0438\u0441\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 Y=24 \u0438 \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d \u0432\u0432\u0435\u0440\u0445, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 ROM \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>JSR $E8EA<\/code>!<\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f xloop:<\/p>\n<pre><code class=\"plaintext\">        lda #0         sta x0         lda #39         sta x1 xloop:         lda #$a0         ldx x0         ; hardcoded absolute address to last screen line         sta $0400 + 24*40, x         ldx x1         sta $0400 + 24*40, x          adc yf         sta yf         bcc no_scroll         ; scroll screen up!         jsr $e8ea no_scroll:         inc x0         dec x1         bpl xloop<\/code><\/pre>\n<p>  \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/63f\/081\/6a6\/63f0816a6728ec839de0197b6e0a3179.gif\"><\/div>\n<p>  \u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u043e\u0438\u0445 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u0442\u0440\u044e\u043a\u043e\u0432 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. \u0415\u0433\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430.<\/p>\n<h1>\u0422\u0440\u044e\u043a 2. \u0421\u0430\u043c\u043e\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0449\u0438\u0439\u0441\u044f \u043a\u043e\u0434<\/h1>\n<p>  \u041a\u043e\u0434 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"plaintext\">        ldx x1         ; hardcoded absolute address to last screen line         sta $0400 + 24*40, x         ldx x0         sta $0400 + 24*40, x         inc x0         dec x1<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0437 14 \u0431\u0430\u0439\u0442:<\/p>\n<pre><code class=\"plaintext\">0803: A6 22               LDX $22 0805: 9D C0 07            STA $07C0,X 0808: A6 20               LDX $20 080A: 9D C0 07            STA $07C0,X 080D: E6 22               INC $22 080F: C6 20               DEC $20<\/code><\/pre>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0430\u043c\u043e\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u0434\u0430 (SMC) \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e:<\/p>\n<pre><code class=\"plaintext\">        ldx x1         sta $0400 + 24*40, x addr0:  sta $0400 + 24*40         ; advance the second x-coord with SMC         inc addr0+1         dec x1<\/code><\/pre>\n<p>  \u2026\u0447\u0442\u043e \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 13 \u0431\u0430\u0439\u0442:<\/p>\n<pre><code class=\"plaintext\">0803: A6 22               LDX $22 0805: 9D C0 07            STA $07C0,X 0808: 8D C0 07            STA $07C0 080B: EE 09 08            INC $0809 080E: C6 22               DEC $22<\/code><\/pre>\n<p>  <\/p>\n<h1>\u0422\u0440\u044e\u043a 3. \u042d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f &#8216;power on&#8217;<\/h1>\n<p>  \u0412 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0435 \u0441\u0447\u0438\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0438\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0441\u0440\u0435\u0434\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e \u0447\u0435\u0440\u0442\u0451\u0436 \u043b\u0438\u043d\u0438\u0439\u00a0\u2014 \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f C64, \u0438 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0447\u0438\u0441\u0442\u043e\u043c\u0443 \u0432\u044b\u0445\u043e\u0434\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 BASIC. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0451, \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 PRG, \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430\u0445:<\/p>\n<ul>\n<li>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u044b A, X, Y \u043f\u0440\u0438\u043d\u044f\u0442\u044b \u0437\u0430 \u043d\u0443\u043b\u0438  <\/li>\n<li>\u0412\u0441\u0435 \u0444\u043b\u0430\u0433\u0438 CPU \u043e\u0447\u0438\u0449\u0435\u043d\u044b  <\/li>\n<li>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <a href=\"https:\/\/www.c64-wiki.com\/wiki\/Zeropage\">zeropage<\/a> (\u0430\u0434\u0440\u0435\u0441\u0430 <code>$00<\/code>&#8212;<code>$ff<\/code>)<\/li>\n<\/ul>\n<p>  \u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 KERNAL ROM \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u044b\u043c\u0438 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u043c\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0430\u043c\u0438: \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 CPU, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f zeropage \u0438 \u0442.\u00a0\u0434.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u043f\u043e\u0438\u0449\u0435\u043c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0df\/43f\/93c\/0df43f93c58a142911607d3ba5ba44dd.png\"><\/div>\n<p>  Zeropage \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:<\/p>\n<ul>\n<li><code>$d5<\/code>: 39\/$27 == \u0434\u043b\u0438\u043d\u0430 \u043b\u0438\u043d\u0438\u0438 \u2212 1  <\/li>\n<li><code>$22<\/code>: 64\/$40 == \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430 \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043b\u0438\u043d\u0438\u0438<\/li>\n<\/ul>\n<p>  \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0439\u0442 \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"plaintext\">!let x0 = $20         lda #39      ; 0801: A9 27    LDA #$27         sta x0       ; 0803: 85 20    STA $20 xloop:         dec x0       ; 0805: C6 20    DEC $20         bpl xloop    ; 0807: 10 FC    BPL $0805<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <code>$d5<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 39, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0443 <code>x0<\/code>, \u0438\u0437\u0431\u0430\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u043f\u0430\u0440\u044b LDA\/STA:<\/p>\n<pre><code class=\"plaintext\">!let x0 = $d5         ; nothing here! xloop:         dec x0       ; 0801: C6 D5    DEC $D5         bpl xloop    ; 0803: 10 FC    BPL $0801<\/code><\/pre>\n<p>  \u041f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430 \u0424\u0438\u043b\u0438\u043f \u0432 <a href=\"https:\/\/github.com\/fsphil\/tinyx\/blob\/master\/x34\/x34.s\">\u0441\u0432\u043e\u0451\u043c \u043a\u043e\u0434\u0435<\/a> \u0434\u043e\u0432\u043e\u0434\u0438\u0442 \u044d\u0442\u043e \u0434\u043e \u043a\u0440\u0430\u0439\u043d\u043e\u0441\u0442\u0438. \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 <code>$07C0<\/code> (==<code>$0400+24*40<\/code>). \u042d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0442 \u0432 zeropage \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0431\u043e\u0447\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043a\u0440\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u0438\u0437 ROM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f zeropage, \u0430\u0434\u0440\u0435\u0441\u0430 <code>$D1-$D2<\/code> \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>$07C0<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0432\u043c\u0435\u0441\u0442\u043e <code>STA $07C0,x<\/code> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0443\u044e \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e-\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u0443\u044e \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044e <code>STA ($D1),y<\/code>.<\/p>\n<h1>\u0422\u0440\u044e\u043a 4. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/h1>\n<p>  \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b C64 PRG \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0432\u044b\u0435 2 \u0431\u0430\u0439\u0442\u0430: \u0430\u0434\u0440\u0435\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (\u043e\u0431\u044b\u0447\u043d\u043e <code>$0801<\/code>)  <\/li>\n<li>12 \u0431\u0430\u0439\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 BASIC<\/li>\n<\/ul>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a (\u0430\u0434\u0440\u0435\u0441\u0430 <code>$801-$80C<\/code>):<\/p>\n<pre><code class=\"plaintext\">0801: 0B 08 0A 00 9E 32 30 36 31 00 00 00 080D: 8D 20 D0     STA $D020<\/code><\/pre>\n<p>  \u041d\u0435 \u0432\u0434\u0430\u0432\u0430\u044f\u0441\u044c \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e <a href=\"https:\/\/www.c64-wiki.com\/wiki\/BASIC_token\">\u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 BASIC<\/a>, \u044d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u043b\u0438 \u043c\u0435\u043d\u0435\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 &#8217;10 SYS 2061&#8242;. \u0410\u0434\u0440\u0435\u0441 <code>2061<\/code> (<code>$080D<\/code>)\u00a0\u2014 \u0442\u043e \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0448\u0430 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 BASIC \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 SYS.<\/p>\n<p>  \u041f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e 14 \u0431\u0430\u0439\u0442 \u2014 \u044d\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e. \u0424\u0438\u043b\u0438\u043f, \u041c\u0430\u0442\u043b\u0435\u0432 \u0438 \u0413\u0435\u0439\u0440 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u0438\u0442\u0440\u044b\u0445 \u0442\u0440\u044e\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 PRG \u0441 <code>LOAD\"*\",8,1<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <code>LOAD\"*\",8<\/code> \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 PRG (\u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430) \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0432 <code>$0801<\/code>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/911\/d07\/fdb\/911d07fdb2c0e2e13b07e360bb16d03c.png\"><\/div>\n<p>  \u0422\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<ul>\n<li>\u0422\u0440\u044e\u043a \u0441\u043e \u0441\u0442\u0435\u043a\u043e\u043c  <\/li>\n<li>\u0422\u0440\u044e\u043a \u0441 \u00ab\u0442\u0451\u043f\u043b\u044b\u043c\u00bb \u0441\u0431\u0440\u043e\u0441\u043e\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u0430 BASIC<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0422\u0440\u044e\u043a \u0441\u043e \u0441\u0442\u0435\u043a\u043e\u043c<\/h3>\n<p>  \u0425\u0438\u0442\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043d\u0435\u0441\u0442\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u044b\u0439 \u0441\u0442\u0435\u043a \u043d\u0430 <code>$01F8<\/code> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043d\u0430\u0448\u0443 \u0436\u0435\u043b\u0430\u0435\u043c\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0451\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f PRG, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 16-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u043d\u0430\u0448 \u043a\u043e\u0434, \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 PRG \u0432 <code>$01F8<\/code>:<\/p>\n<pre><code class=\"plaintext\">    * = $01F8     !word scroll - 1  ; overwrite stack  scroll:\tjsr $E8EA<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a BASIC (\u0441\u043c. <a href=\"https:\/\/www.pagetable.com\/c64disasm\/#F4A5\">\u043a\u043e\u0434 \u043f\u043e\u0441\u043b\u0435 \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a>) \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u0445\u043e\u0447\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>RTS<\/code>, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u043d\u0430\u0448 PRG.<\/p>\n<h3>\u0422\u0440\u044e\u043a \u0441 \u00ab\u0442\u0451\u043f\u043b\u044b\u043c\u00bb \u0441\u0431\u0440\u043e\u0441\u043e\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u0430 BASIC<\/h3>\n<p>  \u042d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0433\u0447\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0432 \u043d\u0430 PRG \u043f\u043e\u0441\u043b\u0435 \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"plaintext\">02E6: 20 EA E8    JSR $E8EA 02E9: A4 D5       LDY $D5 02EB: A9 A0       LDA #$A0 02ED: 99 20 D0    STA $D020,Y 02F0: 91 D1       STA ($D1),Y 02F2: 9D B5 07    STA $07B5,X 02F5: E6 D6       INC $D6 02F7: 65 90       ADC $90 02F9: 85 90       STA $90 02FB: C6 D5       DEC $D5 02FD: 30 FE       BMI $02FD 02FF: 90 E7       BCC $02E8 0301: 4C E6 02    JMP $02E6<\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0440\u043e\u043a\u0443 (<code>JMP $02E6<\/code>). \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f JMP \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 <code>$0301<\/code> \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 <code>$0302-$0303<\/code>.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 <code>$02E6<\/code>, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>$02E6<\/code> \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0430\u0434\u0440\u0435\u0441\u0430 <code>$0302-$0303<\/code>. \u041d\u0443, \u0443 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0441\u043e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435: \u043e\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u00ab\u0446\u0438\u043a\u043b \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f BASIC\u00bb (\u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u043c. <a href=\"http:\/\/sta.c64.org\/cbm64mem.html\">\u043a\u0430\u0440\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 C64<\/a>). \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 PRG \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>$02E6<\/code> \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 BASIC \u043f\u043e\u0441\u043b\u0435 \u0442\u0451\u043f\u043b\u043e\u0433\u043e \u0441\u0431\u0440\u043e\u0441\u0430 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0446\u0438\u043a\u043b\u0443 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f, \u0442\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u044d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430!<\/p>\n<h3>\u0414\u0440\u0443\u0433\u0438\u0435 \u0442\u0440\u044e\u043a\u0438 \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c BASIC<\/h3>\n<p>  \u041f\u0435\u0442\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b <a href=\"https:\/\/github.com\/petrihakkinen\/c64-lines\/blob\/master\/main37.asm\">\u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0442\u0440\u044e\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430 BASIC<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432 zeropage. \u0412 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0432\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 BASIC \u0438 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432 \u043d\u043e\u043c\u0435\u0440\u0430\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b BASIC. \u041d\u0430 \u0432\u0445\u043e\u0434\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a BASIC, \u043a\u0445\u043c, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0430\u0448\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 <code>$39-$3A<\/code>. \u041e\u0447\u0435\u043d\u044c \u0443\u043c\u043d\u043e!<\/p>\n<h1>\u0422\u0440\u044e\u043a 5. \u041d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h1>\n<p>  \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f x-loop, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u043b\u0438\u043d\u0438\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"plaintext\">        lda #39         sta x1 xloop:         lda #$a0         ldx x1         sta $0400 + 24*40, x          adc yf         sta yf         bcc no_scroll         ; scroll screen up!         jsr $e8ea no_scroll:         dec x1         bpl xloop          ; intentionally halt at the end inf:    jmp inf<\/code><\/pre>\n<p>  \u041d\u043e \u0437\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c, \u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u041d\u0415\u041b\u042c\u0417\u042f \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c \u044d\u043a\u0440\u0430\u043d. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0443\u0436\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f:<\/p>\n<pre><code class=\"plaintext\">        lda #39         sta x1 xloop:         lda #$a0         ldx x1         sta $0400 + 24*40, x          dec x1         ; skip scrolling if last pixel         bmi done          adc yf         sta yf         bcc no_scroll         ; scroll screen up!         jsr $e8ea no_scroll:         jmp xloop done:          ; intentionally halt at the end inf:    jmp inf<\/code><\/pre>\n<p>  \u041f\u043e\u0442\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0434\u0430\u0441\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C \u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041a\u043e\u0434 \u0434\u043b\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0432\u0432\u043e\u0434\u0438\u0442 \u043d\u043e\u0432\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>JMP abs<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 3 \u0431\u0430\u0439\u0442\u0430. \u0423\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u0432\u0441\u0435\u0433\u043e \u043f\u043e \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e 8-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u0430 \u0441 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>  JMP \u0434\u043b\u044f \u00ab\u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438\u00bb \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0432 \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0432\u0432\u0435\u0440\u0445 \u0432 \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u0447\u0430\u0441\u0442\u044c \u0446\u0438\u043a\u043b\u0430 \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u043e\u0442\u043e\u043a\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0424\u0438\u043b\u0438\u043f:<\/p>\n<pre><code class=\"plaintext\">        lda #39         sta x1 scroll: jsr $e8ea xloop:         lda #$a0         ldx x1         sta $0400 + 24*40, x          adc yf         sta yf         dec x1     ; doesn't set carry! inf:    bmi inf    ; hang here if last pixel!         bcc xloop  ; next pixel if no scroll         bcs scroll ; scroll up and continue<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0434\u0438\u043d \u0442\u0440\u0451\u0445\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 JMP \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 JMP \u0432 \u0434\u0432\u0443\u0445\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434, \u044d\u043a\u043e\u043d\u043e\u043c\u044f \u0432 \u043e\u0431\u0449\u0435\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 4 \u0431\u0430\u0439\u0442\u0430.<\/p>\n<h1>\u0422\u0440\u044e\u043a 6. \u041b\u0438\u043d\u0438\u0438 \u0441\u043e \u0441\u0436\u0430\u0442\u0438\u0435\u043c \u0431\u0438\u0442\u043e\u0432<\/h1>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043b\u0438\u043d\u0438\u0438, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0441\u0436\u0438\u043c\u0430\u044e\u0442 \u0431\u0438\u0442\u044b \u0432 8-\u0431\u0438\u0442\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443. \u0422\u0430\u043a\u0430\u044f \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0432\u0434\u043e\u043b\u044c \u043b\u0438\u043d\u0438\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0435\u043c\u0443\u0441\u044f 8-\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443:<\/p>\n<pre><code class=\"plaintext\">int mask = 0xB6; \/\/ 10110110 uint8_t* dst = screenRAM; for (int x = 0; x &lt; 40; x++) {     dst[x] = 0xA0;     if (mask &amp; (1 &lt;&lt; (x&amp;7))) {         dst += 40; \/\/ go down a row     } }<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430 \u043d\u0430\u043a\u043b\u043e\u043d\u0430, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0435\u0449\u0451 \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<h3>\u041f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c<\/h3>\n<p>  \u0412\u043e\u0442 <a href=\"https:\/\/github.com\/fsphil\/tinyx\/blob\/master\/x34\/x34.s\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430-\u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 34 \u0431\u0430\u0439\u0442\u0430<\/a> \u043e\u0442 \u0424\u0438\u043b\u0438\u043f\u0430. \u0412 \u0435\u0433\u043e \u043a\u043e\u0434\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0437 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0440\u044e\u043a\u043e\u0432:<\/p>\n<pre><code class=\"plaintext\">ov = $22 ; == $40, initial value for the overflow counter ct = $D5 ; == $27 \/ 39, number of passes. Decrementing, finished at -1 lp = $D1 ; == $07C0, pointer to bottom line. Set by the kernal scroller          ; Overwrite the return address of the kernal loader on the stack         ; with a pointer to our own code          * = $01F8         .word scroll - 1  scroll: jsr $E8EA    ; Kernal scroll up, also sets lp pointer to $07C0 loop:   ldy ct\t     ; Load the decrementing counter into Y (39 &gt; -1)         lda #$A0     ; Load the PETSCII block \/ black col \/ ov step value         sta $D020, y ; On the last two passes, sets the background black p1:     sta $07C0    ; Draw first block (left &gt; right line)         sta (lp), y  ; Draw second block (right &gt; left line)         inc p1 + 1   ; Increment pointer for the left &gt; right line         adc ov\t     ; Add step value $A0 to ov         sta ov         dec ct\t     ; Decrement the Y counter         bmi *\t     ; If it goes negative, we're finished         bcc loop     ; Repeat. If ov didn't overflow, don't scroll         bcs scroll   ; Repeat. If ov overflowed, scroll<\/code><\/pre>\n<p>  <\/p>\n<h3>\u041d\u043e \u0437\u0430\u0447\u0435\u043c \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 34 \u0431\u0430\u0439\u0442\u0430\u0445?<\/h3>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u043a\u0443\u0440\u0441 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f, \u0432\u0441\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u0437\u0430\u043c\u0435\u0442\u043a\u0430\u043c\u0438\u00a0\u2014 \u0438 \u043f\u0440\u043e\u0448\u0451\u043b \u0440\u044f\u0434 \u043e\u0436\u0438\u0432\u043b\u0451\u043d\u043d\u044b\u0445 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0439 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0435\u0449\u0451 \u0435\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c. \u041f\u043e\u0441\u043b\u0435 \u0434\u0435\u0434\u043b\u0430\u0439\u043d\u0430 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li><a href=\"https:\/\/gist.github.com\/fsphil\/05deaa06804b9b2054260b616cafed4b\">\u0424\u0438\u043b\u0438\u043f\u00a0\u2014 33 \u0431\u0430\u0439\u0442\u0430<\/a>  <\/li>\n<li><a href=\"https:\/\/gist.github.com\/fsphil\/01bda1a9dd58c219002ddd6e18b36c3f\">\u0424\u0438\u043b\u0438\u043f\u00a0\u2014 32 \u0431\u0430\u0439\u0442\u0430<\/a>  <\/li>\n<li><a href=\"https:\/\/github.com\/petrihakkinen\/c64-lines\/blob\/master\/main31.asm\">\u041f\u0435\u0442\u0440\u0438\u00a0\u2014 31 \u0431\u0430\u0439\u0442<\/a>  <\/li>\n<li><a href=\"https:\/\/gist.github.com\/fsphil\/7655a394ec5f953c910e9d9369dced56\">\u0424\u0438\u043b\u0438\u043f\u00a0\u2014 29 \u0431\u0430\u0439\u0442<\/a><\/li>\n<\/ul>\n<p>  \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435\u00a0\u2014 \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0436\u0435\u043c\u0447\u0443\u0436\u0438\u043d.<\/p>\n<hr>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0447\u0442\u0435\u043d\u0438\u0435. \u0418 \u043e\u0441\u043e\u0431\u0430\u044f \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u041c\u0430\u0442\u043b\u0435\u0432\u0443, \u0424\u0438\u043b\u0443, \u0413\u0435\u0439\u0440\u0443, \u041f\u0435\u0442\u0440\u0438, \u0414\u0436\u0435\u0439\u043c\u0438, \u042f\u043d\u0443 \u0438 \u0414\u044d\u0432\u0438\u0434\u0443 \u0437\u0430 \u0443\u0447\u0430\u0441\u0442\u0438\u0435 (\u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044f \u043d\u0438\u043a\u043e\u0433\u043e \u043d\u0435 \u0443\u043f\u0443\u0441\u0442\u0438\u043b\u00a0\u2014 \u0431\u044b\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0432 \u0442\u0432\u0438\u0442\u0442\u0435\u0440\u0435!)<\/p>\n<p>  P. S. \u041f\u0435\u0442\u0440\u0438 \u043d\u0430\u0437\u0432\u0430\u043b \u043c\u043e\u0439 \u043a\u043e\u043d\u043a\u0443\u0440\u0441 \u00ab\u0435\u0436\u0435\u0433\u043e\u0434\u043d\u044b\u043c\u00bb, \u0442\u0430\u043a \u0447\u0442\u043e, \u0445\u043c, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0443\u0432\u0438\u0434\u0438\u043c\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0433\u043e\u0434\u0443.<\/p><\/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\/464377\/\"> https:\/\/habr.com\/ru\/post\/464377\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u044e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043c\u043e\u0435\u0433\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e <a href=\"https:\/\/twitter.com\/nurpax\/status\/1159192477598965766\">\u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Commodore 64<\/a>. \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u044b: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b C64 (PRG), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0438\u0441\u0443\u0435\u0442 \u0434\u0432\u0435 \u043b\u0438\u043d\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435. \u041f\u043e\u0431\u0435\u0436\u0434\u0430\u043b \u0442\u043e\u0442, \u0447\u0435\u0439 \u0444\u0430\u0439\u043b \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3f4\/5d1\/afc\/3f45d1afc9817c6530b6b34c44dd0497.png\"><\/div>\n<p>  \u041a\u043e\u043d\u043a\u0443\u0440\u0441\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0442\u0432\u0438\u0442\u0430\u0445 \u0438 \u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0439\u0442\u044b PRG-\u0444\u0430\u0439\u043b\u0430 \u0438 \u0445\u044d\u0448 MD5.  <\/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-293627","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293627","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=293627"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293627\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}