{"version": 2, "width": 78, "height": 33, "timestamp": 1715888073, "env": {"SHELL": "/bin/sh", "TERM": "xterm"}} [0.009595, "o", "arendt# "] [0.598074, "o", "t"] [0.917969, "o", "m"] [1.037973, "o", "u"] [1.197964, "o", "x"] [1.337964, "o", "\r\n"] [1.342633, "o", "\u001b[?1049h\u001b[22;0;0t\u001b[?1h\u001b=\u001b[H\u001b[2J\u001b[?12l\u001b[?25h\u001b[?1000l\u001b[?1002l\u001b[?1003l\u001b[?1006l\u001b[?1005l\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[?1006l\u001b[?1000l\u001b[?1002l\u001b[?1003l\u001b[?2004l\u001b[1;1H\u001b[1;33r\u001b[>c\u001b[>q\u001b[1;1H"] [1.344822, "o", "\u001b[?25l\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[30m\u001b[42m\r\n[5] 0:tmux* \"arendt\" 15:34 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[1;1H"] [1.345238, "o", "\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[?1006l\u001b[?1000l\u001b[?1002l\u001b[?1003l\u001b[?2004l\u001b[1;1H\u001b[1;33r\u001b[1;1H\u001b[?25l\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[30m\u001b[42m\r\n[5] 0:tmux* \"arendt\" 15:34 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[1;1H"] [1.345567, "o", "\u001b[?69h\u001b[?7727h\u001b[?69h\u001b[?7727h\u001b[1;33r\u001b[s\u001b[1;1H"] [1.349058, "o", "arendt# "] [2.361599, "o", "\u001b[?25l\u001b[30m\u001b[42m\u001b[33;1H[5] 0:sh* \"arendt\" 15:34 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[1;9H"] [4.738234, "o", "\u001b[?25l\u001b[26;1H────────────────────────────────────────\u001b[32m──────────────────────────────────────\u001b(B\u001b[m\u001b[1;1Harendt# \u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[2B\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[30m\u001b[42m\r\n[5] 0:sh* \"arendt\" 15:34 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[27;1H"] [4.740008, "o", "\u001b[?25l\u001b[A\u001b[32m────────────────────────────────────────\u001b[39m──────────────────────────────────────\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[1;9H"] [4.742647, "o", "\u001b[27;1HDusk's Harmonized Assembly Layer\u001b[1;9H"] [9.178051, "o", "c"] [9.217981, "o", "d"] [9.337965, "o", " "] [10.538152, "o", "d"] [10.658111, "o", "e"] [10.827971, "o", "m"] [10.938048, "o", "\u001b[Harendt# cd demo/\u0007"] [12.077995, "o", "d"] [12.177957, "o", "u"] [12.36802, "o", "skv6/\u0007"] [13.697984, "o", "u"] [13.767948, "o", "s"] [13.877999, "o", "ermode/\u0007"] [14.297937, "o", "\r\n"] [14.298029, "o", "arendt# "] [15.617976, "o", "."] [15.677939, "o", "/"] [15.857942, "o", "d"] [15.977942, "o", "u"] [16.037937, "o", "s"] [16.108196, "o", "k-\u0007"] [16.73796, "o", "c"] [16.877939, "o", "u"] [16.957927, "o", "r"] [17.118172, "o", "ses\u0007"] [17.687921, "o", "\r\n"] [17.6897, "o", "\u001b[?25l\u001b[H\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[?12l\u001b[?25h\u001b[3d"] [17.689897, "o", "\u001b[1;25r\u001b[1;1H\u001b[2;25r\u001b[24S\u001b[1;1H\u001b[K\u001b[1;33r\u001b[1;1H"] [17.689949, "o", "\u001b[1;25r\u001b[1;1H\u001b[2;25r\u001b[24S\u001b[1;1H\u001b[K\u001b[1;33r\u001b[1;1H"] [17.719415, "o", "Dusk OS"] [17.719708, "o", "\r\n81KB used 31MB fre"] [17.719762, "o", "e ok\r\n"] [20.958369, "o", "\u001b[?25l\u001b[26d\u001b[32m────────────────────────────────────────\u001b[39m──────────────────────────────────────\u001b(B\u001b[m\u001b[30m\u001b[42m\u001b[33;1H[5] 0:dusk-curses* \"arendt\" 15:34 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[3;1H"] [21.911177, "o", "\u001b[28dCompared to modern interpreted languages, Forth is fast\u001b[3;1H"] [24.941119, "o", "\u001b[29dHowever, naive Forth isn't blazing fast either\u001b[3;1H"] [27.958116, "o", "\u001b[?25l\u001b[30m\u001b[42m\u001b[33d[5] 0:dusk-curses* \"arendt\" 15:35 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[3;1H"] [28.981117, "o", "\u001b[30dLet's use an example where we sum an array of numbers\u001b[3;1H"] [31.139385, "o", "c"] [31.27933, "o", "r"] [31.339328, "o", "e"] [31.519328, "o", "a"] [31.659326, "o", "t"] [31.759326, "o", "e"] [31.939328, "o", " "] [32.159364, "o", "d"] [32.199323, "o", "a"] [32.759318, "o", "t"] [32.839317, "o", "a"] [32.999322, "o", " "] [33.259319, "o", "4"] [33.319317, "o", "2"] [33.679315, "o", " "] [34.099316, "o", ","] [34.619312, "o", " "] [35.679336, "o", "5"] [35.739307, "o", "4"] [35.959315, "o", " "] [36.379303, "o", ","] [36.919302, "o", " "] [37.2793, "o", "1"] [37.339296, "o", "2"] [37.539293, "o", "3"] [37.719297, "o", "4"] [37.879298, "o", " "] [38.139295, "o", ","] [39.039379, "o", "\r\n ok"] [39.039478, "o", "\r\n"] [40.259339, "o", ":"] [40.939312, "o", " "] [41.279292, "o", "s"] [41.359286, "o", "u"] [41.539286, "o", "m"] [41.639289, "o", " "] [42.099279, "o", "("] [42.519284, "o", " "] [43.179278, "o", "-"] [43.319273, "o", "-"] [43.399275, "o", " "] [43.639272, "o", "n"] [43.819275, "o", " "] [44.85932, "o", ")"] [45.179277, "o", " "] [47.839287, "o", "0"] [48.359289, "o", " "] [48.759251, "o", "d"] [48.799247, "o", "a"] [48.999248, "o", "t"] [49.059247, "o", "a"] [50.919273, "o", " "] [52.139269, "o", "3"] [52.279242, "o", " "] [52.459234, "o", "f"] [52.579234, "o", "o"] [52.659242, "o", "r"] [54.439259, "o", " "] [56.179249, "o", "@"] [57.039244, "o", "+"] [58.879239, "o", " "] [60.159232, "o", "r"] [60.579197, "o", "o"] [60.679193, "o", "t"] [60.919197, "o", " "] [61.939221, "o", "+"] [62.239192, "o", " "] [62.539187, "o", "s"] [62.579183, "o", "w"] [62.759183, "o", "a"] [62.85918, "o", "p"] [63.099183, "o", " "] [63.579182, "o", "n"] [63.679182, "o", "e"] [63.819179, "o", "x"] [63.919179, "o", "t"] [63.999181, "o", " "] [64.279174, "o", "d"] [64.479182, "o", "r"] [64.679177, "o", "o"] [64.759174, "o", "p"] [64.819177, "o", " "] [65.239169, "o", ";"] [66.619285, "o", "\r\n ok\r\n"] [67.839194, "o", "s"] [68.119162, "o", "u"] [68.319159, "o", "m"] [68.479165, "o", " "] [68.719153, "o", "."] [69.239203, "o", "\r\n1330 ok\r\n"] [73.420941, "o", "\u001b[31dSee what we did here? simple, straightforward\u001b[9;1H"] [78.470901, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HFor those unfamiliar with @+ ( a -- a+4 n ), it's a fetch-an-increase word\r\n\u001b[K\u001b[1;33r\u001b[9;1H"] [84.5305, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HSo, it works but... have you seen that assembly listing?\r\n\u001b[K\u001b[1;33r\u001b[9;1H"] [87.739129, "o", "f"] [87.99907, "o", "<"] [88.299063, "o", "<"] [88.799068, "o", " "] [89.799095, "o", "a"] [89.859059, "o", "s"] [89.959058, "o", "m"] [90.299052, "o", "/"] [90.799056, "o", "i"] [91.399077, "o", "3"] [91.451079, "o", "\u001b[?25l\u001b[30m\u001b[42m\u001b[33;1H[5] 0:dusk-curses* \"arendt\" 15:36 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[9;11H"] [91.679051, "o", "8"] [91.839049, "o", "6"] [92.47907, "o", "d"] [92.799044, "o", "."] [93.559066, "o", "f"] [93.619122, "o", "s"] [95.224119, "o", "\r\n ok\r\n"] [96.699057, "o", "'"] [96.899029, "o", " "] [97.159025, "o", "s"] [97.279024, "o", "u"] [97.479022, "o", "m"] [97.559023, "o", " "] [98.359046, "o", "d"] [98.519018, "o", "i"] [98.619015, "o", "s"] [99.079794, "o", "\u001b[H"] [99.079822, "o", "\u001b[1;24r\u001b[1;1H\u001b[4S\u001b[21d\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[24;1H"] [99.079879, "o", "\u001b[H"] [99.079908, "o", "\u001b[11;10H\u001b[8;1H"] [99.079956, "o", "b9417500 AD"] [99.079975, "o", "D E"] [99.080722, "o", "SI"] [99.080817, "o", ",fc\u001b[8;33H83 c6 fc\r\nb9417503 MOV [ESI],EAX\u001b[9;33H89 06\r\nb9417505 MOV EAX,00000000 b8 00 00 00 00\r\nb941750a CALL b94174e0\u001b[11;33Hdata\r\nb941750f ADD ESI,fc\u001b[12;33H83 c6 fc\r\nb9417512 MOV [ESI],EAX\u001b[13;33H89 06\r\nb9417514 MOV EAX,00000003 b8 03 00 00 00\r\nb9417519 ADD EAX,01\u001b[15;33H83 c0 "] [99.081191, "o", "01\r\nb941751c PUSH EAX\u001b[16;33H50\r\nb941751d LODS D\u001b[17;33Had\r\nb941751e ADD [ESP],ff\u001b[18;33H83 04 24 ff\r\nb9417522 Jc Z,b941753e\u001b[19;33H0f 84 16 00 00 00\r\nb9417528 CALL b9403914\u001b[20;33H@+\r\nb941752d XCHG EAX,[ESI]\u001b[21;33H87 06\r\nb941752f XCHG EAX,[ESI+04] 87 46 04\r\nb9417532 ADD EAX,[ESI]\u001b[23;33H03 06\r\n ok\r\n"] [105.740774, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HIt's not bad, but it's not *tight*\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [107.939025, "o", "d"] [108.078975, "o", "i"] [108.158973, "o", "s"] [108.979, "o", "n"] [109.759727, "o", "\u001b[1;25r\u001b[1;1H\u001b[18S\u001b[7B\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[1;1H\u001b[7Bb9417534 ADD ESI,04"] [109.760432, "o", "\u001b[8;33H83 c6 04\r\nb9417537 XCHG EAX,[ESI]\u001b[9;33H87 06\r\nb9417539 JMP b941751e\u001b[10;33He9 e0 ff ff ff\r\nb941753e ADD ESP,04\u001b[11;33H83 c4 04\r\nb9417541 LODS D\u001b[12;33Had\r\nb9417542 RET\u001b[13;33Hc3\r\nb9417543 ADD {EAX+72},BH 00 78 72\r\nb9417546 INC ECX\u001b[15;33H41\r\nb9417547 MOV "] [109.760456, "o", " ECX,0000fae0 b9 e0 fa 00 00\r\nb941754c INC ESP\u001b[17;33H44\r\nb941754d Jc NZ,b9417590 75 41\r\nb941754f MOV ECX,000f24c0 b9 c0 24 0f 00\r\nb9417554 DEC ESP\u001b[20;33H4c\r\nb9417555 Jc NZ,b9417598 75 41\r\nb9417557 MOV ECX,000f2460 b9 60 24 0f 00\r\nb941755c ADD {ESP+70},AH 00 64 69 70\r\n ok\r\n"] [115.840754, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HIf that word was meant to be placed in a tight loop, we might want it faster\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [121.901187, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HIn traditional Forths, you'd rewrite this in assembler\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [127.961191, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HBut Dusk runs on multiple CPUs\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [133.011222, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HIs there a way of getting juicy speedups in a cross-CPU way?\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [137.050599, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HYes, and it's the HAL!\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [142.100594, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HThe HAL has access to PS and RS, of course,\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [146.140571, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1Hbut also to two virtual registers, named A and S\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [151.500796, "o", "\u001b[?25l\u001b[30m\u001b[42m\u001b[33d[5] 0:dusk-curses* \"arendt\" 15:37 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[25;1H"] [153.21055, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HIn our HAL-ified sum, we'll accumulate in W, which is the top of PS\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [159.218793, "o", "c"] [159.558734, "o", "o"] [159.778727, "o", "d"] [159.958739, "o", "e"] [160.098731, "o", " "] [161.178753, "o", "s"] [161.29873, "o", "u"] [161.498722, "o", "m"] [161.67872, "o", " "] [162.338751, "o", "("] [162.838715, "o", " "] [163.418743, "o", "-"] [163.558712, "o", "-"] [163.658713, "o", " "] [163.838708, "o", "n"] [164.178706, "o", " "] [164.958736, "o", ")"] [166.458906, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[25;18H\u001b[24;1H ok\r\n"] [170.380486, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HWe'll keep track of the running address in A, and we'll countdown from 3 in S\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [174.420446, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1H\"0 litn\" compiles a literal. It performs a \"dup\" then sets W to 0\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [176.058714, "o", "0"] [176.118658, "o", " "] [176.418649, "o", "l"] [176.638652, "o", "i"] [177.638678, "o", "t"] [177.918645, "o", "n"] [180.83883, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[24;1H ok\r\n"] [183.510402, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1H\"data i) A>) @,\" fetches the immediate value \"data\" into register A\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [185.038669, "o", "d"] [185.098611, "o", "a"] [185.25861, "o", "t"] [185.318609, "o", "a"] [186.798637, "o", " "] [187.598633, "o", "i"] [188.318623, "o", ")"] [188.578604, "o", " "] [188.798593, "o", "A"] [189.038588, "o", ">"] [190.15865, "o", ")"] [190.898619, "o", " "] [191.198579, "o", "@"] [191.478581, "o", ","] [193.478766, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[1;1H\u001b[24d ok\r\n"] [197.650347, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1H\"3 i) S>) @,\" fetches the immediate value 3 into register S\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [199.518578, "o", "3"] [199.618547, "o", " "] [199.978541, "o", "i"] [200.978567, "o", ")"] [201.258543, "o", " "] [201.618529, "o", "S"] [202.49853, "o", ">"] [202.798533, "o", ")"] [203.778556, "o", " "] [204.158518, "o", "@"] [204.458516, "o", ","] [206.698704, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[1;1H\u001b[24d ok\r\n"] [207.557279, "o", "\u001b[?25l\u001b[30m\u001b[42m\u001b[33d[5] 0:dusk-curses* \"arendt\" 15:38 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[25;1H"] [208.760902, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HThen, we begin the loop. See? our compile time stack has the jump address\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [211.15854, "o", "b"] [211.31849, "o", "e"] [211.378487, "o", "g"] [211.458487, "o", "i"] [211.498486, "o", "n"] [212.478664, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[1;1H\u001b[24d ok\r\n"] [213.978507, "o", "."] [214.138475, "o", "S"] [214.358611, "o", "\u001b[H\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K"] [214.358734, "o", "\u001b[1;33r\u001b[25;1H\u001b[H\u001b[25;3H\u001b[24;1HPS 01 RS 06 -- b9419f34 ok\r\n"] [221.889264, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1H\"A) +,\" adds the indirect value of A to W, result in W\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [224.138486, "o", "A"] [224.478424, "o", ")"] [225.458453, "o", " "] [226.658445, "o", "+"] [227.118416, "o", ","] [229.378598, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[25;6H\u001b[24;1H ok\r\n"] [235.018674, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1H\"4 i) A>) +,\" adds the immediate value \"4\" to register A\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [236.598424, "o", "4"] [236.738376, "o", " "] [237.238363, "o", "i"] [237.998359, "o", ")"] [238.318363, "o", " "] [238.518356, "o", "A"] [239.018355, "o", ">"] [239.758382, "o", ")"] [240.27839, "o", " "] [241.038374, "o", "+"] [241.358343, "o", ","] [245.598525, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[1;1H\u001b[24d ok\r\n"] [248.148549, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1H\"1 i) S>) -,\" subtract the immediate value \"1\" from register S\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [251.138356, "o", "1"] [251.658332, "o", " "] [252.178323, "o", "i"] [252.578291, "o", ")"] [253.03829, "o", " "] [253.418287, "o", "S"] [254.038283, "o", ">"] [254.338283, "o", ")"] [255.07828, "o", " "] [255.958303, "o", "-"] [256.438273, "o", ","] [258.078461, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[1;1H\u001b[24d ok\r\n"] [259.258203, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1H\"+,\" and \"-,\" operation set the Z flag, allowing conditional branching\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [262.288487, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HWe take advantage of that and emit conditionally branch when Z is not set\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [269.158275, "o", "N"] [269.978248, "o", "Z"] [270.678241, "o", ")"] [271.238237, "o", " "] [271.620232, "o", "\u001b[?25l\u001b[30m\u001b[42m\u001b[33;1H[5] 0:dusk-curses* \"arendt\" 15:39 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[25;5H"] [271.758236, "o", "b"] [271.958203, "o", "r"] [272.278198, "o", "a"] [272.898195, "o", "n"] [273.558192, "o", "c"] [273.698191, "o", "h"] [274.018189, "o", "C"] [274.318192, "o", ","] [274.498193, "o", " "] [274.678185, "o", "d"] [274.878185, "o", "r"] [274.978187, "o", "o"] [275.078183, "o", "p"] [275.918382, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[1;1H\u001b[24d ok\r\n"] [279.4584, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HThe branch target comes from compile time PS\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [281.838228, "o", "."] [281.978157, "o", "S"] [282.138301, "o", "\u001b[H\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K"] [282.138423, "o", "\u001b[1;33r\u001b[25;1H\u001b[H\u001b[25;3H\u001b[24;1HPS 00 RS 06 -- ok\r\n"] [286.528963, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HAnd we're done! Result is in W, we can return!\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [288.798173, "o", "e"] [288.958124, "o", "x"] [289.118122, "o", "i"] [289.218121, "o", "t"] [289.358119, "o", ","] [290.838301, "o", "\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[1;1H\u001b[24d ok\r\n"] [292.598136, "o", "s"] [292.698105, "o", "u"] [292.878104, "o", "m"] [293.038104, "o", " "] [293.258098, "o", "."] [293.798232, "o", "\u001b[H\u001b[1;25r\u001b[1;1H\u001b[2S\u001b[24d\u001b[K\r\n\u001b[K"] [293.798318, "o", "\u001b[1;33r\u001b[25;1H\u001b[H\u001b[25d\u001b[A1330 ok"] [293.798441, "o", "\r\n"] [298.64829, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HIt does the same sum...\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [302.688273, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1Hbut has a much tighter assembly listing!\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [304.718105, "o", "'"] [304.878052, "o", " "] [305.478043, "o", "s"] [305.598042, "o", "u"] [306.278066, "o", "m"] [306.358042, "o", " "] [306.578039, "o", "d"] [306.69804, "o", "i"] [306.81804, "o", "s"] [307.398734, "o", "\u001b[H"] [307.399525, "o", "\u001b[1;25r\u001b[1;1H\u001b[18S\u001b[7B\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[1;33r\u001b[25;1H\u001b[H\u001b[25;10H\u001b[8;1Hb9419f20 ADD ESI,fc\u001b[8;33H83 c6 fc\r\nb9419f23 MOV [ESI],EAX\u001b[9;33H89 06\r\nb9419f25 MOV EAX,00000000 b8 00 00 00 00\r\nb94"] [307.399601, "o", "19f2a MOV EBX,b94174e5 bb e5 74 41 b9\r\nb9419f2f MOV EDX,00000003 ba 03 00 00 00\r\nb9419f34 ADD EAX,[EBX]\u001b[13;33H03 03\r\nb9419f36 ADD EBX,04\u001b[14;33H83 c3 04\r\nb9419f39 SUB EDX,01\u001b[15;33H83 ea 01\r\nb9419f3c Jc NZ,b9419f34 0f 85 f2 ff ff ff\r\nb9419f42 RET\u001b[17;33Hc3\r\nb9419f43 ADD {EAX},AL\u001b[18;33H00 00\r\nb9419f45 ADD {EAX},AL\u001b[19;33H00 00\r\nb9419f47 ADD {EAX},AL\u001b[20;33H00 00\r\nb9419f49 ADD {EAX},AL\u001b[21;33H00 00\r\nb9419f4b ADD {EAX},AL\u001b[22;33H00 00\r\nb9419f4d ADD {EAX},AL\u001b[23;33H00 00\r\n ok\r\n"] [311.778226, "o", "\u001b[27;32r\u001b[32;78H\n\u001b[31;1HAnd that was a quick peek at the HAL, goodbye!\r\n\u001b[K\u001b[1;33r\u001b[25;1H"] [319.858592, "o", "\u001b[?25l\u001b[H.S\u001b[K\r\nPS 00 RS 06 -- ok\u001b[K\r\nexit,\u001b[K\r\n ok\u001b[K\r\nsum .\u001b[K\r\n1330 ok\u001b[K\r\n' sum dis\u001b[K\r\nb9419f20 ADD ESI,fc\u001b[12X\u001b[8;33H83 c6 fc\u001b[K\r\nb9419f23 MOV [ESI],EAX\u001b[9X\u001b[9;33H89 06\u001b[K\r\nb9419f25 MOV EAX,00000000 b8 00 00 00 00\u001b[K\r\nb9419f2a MOV EBX,b94174e5 bb e5 74 41 b9\u001b[K\r\nb9419f2f MOV EDX,00000003 ba 03 00 00 00\u001b[K\r\nb9419f34 ADD EAX,[EBX]\u001b[9X\u001b[13;33H03 03\u001b[K\r\nb9419f36 ADD EBX,04\u001b[12X\u001b[14;33H83 c3 04\u001b[K\r\nb9419f39 SUB EDX,01\u001b[12X\u001b[15;33H83 ea 01\u001b[K\r\nb9419f3c Jc NZ,b9419f34 0f 85 f2 ff ff ff\u001b[K\r\nb9419f42 RET\u001b[20X\u001b[17;33Hc3\u001b[K\r\nb9419f43 ADD {EAX},AL\u001b[10X\u001b[18;33H00 00\u001b[K\r\nb9419f45 ADD {EAX},AL\u001b[10X\u001b[19;33H00 00\u001b[K\r\nb9419f47 ADD {EAX},AL\u001b[10X\u001b[20;33H00 00\u001b[K\r\nb9419f49 ADD {EAX},AL\u001b[10X\u001b[21;33H00 00\u001b[K\r\nb9419f4b ADD {EAX},AL\u001b[10X\u001b[22;33H00 00\u001b[K\r\nb9419f4d ADD {EAX},AL\u001b[10X\u001b[23;33H00 00\u001b[K\r\n ok\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[30m\u001b[42m\r\n[5] 0:dusk-curses* \"arendt\" 15:39 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[25;1H"] [319.859244, "o", "\u001b[1;32r\u001b[1;1H\u001b[2;32r\u001b[31S\u001b[1;1H\u001b[K\u001b[1;33r\u001b[1;1HIgnoring unknown key: 00000200\r\n"] [320.918156, "o", "\u001b[1;24r\u001b[24;78H\n\r\u001b[K\u001b[1;33r\u001b[2;1H\u001b[24;2Hok\r\n"] [321.638099, "o", "\u001b[22;2Hok\u001b[25;1H"] [323.118116, "o", "\u001b[20;2Hok\u001b[25;1H"] [324.877978, "o", "b"] [324.957952, "o", "y"] [325.077951, "o", "e"] [325.218082, "o", "\u001b[19;2Hok\r\n "] [325.218172, "o", "\u001b[K\r\n ok\r\n \u001b[K\r\n o"] [325.218289, "o", "k\r\nbye\r\n\u001b[K\r\n\r\n\u001b[1mPress any key to exit."] [325.218344, "o", "\r\n\u001b(B\u001b[m"] [325.746486, "o", "\u001b[31d"] [325.746696, "o", "\r\n\u001b[?25l\u001b[Harendt# cd demo/duskv6/usermode/\u001b[K\r\narendt# ./dusk-curses\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\r\n\u001b[K\u001b[?12l\u001b[?25h\u001b[3d"] [325.746787, "o", "arendt# "] [326.206716, "o", "\u001b[?25l\u001b[30m\u001b[42m\u001b[33;1H[5] 0:sh* \"arendt\" 15:39 16-May-24\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[3;9H"] [326.206742, "o", "^D"] [326.206795, "o", "\r\n"] [326.207332, "o", "\u001b[1;33r\u001b(B\u001b[m\u001b[?1l\u001b>\u001b[H\u001b[2J\u001b[?12l\u001b[?25h\u001b[?1000l\u001b[?1002l\u001b[?1003l\u001b[?1006l\u001b[?1005l\u001b[?7727l\u001b[?1004l\u001b[>4m"] [326.207352, "o", "\u001b[?69l\u001b[?1049l\u001b[23;0;0t"] [326.207563, "o", "[exited]\r\n"] [326.207889, "o", "arendt# "] [331.996428, "o", "^D"] [331.996521, "o", "\r\n"]