From df0d6a4503a26508553510b4050eaa79f52e4e4e Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sun, 18 Oct 2020 18:22:31 +0300 Subject: Another step to release. --- sts/bifreq.sts | 685 +++++++++++++++++++++++++++++++++++++++++++++ sts/cipher.sts | 12 + sts/common/.print.sts.swp | Bin 0 -> 12288 bytes sts/common/common.sts | 3 + sts/common/const.sts | 95 +++++++ sts/common/macro.sts | 9 + sts/common/print.sts | 30 ++ sts/freq.sts | 35 +++ sts/ia32/bitwise.sts | 27 ++ sts/ia32/branch.sts | 11 + sts/ia32/const.sts | 3 + sts/ia32/core.sts | 17 ++ sts/ia32/elf/begin.sts | 129 +++++++++ sts/ia32/elf/end.sts | 21 ++ sts/ia32/elf/syscall.sts | 41 +++ sts/ia32/float/control.sts | 19 ++ sts/ia32/float/float.sts | 3 + sts/ia32/float/math.sts | 32 +++ sts/ia32/float/stack.sts | 25 ++ sts/ia32/ia32.sts | 8 + sts/ia32/macro.sts | 86 ++++++ sts/ia32/math.sts | 68 +++++ sts/ia32/memory.sts | 10 + sts/ia32/stack.sts | 41 +++ sts/keygen.sts | 34 +++ 25 files changed, 1444 insertions(+) create mode 100644 sts/bifreq.sts create mode 100644 sts/cipher.sts create mode 100644 sts/common/.print.sts.swp create mode 100644 sts/common/common.sts create mode 100644 sts/common/const.sts create mode 100644 sts/common/macro.sts create mode 100644 sts/common/print.sts create mode 100644 sts/freq.sts create mode 100644 sts/ia32/bitwise.sts create mode 100644 sts/ia32/branch.sts create mode 100644 sts/ia32/const.sts create mode 100644 sts/ia32/core.sts create mode 100644 sts/ia32/elf/begin.sts create mode 100644 sts/ia32/elf/end.sts create mode 100644 sts/ia32/elf/syscall.sts create mode 100644 sts/ia32/float/control.sts create mode 100644 sts/ia32/float/float.sts create mode 100644 sts/ia32/float/math.sts create mode 100644 sts/ia32/float/stack.sts create mode 100644 sts/ia32/ia32.sts create mode 100644 sts/ia32/macro.sts create mode 100644 sts/ia32/math.sts create mode 100644 sts/ia32/memory.sts create mode 100644 sts/ia32/stack.sts create mode 100644 sts/keygen.sts (limited to 'sts') diff --git a/sts/bifreq.sts b/sts/bifreq.sts new file mode 100644 index 0000000..dcf4858 --- /dev/null +++ b/sts/bifreq.sts @@ -0,0 +1,685 @@ +[ bifreq_push_eng 1 + %1% float_iload + 1 01bcf4a2 float_dload + float_div + float_fstore +] + +defword bifreq_eng + bifreq_push_eng 1a4337 + bifreq_push_eng 85e79e + bifreq_push_eng 111342b + bifreq_push_eng e30232 + bifreq_push_eng c735b + bifreq_push_eng 5703a7 + bifreq_push_eng 866b32 + bifreq_push_eng 21f476 + bifreq_push_eng d53d87 + bifreq_push_eng d4776 + bifreq_push_eng 4e639f + bifreq_push_eng 2471000 + bifreq_push_eng f3c62d + bifreq_push_eng 428af4b + bifreq_push_eng b6ffe + bifreq_push_eng 8285b7 + bifreq_push_eng 4cebc + bifreq_push_eng 286426e + bifreq_push_eng 2406236 + bifreq_push_eng 2e09c84 + bifreq_push_eng 4a86c8 + bifreq_push_eng 7e7a75 + bifreq_push_eng 3bcc70 + bifreq_push_eng a155a + bifreq_push_eng afd558 + bifreq_push_eng bb967 + bifreq_push_eng 874e85 + bifreq_push_eng a8406 + bifreq_push_eng 4e37c + bifreq_push_eng 229b8 + bifreq_push_eng 12910c9 + bifreq_push_eng 12658 + bifreq_push_eng 9e44 + bifreq_push_eng 25b79 + bifreq_push_eng 42796e + bifreq_push_eng 44ff0 + bifreq_push_eng 6971 + bifreq_push_eng 69e974 + bifreq_push_eng 2ed3f + bifreq_push_eng 19e8d + bifreq_push_eng 7cb36b + bifreq_push_eng 1c1d9 + bifreq_push_eng 1589 + bifreq_push_eng 468318 + bifreq_push_eng 158288 + bifreq_push_eng 688f4 + bifreq_push_eng 7bcc77 + bifreq_push_eng 1d511 + bifreq_push_eng 2239d + bifreq_push_eng bcd + bifreq_push_eng 4fd5ca + bifreq_push_eng 1fc4 + bifreq_push_eng 1301e82 + bifreq_push_eng 48c45 + bifreq_push_eng 2e2e3c + bifreq_push_eng 57823 + bifreq_push_eng 12e2de3 + bifreq_push_eng 4156e + bifreq_push_eng 2c556 + bifreq_push_eng 133338e + bifreq_push_eng 80e084 + bifreq_push_eng a236 + bifreq_push_eng 6df0e3 + bifreq_push_eng 56b804 + bifreq_push_eng 45cf6 + bifreq_push_eng 2de8e + bifreq_push_eng 197f9cd + bifreq_push_eng 5d7cb + bifreq_push_eng 2676a + bifreq_push_eng 54246b + bifreq_push_eng 1514e8 + bifreq_push_eng b56870 + bifreq_push_eng 46408d + bifreq_push_eng 17010 + bifreq_push_eng 3ece5 + bifreq_push_eng 14b4 + bifreq_push_eng 1179e4 + bifreq_push_eng e23a + bifreq_push_eng 10c4fb7 + bifreq_push_eng 5d2e5f + bifreq_push_eng 39b751 + bifreq_push_eng 3d0dfb + bifreq_push_eng 19c714b + bifreq_push_eng 3d8d56 + bifreq_push_eng 25439b + bifreq_push_eng 45f925 + bifreq_push_eng 14ab80e + bifreq_push_eng c3286 + bifreq_push_eng 805b0 + bifreq_push_eng 2e8dc1 + bifreq_push_eng 361749 + bifreq_push_eng 2b57ca + bifreq_push_eng c83342 + bifreq_push_eng 2ffd53 + bifreq_push_eng 452b2 + bifreq_push_eng 5700f7 + bifreq_push_eng 9f25bf + bifreq_push_eng f07939 + bifreq_push_eng 596fbf + bifreq_push_eng 12e625 + bifreq_push_eng 4adf3e + bifreq_push_eng 6b15 + bifreq_push_eng 21d838 + bifreq_push_eng 17ef6 + bifreq_push_eng 2952912 + bifreq_push_eng 949a2e + bifreq_push_eng 1894eb6 + bifreq_push_eng 2c7ca98 + bifreq_push_eng 11a4196 + bifreq_push_eng ca3683 + bifreq_push_eng 7e70ff + bifreq_push_eng 7357e5 + bifreq_push_eng f48d23 + bifreq_push_eng 132e21 + bifreq_push_eng 24cc77 + bifreq_push_eng 1605c18 + bifreq_push_eng 114e00e + bifreq_push_eng 2eb8c2c + bifreq_push_eng ce5cda + bifreq_push_eng d5feb9 + bifreq_push_eng 164cbc + bifreq_push_eng 498fa2e + bifreq_push_eng 366d375 + bifreq_push_eng 1f59868 + bifreq_push_eng 381012 + bifreq_push_eng a158bb + bifreq_push_eng e17856 + bifreq_push_eng 5633d3 + bifreq_push_eng 72df96 + bifreq_push_eng 71a3a + bifreq_push_eng 7f8829 + bifreq_push_eng d8d5b + bifreq_push_eng 17f7e7 + bifreq_push_eng b69fb + bifreq_push_eng 822589 + bifreq_push_eng 5cdb8f + bifreq_push_eng 9bb3e + bifreq_push_eng 170114 + bifreq_push_eng b702e9 + bifreq_push_eng 41e29 + bifreq_push_eng 37e29 + bifreq_push_eng 2c1c57 + bifreq_push_eng 1317f0 + bifreq_push_eng 8275a + bifreq_push_eng 120c0fc + bifreq_push_eng 124ee5 + bifreq_push_eng b990 + bifreq_push_eng 7f3fb0 + bifreq_push_eng 1f3db8 + bifreq_push_eng d0fc4e + bifreq_push_eng 2fe554 + bifreq_push_eng 3bbcd + bifreq_push_eng f594f + bifreq_push_eng 4b71 + bifreq_push_eng c0dc9 + bifreq_push_eng 79d2 + bifreq_push_eng ab816c + bifreq_push_eng 121279 + bifreq_push_eng 13d455 + bifreq_push_eng d6cb0 + bifreq_push_eng dc1bbf + bifreq_push_eng 165bca + bifreq_push_eng 16677e + bifreq_push_eng 96c34f + bifreq_push_eng 6c62a4 + bifreq_push_eng 2b333 + bifreq_push_eng 27ff6 + bifreq_push_eng 275193 + bifreq_push_eng 11fb8f + bifreq_push_eng 25063d + bifreq_push_eng 7cf324 + bifreq_push_eng 128ae4 + bifreq_push_eng e966 + bifreq_push_eng 6aa88b + bifreq_push_eng 3bd323 + bifreq_push_eng 701f16 + bifreq_push_eng 39806e + bifreq_push_eng 2d999 + bifreq_push_eng 17ecf7 + bifreq_push_eng 39ba + bifreq_push_eng ef35c + bifreq_push_eng 6f62 + bifreq_push_eng 224e301 + bifreq_push_eng f78f4 + bifreq_push_eng 15fd21 + bifreq_push_eng ca553 + bifreq_push_eng 600656f + bifreq_push_eng cbaec + bifreq_push_eng 68e27 + bifreq_push_eng 144b4e + bifreq_push_eng 1a38bae + bifreq_push_eng 2e5d2 + bifreq_push_eng 335d1 + bifreq_push_eng 11d83c + bifreq_push_eng 14a529 + bifreq_push_eng 151e16 + bifreq_push_eng 12d0a82 + bifreq_push_eng eeed9 + bifreq_push_eng 18b79 + bifreq_push_eng 3aa3b9 + bifreq_push_eng 25914a + bifreq_push_eng 7f6f3f + bifreq_push_eng 2a4b76 + bifreq_push_eng 303a3 + bifreq_push_eng 156957 + bifreq_push_eng 1d66 + bifreq_push_eng 161233 + bifreq_push_eng 90ca + bifreq_push_eng 989e5c + bifreq_push_eng 27a62c + bifreq_push_eng 14794fc + bifreq_push_eng c4ca13 + bifreq_push_eng bed1ca + bifreq_push_eng 57977e + bifreq_push_eng 916cce + bifreq_push_eng 9517b + bifreq_push_eng 94394 + bifreq_push_eng 357f8 + bifreq_push_eng 277224 + bifreq_push_eng 110ca60 + bifreq_push_eng a0e526 + bifreq_push_eng 539cc92 + bifreq_push_eng 143a430 + bifreq_push_eng 33188d + bifreq_push_eng 47333 + bifreq_push_eng b23e49 + bifreq_push_eng 239ea5d + bifreq_push_eng 242e566 + bifreq_push_eng 8ccab + bifreq_push_eng 8b4d10 + bifreq_push_eng e11cb + bifreq_push_eng d6b00 + bifreq_push_eng 18039 + bifreq_push_eng 1c784a + bifreq_push_eng 1a227b + bifreq_push_eng 4bb4 + bifreq_push_eng 60c2 + bifreq_push_eng 558f + bifreq_push_eng 16b1f4 + bifreq_push_eng 3160 + bifreq_push_eng 2ef7 + bifreq_push_eng 51e0 + bifreq_push_eng 574c9 + bifreq_push_eng 3ed5 + bifreq_push_eng 368f + bifreq_push_eng 2f75 + bifreq_push_eng 5742 + bifreq_push_eng 3874 + bifreq_push_eng 298641 + bifreq_push_eng 86d8 + bifreq_push_eng 2d2 + bifreq_push_eng 13a57 + bifreq_push_eng 999e + bifreq_push_eng 4fb8 + bifreq_push_eng 2ca10f + bifreq_push_eng 22dd + bifreq_push_eng 3ed3 + bifreq_push_eng 2eb + bifreq_push_eng 165b + bifreq_push_eng b2b + bifreq_push_eng 2b3a8e + bifreq_push_eng 6fc84 + bifreq_push_eng 668b1 + bifreq_push_eng 43dde + bifreq_push_eng a2842e + bifreq_push_eng 832fe + bifreq_push_eng 33172 + bifreq_push_eng 9eb6f + bifreq_push_eng 58b855 + bifreq_push_eng 12c10 + bifreq_push_eng 1d01b + bifreq_push_eng ce9e5 + bifreq_push_eng 768f1 + bifreq_push_eng 1d0cdc + bifreq_push_eng 1ad331 + bifreq_push_eng 5bb65 + bifreq_push_eng 3651 + bifreq_push_eng 7bc8c + bifreq_push_eng 313ec5 + bifreq_push_eng 160891 + bifreq_push_eng 7bafa + bifreq_push_eng 11de0 + bifreq_push_eng afb11 + bifreq_push_eng 13db + bifreq_push_eng 87150 + bifreq_push_eng 2bb8 + bifreq_push_eng 161ac4d + bifreq_push_eng 2597cd + bifreq_push_eng 2385ff + bifreq_push_eng 9c55cb + bifreq_push_eng 1cf9c9e + bifreq_push_eng 293cba + bifreq_push_eng e2308 + bifreq_push_eng 1370c0 + bifreq_push_eng 1636521 + bifreq_push_eng 354fa + bifreq_push_eng 11c39a + bifreq_push_eng 177edcb + bifreq_push_eng 21d242 + bifreq_push_eng b7abc + bifreq_push_eng edfb16 + bifreq_push_eng 26d155 + bifreq_push_eng 12d5c + bifreq_push_eng 16f744 + bifreq_push_eng 84607c + bifreq_push_eng 6805f9 + bifreq_push_eng 432efc + bifreq_push_eng 12e50f + bifreq_push_eng 1c070b + bifreq_push_eng 3c6b + bifreq_push_eng d1afcf + bifreq_push_eng dfe2 + bifreq_push_eng 14d131a + bifreq_push_eng 3ee4a4 + bifreq_push_eng 10cf9f + bifreq_push_eng 75766 + bifreq_push_eng 19f9d65 + bifreq_push_eng ae94f + bifreq_push_eng 459cd + bifreq_push_eng ad8d0 + bifreq_push_eng b9aef0 + bifreq_push_eng 20c77 + bifreq_push_eng 1b1c1 + bifreq_push_eng 74d40 + bifreq_push_eng 38ec4c + bifreq_push_eng 8853d + bifreq_push_eng c59cf0 + bifreq_push_eng 778e24 + bifreq_push_eng 536e + bifreq_push_eng a148b + bifreq_push_eng 3bdba7 + bifreq_push_eng 2ea14a + bifreq_push_eng 394f3a + bifreq_push_eng 2147a + bifreq_push_eng e4e95 + bifreq_push_eng 37aa + bifreq_push_eng 1dbdc9 + bifreq_push_eng 475f + bifreq_push_eng 1674e84 + bifreq_push_eng 36f904 + bifreq_push_eng e8281f + bifreq_push_eng 2c0de82 + bifreq_push_eng 1a10c5b + bifreq_push_eng 4b893d + bifreq_push_eng 24c7dc5 + bifreq_push_eng 3bbe92 + bifreq_push_eng 10a4c48 + bifreq_push_eng 147d0f + bifreq_push_eng 2e6f80 + bifreq_push_eng 3859b9 + bifreq_push_eng 39efc0 + bifreq_push_eng 4f0de3 + bifreq_push_eng 1204d1f + bifreq_push_eng 2d4a3e + bifreq_push_eng 3514e + bifreq_push_eng 2485ec + bifreq_push_eng 1451c35 + bifreq_push_eng 305a31c + bifreq_push_eng 38f47a + bifreq_push_eng 217c66 + bifreq_push_eng 40549f + bifreq_push_eng 1245c + bifreq_push_eng 4245fa + bifreq_push_eng 410dd + bifreq_push_eng 64026d + bifreq_push_eng 5ecba0 + bifreq_push_eng 74aee8 + bifreq_push_eng 741f66 + bifreq_push_eng 27ebf4 + bifreq_push_eng 1d20468 + bifreq_push_eng 3f8636 + bifreq_push_eng 31a983 + bifreq_push_eng 516e28 + bifreq_push_eng a165a + bifreq_push_eng 33d7c2 + bifreq_push_eng d1731b + bifreq_push_eng 14171ac + bifreq_push_eng 3647534 + bifreq_push_eng 9b2a18 + bifreq_push_eng 9f993f + bifreq_push_eng 1df35 + bifreq_push_eng 2b9b607 + bifreq_push_eng cf7669 + bifreq_push_eng 13284f0 + bifreq_push_eng 1dabc5c + bifreq_push_eng 7026fe + bifreq_push_eng deeffd + bifreq_push_eng 9eb5e + bifreq_push_eng 1d7e5c + bifreq_push_eng 37ccc + bifreq_push_eng b82765 + bifreq_push_eng 5a2b8 + bifreq_push_eng 61bb4 + bifreq_push_eng 42b0a + bifreq_push_eng eda146 + bifreq_push_eng 66178 + bifreq_push_eng 338bd + bifreq_push_eng 2b1c80 + bifreq_push_eng 54d3aa + bifreq_push_eng b7c3 + bifreq_push_eng 14449 + bifreq_push_eng 95b902 + bifreq_push_eng e3599 + bifreq_push_eng 2023d + bifreq_push_eng b5d8df + bifreq_push_eng 4a5cb1 + bifreq_push_eng 48af + bifreq_push_eng c9480e + bifreq_push_eng 24454c + bifreq_push_eng 3a2c7b + bifreq_push_eng 3adee4 + bifreq_push_eng bbe9 + bifreq_push_eng 817eb + bifreq_push_eng 1a9e + bifreq_push_eng 60b73 + bifreq_push_eng 25e1 + bifreq_push_eng 11f37 + bifreq_push_eng 6aab + bifreq_push_eng 29ab + bifreq_push_eng 21e6 + bifreq_push_eng 1784 + bifreq_push_eng 224a + bifreq_push_eng a07 + bifreq_push_eng 2ff1 + bifreq_push_eng 11eab + bifreq_push_eng 53e + bifreq_push_eng 7e7 + bifreq_push_eng 2583 + bifreq_push_eng 301b + bifreq_push_eng ee0 + bifreq_push_eng 24b2 + bifreq_push_eng 17ae + bifreq_push_eng 9c3 + bifreq_push_eng 1757 + bifreq_push_eng 516f + bifreq_push_eng 4212 + bifreq_push_eng 3f9ed0 + bifreq_push_eng 1074 + bifreq_push_eng 876d + bifreq_push_eng 2fd + bifreq_push_eng 11cd + bifreq_push_eng 118 + bifreq_push_eng 1b518c9 + bifreq_push_eng 330f24 + bifreq_push_eng 6a6a6f + bifreq_push_eng 89b865 + bifreq_push_eng 3a19ed0 + bifreq_push_eng 346ec8 + bifreq_push_eng 46e432 + bifreq_push_eng 2d4c82 + bifreq_push_eng 1a5abd3 + bifreq_push_eng 7e80d + bifreq_push_eng 448888 + bifreq_push_eng 494aae + bifreq_push_eng 709445 + bifreq_push_eng 6bcc3b + bifreq_push_eng 1be06b2 + bifreq_push_eng 36c05c + bifreq_push_eng 26505 + bifreq_push_eng 59f814 + bifreq_push_eng 1440e0b + bifreq_push_eng 14764bb + bifreq_push_eng 51567d + bifreq_push_eng 29155d + bifreq_push_eng 331625 + bifreq_push_eng 96fe + bifreq_push_eng 861a3b + bifreq_push_eng 1bb18 + bifreq_push_eng 1cafc83 + bifreq_push_eng 54be14 + bifreq_push_eng a4cdfc + bifreq_push_eng 3aa0ca + bifreq_push_eng 1e124f0 + bifreq_push_eng 5cae8b + bifreq_push_eng 1f2f7a + bifreq_push_eng fff007 + bifreq_push_eng 1890c79 + bifreq_push_eng abfba + bifreq_push_eng 236de0 + bifreq_push_eng 4bc294 + bifreq_push_eng 5527d3 + bifreq_push_eng 3f7226 + bifreq_push_eng 16cbd8f + bifreq_push_eng a14b82 + bifreq_push_eng c365a + bifreq_push_eng 359dd0 + bifreq_push_eng 120a170 + bifreq_push_eng 338415f + bifreq_push_eng 990f9d + bifreq_push_eng d75a3 + bifreq_push_eng 8457d2 + bifreq_push_eng c71f + bifreq_push_eng 21c97e + bifreq_push_eng 137e0 + bifreq_push_eng 18efb09 + bifreq_push_eng 3a3823 + bifreq_push_eng 4f4c11 + bifreq_push_eng 23ce14 + bifreq_push_eng 2856205 + bifreq_push_eng 336604 + bifreq_push_eng 1758bd + bifreq_push_eng 6f93ed4 + bifreq_push_eng 28e6dda + bifreq_push_eng 88971 + bifreq_push_eng 9501d + bifreq_push_eng 527201 + bifreq_push_eng 395ef5 + bifreq_push_eng 1b3167 + bifreq_push_eng 2bfa974 + bifreq_push_eng 2ed9db + bifreq_push_eng 26d87 + bifreq_push_eng f169aa + bifreq_push_eng 120bc1a + bifreq_push_eng 1278630 + bifreq_push_eng 815b37 + bifreq_push_eng aa726 + bifreq_push_eng 87f5ae + bifreq_push_eng 6dfc + bifreq_push_eng 7a34d6 + bifreq_push_eng 445c7 + bifreq_push_eng 4609ad + bifreq_push_eng 2da314 + bifreq_push_eng 579f31 + bifreq_push_eng 35660f + bifreq_push_eng 4b315d + bifreq_push_eng ab5c4 + bifreq_push_eng 49bc45 + bifreq_push_eng 52d8d + bifreq_push_eng 351f8a + bifreq_push_eng 15868 + bifreq_push_eng 7db39 + bifreq_push_eng 9b3c1c + bifreq_push_eng 42fb58 + bifreq_push_eng e88243 + bifreq_push_eng 9eab2 + bifreq_push_eng 50fa44 + bifreq_push_eng 5b5a + bifreq_push_eng 1089d15 + bifreq_push_eng ef8d99 + bifreq_push_eng e6f991 + bifreq_push_eng f643 + bifreq_push_eng 33c53 + bifreq_push_eng 561dc + bifreq_push_eng 235ae + bifreq_push_eng 81df8 + bifreq_push_eng 25888 + bifreq_push_eng 3ebc0f + bifreq_push_eng 7208 + bifreq_push_eng e690 + bifreq_push_eng 14e6b + bifreq_push_eng 1bf670d + bifreq_push_eng 6dba + bifreq_push_eng 63f1 + bifreq_push_eng 75fb + bifreq_push_eng 8f20c5 + bifreq_push_eng 2ca8 + bifreq_push_eng 2ccd + bifreq_push_eng bf88 + bifreq_push_eng 88d0 + bifreq_push_eng 813a + bifreq_push_eng 2261ec + bifreq_push_eng f471 + bifreq_push_eng 5d0 + bifreq_push_eng 178a0 + bifreq_push_eng 31d3d + bifreq_push_eng f5c0 + bifreq_push_eng 1438e + bifreq_push_eng 5739 + bifreq_push_eng b228 + bifreq_push_eng c78 + bifreq_push_eng 38e7a + bifreq_push_eng a49 + bifreq_push_eng 100f08a + bifreq_push_eng 60644 + bifreq_push_eng 6d78a + bifreq_push_eng 69a06 + bifreq_push_eng c9305c + bifreq_push_eng 52155 + bifreq_push_eng 22272 + bifreq_push_eng b4dc6d + bifreq_push_eng e821da + bifreq_push_eng 1846b + bifreq_push_eng 245e4 + bifreq_push_eng a0976 + bifreq_push_eng 7b757 + bifreq_push_eng 37b04f + bifreq_push_eng 8af4d7 + bifreq_push_eng 4e8d2 + bifreq_push_eng 3f75 + bifreq_push_eng 12b803 + bifreq_push_eng 1e5877 + bifreq_push_eng 13db2d + bifreq_push_eng 2c294 + bifreq_push_eng f9ba + bifreq_push_eng a4b32 + bifreq_push_eng 1246 + bifreq_push_eng 872af + bifreq_push_eng ce64 + bifreq_push_eng dcbd4 + bifreq_push_eng 16f59 + bifreq_push_eng aa68b + bifreq_push_eng eac5 + bifreq_push_eng 9fa7b + bifreq_push_eng 1b987 + bifreq_push_eng 9979 + bifreq_push_eng 28ac7 + bifreq_push_eng fa2e0 + bifreq_push_eng 2985 + bifreq_push_eng 3553 + bifreq_push_eng e8c1 + bifreq_push_eng 1f204 + bifreq_push_eng 87ae + bifreq_push_eng 338e5 + bifreq_push_eng 1c1638 + bifreq_push_eng 1528 + bifreq_push_eng 15fbe + bifreq_push_eng 25aeb + bifreq_push_eng 170a51 + bifreq_push_eng 2404d + bifreq_push_eng 798d + bifreq_push_eng 1d21a + bifreq_push_eng 88ec + bifreq_push_eng 17079 + bifreq_push_eng 822 + bifreq_push_eng 6e777c + bifreq_push_eng 292652 + bifreq_push_eng 2fbaf5 + bifreq_push_eng 206261 + bifreq_push_eng 632be9 + bifreq_push_eng 232cdc + bifreq_push_eng 1001fa + bifreq_push_eng 22f649 + bifreq_push_eng 44129e + bifreq_push_eng 5c737 + bifreq_push_eng 5fb11 + bifreq_push_eng 1ebaf3 + bifreq_push_eng 266531 + bifreq_push_eng 16ab57 + bifreq_push_eng 8aadf1 + bifreq_push_eng 276567 + bifreq_push_eng 15791 + bifreq_push_eng 1eda33 + bifreq_push_eng 730ba5 + bifreq_push_eng 667327 + bifreq_push_eng a9cd8 + bifreq_push_eng 6475f + bifreq_push_eng 338f78 + bifreq_push_eng 4231 + bifreq_push_eng 514ad + bifreq_push_eng 131c9 + bifreq_push_eng e2d5f + bifreq_push_eng c5dc + bifreq_push_eng a04d + bifreq_push_eng 808a + bifreq_push_eng 1a172f + bifreq_push_eng 6ff2 + bifreq_push_eng 6701 + bifreq_push_eng 1a477 + bifreq_push_eng 9d3c3 + bifreq_push_eng 1bff + bifreq_push_eng 5ec6 + bifreq_push_eng 138a7 + bifreq_push_eng b3d2 + bifreq_push_eng 5eb1 + bifreq_push_eng 67850 + bifreq_push_eng 76b5 + bifreq_push_eng 168d + bifreq_push_eng 7fad + bifreq_push_eng 17311 + bifreq_push_eng de7b + bifreq_push_eng 1bb82 + bifreq_push_eng 3803 + bifreq_push_eng 10d01 + bifreq_push_eng 99f + bifreq_push_eng 19d8f + bifreq_push_eng 3605b +exit diff --git a/sts/cipher.sts b/sts/cipher.sts new file mode 100644 index 0000000..c87b67a --- /dev/null +++ b/sts/cipher.sts @@ -0,0 +1,12 @@ +defword cipher + 3 ref as cipher.byte + 2 get as cipher.password + 1 get as cipher.len + 0 get as cipher.pos + cipher.pos @ word_size mul cipher.password + @ + cipher.byte @ xor + cipher.byte ! + cipher.pos @ 0 = if cipher.len cipher.pos ! fi + cipher.pos @ 1 - cipher.pos ! + drop drop drop +exit diff --git a/sts/common/.print.sts.swp b/sts/common/.print.sts.swp new file mode 100644 index 0000000..d3a74a8 Binary files /dev/null and b/sts/common/.print.sts.swp differ diff --git a/sts/common/common.sts b/sts/common/common.sts new file mode 100644 index 0000000..e0e33cf --- /dev/null +++ b/sts/common/common.sts @@ -0,0 +1,3 @@ +module sts/common/macro.sts +module sts/common/const.sts +module sts/common/print.sts diff --git a/sts/common/const.sts b/sts/common/const.sts new file mode 100644 index 0000000..b1a08b0 --- /dev/null +++ b/sts/common/const.sts @@ -0,0 +1,95 @@ +defconst newline 0a +defconst space 20 +defconst '!' 21 +defconst '"' 22 +defconst '#' 23 +defconst '$' 24 +defconst percent 25 ; '%' (25) symbol is reserved by smack +defconst '&' 26 +defconst ''' 27 +defconst '(' 28 +defconst ')' 29 +defconst '*' 2a +defconst '+' 2b +defconst ',' 2c +defconst '-' 2d +defconst '.' 2e +defconst '/' 2f +defconst '0' 30 +defconst '1' 31 +defconst '2' 32 +defconst '3' 33 +defconst '4' 34 +defconst '5' 35 +defconst '6' 36 +defconst '7' 37 +defconst '8' 38 +defconst '9' 39 +defconst ':' 3a +defconst '<' 3c +defconst '=' 3d +defconst '>' 3e +defconst '?' 3f +defconst '@' 40 +defconst 'A' 41 +defconst 'B' 42 +defconst 'C' 43 +defconst 'D' 44 +defconst 'E' 45 +defconst 'F' 46 +defconst 'G' 47 +defconst 'H' 48 +defconst 'I' 49 +defconst 'J' 4a +defconst 'K' 4b +defconst 'L' 4c +defconst 'M' 4d +defconst 'N' 4e +defconst 'O' 4f +defconst 'P' 50 +defconst 'Q' 51 +defconst 'R' 52 +defconst 'S' 53 +defconst 'T' 54 +defconst 'U' 55 +defconst 'V' 56 +defconst 'W' 57 +defconst 'X' 58 +defconst 'Y' 59 +defconst 'Z' 5a +defconst '[' 5b +defconst '\' 5c +defconst ']' 5d +defconst '^' 5e +defconst '_' 5f +defconst '`' 60 +defconst 'a' 61 +defconst 'b' 62 +defconst 'c' 63 +defconst 'd' 64 +defconst 'e' 65 +defconst 'f' 66 +defconst 'g' 67 +defconst 'h' 68 +defconst 'i' 69 +defconst 'j' 6a +defconst 'k' 6b +defconst 'l' 6c +defconst 'm' 6d +defconst 'n' 6e +defconst 'o' 6f +defconst 'p' 70 +defconst 'q' 71 +defconst 'r' 72 +defconst 's' 73 +defconst 't' 74 +defconst 'u' 75 +defconst 'v' 76 +defconst 'w' 77 +defconst 'x' 78 +defconst 'y' 79 +defconst 'z' 7a +defconst '{' 7b +defconst '|' 7c +defconst '}' 7d +defconst '~' 7e diff --git a/sts/common/macro.sts b/sts/common/macro.sts new file mode 100644 index 0000000..162bf2f --- /dev/null +++ b/sts/common/macro.sts @@ -0,0 +1,9 @@ +[ local 1 + top as %1% +] + +[ change 0 + 1 + dup get + swap 2 get swap set + swap drop +] diff --git a/sts/common/print.sts b/sts/common/print.sts new file mode 100644 index 0000000..a3bea56 --- /dev/null +++ b/sts/common/print.sts @@ -0,0 +1,30 @@ +defword get_hex + f and + dup 9 > if + a - 'a' + + else + '0' + + fi +exit + +defword print_hex + dup 1c shr get_hex sys_write + dup 18 shr get_hex sys_write + dup 14 shr get_hex sys_write + dup 10 shr get_hex sys_write + dup c shr get_hex sys_write + dup 8 shr get_hex sys_write + dup 4 shr get_hex sys_write + get_hex sys_write +exit + +defword print_stack + dup + do + over over - 2 + get print_hex + 1 - dup 0 = until + space sys_write + od newline sys_write + drop + drop +exit diff --git a/sts/freq.sts b/sts/freq.sts new file mode 100644 index 0000000..9935d72 --- /dev/null +++ b/sts/freq.sts @@ -0,0 +1,35 @@ +[ freq_push_eng 1 + %1% float_iload + 1 04b7e520 float_dload + float_div + float_fstore +] + +defword freq_eng + freq_push_eng 164bbb40 ; 'A' + freq_push_eng 42f1a72 ; 'B' + freq_push_eng 8401143 ; 'C' + freq_push_eng a17c760 ; 'D' + freq_push_eng 1f89b0b5 ; 'E' + freq_push_eng 5b00667 ; 'F' + freq_push_eng 5708064 ; 'G' + freq_push_eng ceba1cf ; 'H' + freq_push_eng 131911c9 ; 'I' + freq_push_eng 92b062 ; 'J' + freq_push_eng 21bc198 ; 'K' + freq_push_eng af78ee2 ; 'L' + freq_push_eng 6962a60 ; 'M' + freq_push_eng 12b2fedc ; 'N' + freq_push_eng 1377f19c ; 'O' + freq_push_eng 5630a2b ; 'P' + freq_push_eng 456e16 ; 'Q' + freq_push_eng 1082b289 ; 'R' + freq_push_eng 118aaa32 ; 'S' + freq_push_eng 174da771 ; 'T' + freq_push_eng 6fdcaa4 ; 'U' + freq_push_eng 2c30c89 ; 'V' + freq_push_eng 4c25150 ; 'W' + freq_push_eng 7fb6fb ; 'X' + freq_push_eng 47ce733 ; 'Y' + freq_push_eng 4bece7 ; 'Z' +exit diff --git a/sts/ia32/bitwise.sts b/sts/ia32/bitwise.sts new file mode 100644 index 0000000..205e618 --- /dev/null +++ b/sts/ia32/bitwise.sts @@ -0,0 +1,27 @@ +defasm xor + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 31 ?' # d8 ?' ; xor eax, ebx + # 50 ?' ; push eax +next + +defasm and + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 21 ?' # d8 ?' ; and eax, ebx + # 50 ?' ; push eax +next + +defasm shr + # 59 ?' ; pop ecx + # 58 ?' ; pop eax + # d3 ?' # e8 ?' ; shr eax, cl + # 50 ?' ; push eax +next + +defasm shl + # 59 ?' ; pop ecx + # 58 ?' ; pop eax + # d3 ?' # e0 ?' ; shl eax, cl + # 50 ?' ; push eax +next diff --git a/sts/ia32/branch.sts b/sts/ia32/branch.sts new file mode 100644 index 0000000..35177f6 --- /dev/null +++ b/sts/ia32/branch.sts @@ -0,0 +1,11 @@ +defasm branch + # 8b ?' # 36 ?' ; mov esi, [esi] +next + +defasm 0branch + # 58 ?' ; pop eax + # 83 ?' # c6 ?' # 4 ?' ; add esi, 4 + # 83 ?' # f8 ?' # 0 ?' ; cmp eax, 0 + # 75 ?' # 3 ?' ; jne +3 + # 8b ?' # 76 ?' # fc ?' ; mov esi, [esi - 4] +next diff --git a/sts/ia32/const.sts b/sts/ia32/const.sts new file mode 100644 index 0000000..31f8041 --- /dev/null +++ b/sts/ia32/const.sts @@ -0,0 +1,3 @@ +defconst word_size 4 +defconst word_max ffffffff +defconst word_endianness 0 diff --git a/sts/ia32/core.sts b/sts/ia32/core.sts new file mode 100644 index 0000000..4a5e692 --- /dev/null +++ b/sts/ia32/core.sts @@ -0,0 +1,17 @@ +defasm docol + # 83 ?' # ed ?' # 4 ?' ; sub ebp, 4 + # 89 ?' # 75 ?' # 0 ?' ; mov [ebp], esi + # 83 ?' # c0 ?' # 4 ?' ; add eax, 4 + # 89 ?' # c6 ?' ; mov esi, eax + # ad ?' # ff ?' # 20 ?' ; go next +next + +defasm exit + # 8b ?' # 75 ?' # 0 ?' ; mov esi, [ebp] + # 83 ?' # c5 ?' # 4 ?' ; add ebp, 4 +next + +defasm lit + # ad ?' ; lodsd + # 50 ?' ; push eax +next diff --git a/sts/ia32/elf/begin.sts b/sts/ia32/elf/begin.sts new file mode 100644 index 0000000..16d3355 --- /dev/null +++ b/sts/ia32/elf/begin.sts @@ -0,0 +1,129 @@ +?create ?? _code_segment +_code_segment ?choose + +# 08048000 ?org +# 4 ?size +# 0 ?endianness + +?create ?? _data_segment +_data_segment ?choose + +# 09048000 ?org +# 4 ?size +# 0 ?endianness + +_code_segment ?choose + +; ELF header +; EI_MAG - ELF magic number +# 7f ?' # 45 ?' # 4c ?' # 46 ?' +; EI_CLASS - 32-bit format +# 1 ?' +; EI_DATA - little-endiann +# 1 ?' +; EI_VERSION - current ELF header version +# 1 ?' +; EI_OSABI - Linux ABI +# 3 ?' +; EI_ABIVERSION - none +# 0 ?' +; EI_PAD - padding +# 7 ?res +; Executable file type +# 2 ?2. +; IA-32 architecture +# 3 ?2. +; ELF version +# 1 ?4. +; Entry point +?$ ?? _elf_entry +# 0 ?4. +; Program headers offset +# 34 ?4. +; Section headers offset +# 0 ?4. +; Extra flags +# 0 ?4. +; ELF header size +# 34 ?2. +; Program header size +# 20 ?2. +; Number of program headers +# 2 ?2. +; Section header size +# 28 ?2. +; Number of section headers +# 0 ?2. +; Section name section index +# 0 ?2. + +; ELF CODE PROGRAM HEADER +; Segment type +# 1 ?4. +; Segment offset +# 0 ?4. +; Segment virtual address +?$$ ?4. +; Segment physical address +?$$ ?4. +; Segment file size +?$ ?? _code_segment_file_size +# 0 ?4. +; Segment memory size +?$ ?? _code_segment_memory_size +# 0 ?4. +; Segment flags +# 5 ?4. +; Segment alignment +# 1000 ?4. + +; ELF DATA PROGRAM HEADER +; Segment type +# 1 ?4. +; Segment offset +?$ ?? _data_segment_offset +# 0 ?4. +; Segment virtual address +_data_segment ?choose +?$$ +_code_segment ?choose +?4. +; Segment physical address +_data_segment ?choose +?$$ +_code_segment ?choose +?4. +; Segment file size +?$ ?? _data_segment_file_size +# 0 ?4. +; Segment memory size +?$ ?? _data_segment_memory_size +# 0 ?4. +; Segment flags +# 6 ?4. +; Segment alignment +# 1000 ?4. + +; Return stack +_data_segment ?choose +1000 ?res +?$ ?dup ?? _return_stack +_code_segment ?choose + +; PROGRAM ENTRY CODE +?$ _elf_entry ?! +; mov ebp, _return_stack +# bd ?' +_return_stack ?. +; mov esi, _threaded_code_entry +# be ?' +?$ ?? _threaded_code_entry +# 0 ?. +; lodsd +# ad ?' +; jmp dword [eax] +# ff ?' # 20 ?' + +module sts/ia32/ia32.sts +module sts/ia32/elf/syscall.sts +module sts/common/common.sts diff --git a/sts/ia32/elf/end.sts b/sts/ia32/elf/end.sts new file mode 100644 index 0000000..7c80eec --- /dev/null +++ b/sts/ia32/elf/end.sts @@ -0,0 +1,21 @@ +; Code segment alignment +# 1000 ?$ # 1000 ?mod ?- ?dup ?res + +; Code segment ELF sizes +?$ ?$$ ?- _code_segment_file_size ?! +?$ ?$$ ?- _code_segment_memory_size ?! + +; Data segment ELF offset +?$ ?$$ ?- +_code_segment ?choose +_data_segment_offset ?! + +; Data segment ELF sizes +_data_segment ?choose +?$ ?$$ ?- +_code_segment ?choose +_data_segment_file_size ?! +_data_segment ?choose +?$ ?$$ ?- +_code_segment ?choose +_data_segment_memory_size ?! diff --git a/sts/ia32/elf/syscall.sts b/sts/ia32/elf/syscall.sts new file mode 100644 index 0000000..3acfef2 --- /dev/null +++ b/sts/ia32/elf/syscall.sts @@ -0,0 +1,41 @@ +defasm sys_exit + # b8 ?' # 1 ?. ; mov eax, 1 + # 31 ?' # db ?' ; xor ebx, ebx + # cd ?' # 80 ?' ; int 0x80 +; no need in next since this is the last instruction + +_data_segment ?choose + ?$ ?? _iobuf # 0 ?. +_code_segment ?choose + +defasm sys_read + # b8 ?' # 3 ?. ; mov eax, 3 + # 31 ?' # db ?' ; xor ebx, ebx + # b9 ?' _iobuf ?. ; mov ecx, _iobuf + # ba ?' # 1 ?. ; mov edx, 1 + # cd ?' # 80 ?' ; int 0x80 + # 31 ?' # db ?' ; xor ebx, ebx + # 8a ?' # 1d ?' _iobuf ?. ; mov bl, [_iobuf] + # 53 ?' ; push ebx + # 50 ?' ; push eax +next + +defasm sys_write + # 58 ?' ; pop eax + # a2 ?' _iobuf ?. ; mov [_iobuf], al + # b8 ?' # 4 ?. ; mov eax, 4 + # bb ?' # 1 ?. ; mov ebx, 1 + # b9 ?' _iobuf ?. ; mov ecx, _iobuf + # ba ?' # 1 ?. ; mov edx, 1 + # cd ?' # 80 ?' ; int 0x80 +next + +defasm sys_write_err + # 58 ?' ; pop eax + # a2 ?' _iobuf ?. ; mov [_iobuf], al + # b8 ?' # 4 ?. ; mov eax, 4 + # bb ?' # 2 ?. ; mov ebx, 2 + # b9 ?' _iobuf ?. ; mov ecx, _iobuf + # ba ?' # 1 ?. ; mov edx, 1 + # cd ?' # 80 ?' ; int 0x80 +next diff --git a/sts/ia32/float/control.sts b/sts/ia32/float/control.sts new file mode 100644 index 0000000..3863f5f --- /dev/null +++ b/sts/ia32/float/control.sts @@ -0,0 +1,19 @@ +defasm float_init + # 9b ?' ; wait + # db ?' # e3 ?' ; fninit +next + +defasm float_cload + # d9 ?' # 2c ?' # 24 ?' ; fldcw [esp] + # 58 ?' ; pop eax +next + +defasm float_sstore + # 9b ?' # df ?' # e0 ?' ; fstsw ax + # 50 ?' ; push eax +next + +defasm float_cstore + # 50 ?' ; push eax + # d9 ?' # 3c ?' # 24 ?' ; fstcw [esp] +next diff --git a/sts/ia32/float/float.sts b/sts/ia32/float/float.sts new file mode 100644 index 0000000..acaf3a0 --- /dev/null +++ b/sts/ia32/float/float.sts @@ -0,0 +1,3 @@ +module sts/ia32/float/control.sts +module sts/ia32/float/stack.sts +module sts/ia32/float/math.sts diff --git a/sts/ia32/float/math.sts b/sts/ia32/float/math.sts new file mode 100644 index 0000000..d02b491 --- /dev/null +++ b/sts/ia32/float/math.sts @@ -0,0 +1,32 @@ +defasm float_add + # de ?' # c1 ?' ; faddp st1, st0 +next + +defasm float_sub + # de ?' # e9 ?' ; fsubp st1, st0 +next + +defasm float_mul + # de ?' # c9 ?' ; fmullp st1, st0 +next + +defasm float_div + # de ?' # f9 ?' ; fdivp st1, st0 +next + +defasm float_sqrt + # d9 ?' # fa ?' ; fsqrt +next + +defasm float_more + # de ?' # d9 ?' ; fcompp + # 9b ?' # df ?' # e0 ?' ; fstsw ax + # 25 ?' # 100 ?. ; and eax, 0x100 + # c1 ?' # e8 ?' # 8 ?' ; shr eax, 8 + # 50 ?' ; push eax +next + +defword float_less + float_more + 0 = +exit diff --git a/sts/ia32/float/stack.sts b/sts/ia32/float/stack.sts new file mode 100644 index 0000000..8c16fef --- /dev/null +++ b/sts/ia32/float/stack.sts @@ -0,0 +1,25 @@ +defasm float_fload + # d9 ?' # 04 ?' # 24 ?' ; fld dword [esp] + # 58 ?' ; pop eax +next + +defasm float_iload + # db ?' # 04 ?' # 24 ?' ; fild dword [esp] + # 58 ?' ; pop eax +next + +defasm float_dload + # df ?' # 2c ?' # 24 ?' ; fild qword [esp] + # 58 ?' ; pop eax + # 58 ?' ; pop eax +next + +defasm float_fstore + # 50 ?' ; push eax + # d9 ?' # 1c ?' # 24 ?' ; fstp dword [esp] +next + +defasm float_istore + # 50 ?' ; push eax + # db ?' # 1c ?' # 24 ?' ; fistp dword [esp] +next diff --git a/sts/ia32/ia32.sts b/sts/ia32/ia32.sts new file mode 100644 index 0000000..dc3d06f --- /dev/null +++ b/sts/ia32/ia32.sts @@ -0,0 +1,8 @@ +module sts/ia32/macro.sts +module sts/ia32/const.sts +module sts/ia32/core.sts +module sts/ia32/stack.sts +module sts/ia32/branch.sts +module sts/ia32/memory.sts +module sts/ia32/math.sts +module sts/ia32/bitwise.sts diff --git a/sts/ia32/macro.sts b/sts/ia32/macro.sts new file mode 100644 index 0000000..fa9510b --- /dev/null +++ b/sts/ia32/macro.sts @@ -0,0 +1,86 @@ +[ next 0 + # ad ?' # ff ?' # 20 ?' +] + +[ defasm 1 + [ %1% 0 + _%0% ?. + \] + ?$ ?? _%1% + ?$ # 4 ?+ ?. +] + +[ defword 1 + [ %1% 0 + _%0% ?. + \] + ?$ ?? _%1% + _docol # 4 ?+ ?. +] + +[ defconst 2 + defasm %1% + # 68 ?' # %2% ?. ; push %2% + next +] + +[ defarr 2 + _data_segment ?choose + ?$ ?? _%1%_arr + # %2% # 4 ?* ?res + _code_segment ?choose + defasm %1% + # 68 ?' _%1%_arr ?. ; push _%1%_arr + next +] + +[ defvar 1 + defarr %1% 1 +] + +[ as 1 + _data_segment ?choose + defword %1% + lit ?$ # 0 ?. + exit + _code_segment ?choose + lit ?. ! +] + +[ literal 0 + lit # %1% ?. +] + +[ set_entry 0 + ?$ _threaded_code_entry ?! +] + +[ if 0 + 0branch ?$ # 0 ?. +] + +[ fi 0 + ?$ ?swap ?! +] + +[ else 0 + branch ?$ # 0 ?. + ?swap ?$ ?swap ?! +] + +[ do 0 + ?$ +] + +[ untilod 0 + 0branch ?. +] + +[ until 0 + 0 = 0branch ?$ # 0 ?. +] + +[ od 0 + branch ?swap ?. + ?$ ?swap ?! +] diff --git a/sts/ia32/math.sts b/sts/ia32/math.sts new file mode 100644 index 0000000..609a21a --- /dev/null +++ b/sts/ia32/math.sts @@ -0,0 +1,68 @@ +defasm + + # 58 ?' ; pop eax + # 01 ?' # 04 ?' # 24 ?' ; add [esp], eax +next + +defasm - + # 58 ?' ; pop eax + # 29 ?' # 04 ?' # 24 ?' ; sub [esp], eax +next + +defasm mul + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # f7 ?' # e3 ?' ; mul ebx + # 50 ?' ; push eax +next + +defasm mod + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 31 ?' # d2 ?' ; xor edx, edx + # f7 ?' # f3 ?' ; div ebx + # 52 ?' ; push edx +next + +defasm div + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 31 ?' # d2 ?' ; xor edx, edx + # f7 ?' # f3 ?' ; div ebx + # 50 ?' ; push eax +next + +defasm = + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 39 ?' # d8 ?' ; cmp eax, ebx + # 0f ?' # 94 ?' # c0 ?' ; sete al + # 0f ?' # b6 ?' # c0 ?' ; movzx eax, al + # 50 ?' ; push eax +next + +defasm != + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 39 ?' # d8 ?' ; cmp eax, ebx + # 0f ?' # 95 ?' # c0 ?' ; setne al + # 0f ?' # b6 ?' # c0 ?' ; movzx eax, al + # 50 ?' ; push eax +next + +defasm < + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 39 ?' # d8 ?' ; cmp eax, ebx + # 0f ?' # 92 ?' # c0 ?' ; setb al + # 0f ?' # b6 ?' # c0 ?' ; movzx eax, al + # 50 ?' ; push eax +next + +defasm > + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 39 ?' # d8 ?' ; cmp eax, ebx + # 0f ?' # 97 ?' # c0 ?' ; seta al + # 0f ?' # b6 ?' # c0 ?' ; movzx eax, al + # 50 ?' ; push eax +next diff --git a/sts/ia32/memory.sts b/sts/ia32/memory.sts new file mode 100644 index 0000000..240c598 --- /dev/null +++ b/sts/ia32/memory.sts @@ -0,0 +1,10 @@ +defasm @ + # 58 ?' ; pop eax + # ff ?' # 30 ?' ; push dword [eax] +next + +defasm ! + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 89 ?' # 03 ?' ; mov [ebx], eax +next diff --git a/sts/ia32/stack.sts b/sts/ia32/stack.sts new file mode 100644 index 0000000..e884098 --- /dev/null +++ b/sts/ia32/stack.sts @@ -0,0 +1,41 @@ +defasm top + # 54 ?' ; push esp +next + +defasm ref + # 58 ?' ; pop eax + # c1 ?' # e0 ?' # 2 ?' ; shl eax, 2 + # 01 ?' # e0 ?' ; add eax, esp + # 50 ?' ; push eax +next + +defasm get + # 58 ?' ; pop eax + # 8b ?' # 4 ?' # 84 ?' ; mov eax, [esp + 4 * eax] + # 50 ?' ; push eax +next + +defasm set + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 89 ?' # 04 ?' # 9c ?' ; mov [esp + 4 * ebx], eax +next + +defasm drop + # 58 ?' ; pop eax +next + +defasm dup + # ff ?' # 34 ?' # 24 ?' ; push dword [esp] +next + +defasm over + # ff ?' # 74 ?' # 24 ?' # 4 ?' ; push dword [esp + 4] +next + +defasm swap + # 58 ?' ; pop eax + # 5b ?' ; pop ebx + # 50 ?' ; push eax + # 53 ?' ; push ebx +next diff --git a/sts/keygen.sts b/sts/keygen.sts new file mode 100644 index 0000000..6067c0d --- /dev/null +++ b/sts/keygen.sts @@ -0,0 +1,34 @@ +defword keygen + ; Increment + 0 + do + over over = until + dup 2 + get + dup ff < if + 1 + over 2 + set + drop + exit + fi + drop 0 over 2 + set + 1 + + od + drop + + ; Clean old stack data + dup + do + dup 0 = until + 1 get 2 set swap drop + 1 - + od + drop + + 1 + + 0 + do + over over = until + dup 2 get 1 set 0 2 set + 1 + + od + drop +exit -- cgit v1.2.3