From db4ce66684fa01ba298c7e9461ec2eea896f6d47 Mon Sep 17 00:00:00 2001 From: CrazyEttin <> Date: Fri, 9 Jul 2021 22:12:33 +0300 Subject: [PATCH] Switch from direct zip files to sources as uncompressed files. --- CONVERT.ZIP | Bin 4368 -> 0 bytes CONVERT/CC0 | 116 ++++++++++ CONVERT/DEC2HEX.ASM | 87 ++++++++ CONVERT/HEX2DEC.ASM | 101 +++++++++ CONVERT/README.MD | 15 ++ KEYCODE.ZIP | Bin 1811 -> 0 bytes KEYCODE/KEYCODE.ASM | 86 +++++++ KEYCODE/LICENSE.MD | 23 ++ KEYCODE/README.MD | 10 + README.MD | 19 +- ROT13.ZIP | Bin 3485 -> 0 bytes ROT13/CC0 | 116 ++++++++++ ROT13/README.MD | 15 ++ ROT13/ROT13.ASM | 38 ++++ TEMPLE.ZIP | Bin 7205 -> 0 bytes TEMPLE/LICENSE.MD | 128 +++++++++++ TEMPLE/README.MD | 19 ++ TEMPLE/TEMPLE.ASM | 532 ++++++++++++++++++++++++++++++++++++++++++++ make.sh | 26 +++ 19 files changed, 1326 insertions(+), 5 deletions(-) delete mode 100644 CONVERT.ZIP create mode 100644 CONVERT/CC0 create mode 100644 CONVERT/DEC2HEX.ASM create mode 100644 CONVERT/HEX2DEC.ASM create mode 100644 CONVERT/README.MD delete mode 100644 KEYCODE.ZIP create mode 100644 KEYCODE/KEYCODE.ASM create mode 100644 KEYCODE/LICENSE.MD create mode 100644 KEYCODE/README.MD delete mode 100644 ROT13.ZIP create mode 100644 ROT13/CC0 create mode 100644 ROT13/README.MD create mode 100644 ROT13/ROT13.ASM delete mode 100644 TEMPLE.ZIP create mode 100644 TEMPLE/LICENSE.MD create mode 100644 TEMPLE/README.MD create mode 100644 TEMPLE/TEMPLE.ASM create mode 100755 make.sh diff --git a/CONVERT.ZIP b/CONVERT.ZIP deleted file mode 100644 index 8ad3548fd5049d8b002b9c14f82e5d477c3f4c52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 liter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+vpZH z^XaR#x%d3NaSnc5ws`$lo23yKW7! zi?>%!cfo()Q3(&&F%QI$Z?znej%lE2u$}pYa}Pb#vL?tslV2nuWZs?&b>s7vH!^O_ zw9o4|>Vs6y&TiMLVb|;EYD$%6$UbLV9hD$SOzLVD>*LiA0!y$F8YFnne8pjM zLu%r!@(g!id-nhz*8~`5p%qsAB^PIxuLyYZ0gLpCFAsP^jh{Wrg-{PedQd#Fvnc2U zn`{8-2tbJPi} zG@ZLAqkeD}{oI_L+O=KNFV-=y@tKM(f5Trfs-F{Qw%Mrd^*f57w-Iicu&DAJd%Ixt zhbGQ*5Tle7gUQLvx0M_!^P}H8=;2sbMj_Ywy`?KYA0h7k#fu-}9!b_iFt&<7kvSjt znZ0FNa@xNkEhfh{uH?+-Tgd(BS6 zRJ9=$1#yLD2QRr(CdZS3?4^&t4fK=`nNy=^ds1J$e%?h!K?8It!5_?tW#&8V^nrAi zGklwQ87aLFk8_c-Lyv?BR;m58@6l%o*RaCdyu3myqA%>UZ4RkUpXCr}DA|A6HTlBE zF6VBv#qTt@)6{1jFL&zRFiRKtS z>S4%&sA6{NNiN5(4Z$F5$HrJq+cL4j-QJ#)gzv~5&^V%@+2F_&`}kt-4opyg-{$IN zxhaDH+UjWN^cepa!BgFnJpgdu+X00kzn=ca^H_iK{6D(pKL!7egMSsoLPb diff --git a/CONVERT/CC0 b/CONVERT/CC0 new file mode 100644 index 0000000..72cdf27 --- /dev/null +++ b/CONVERT/CC0 @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/CONVERT/DEC2HEX.ASM b/CONVERT/DEC2HEX.ASM new file mode 100644 index 0000000..23fa322 --- /dev/null +++ b/CONVERT/DEC2HEX.ASM @@ -0,0 +1,87 @@ +cpu 8086 +org 0x3000 + +xor dx, dx + +cmp byte [si], 0 +jne atoi + +mov ah, 2 +mov si, overflow_msg +int 0x21 +int 0x20 + +atoi: + lodsb + + cmp al, 0 + je .end + + cmp al, '0' + jl .notdigit + + cmp al, '9' + jg .notdigit + + xor ah, ah + sub al, '0' + mov cx, ax + + mov ax, dx + mul word [ten] + test dx, dx + jnz .overflow + + mov dx, ax + add dx, cx + jc .overflow + + jmp atoi + + .notdigit: + mov byte [char_slot], al + mov si, notdigit_msg + mov ah, 2 + int 0x21 + int 0x20 + + .overflow: + mov si, overflow_msg + mov ah, 2 + int 0x21 + int 0x20 + + .end: + +std +mov di, hexstring+3 +xor bh, bh +mov cx, 4 +itoh: + mov bl, 0xf + and bl, dl + mov al, [hexdigits + bx] + stosb + + shr dx, 1 + shr dx, 1 + shr dx, 1 + shr dx, 1 + + loop itoh + +cld + +mov si, hexstring +mov ah, 2 +int 0x21 +int 0x20 + +notdigit_msg db "Not a digit '" +char_slot db 0, "'", 0 +overflow_msg db "Value must be in range 0 to 65535", 0 + +hexstring db "xxxx", 0 + +hexdigits db "0123456789abcdef" +ten dw 10 diff --git a/CONVERT/HEX2DEC.ASM b/CONVERT/HEX2DEC.ASM new file mode 100644 index 0000000..70e3c83 --- /dev/null +++ b/CONVERT/HEX2DEC.ASM @@ -0,0 +1,101 @@ +cpu 8086 +org 0x3000 + +xor dx, dx + +cmp byte [si], 0 +jne htoi + +mov ah, 2 +mov si, overflow_msg +int 0x21 +int 0x20 + +htoi: + lodsb + + cmp al, 0 + je .end + + .digit09: + cmp al, '0' + jl .notdigit + + cmp al, '9' + jg .digitcapital + + sub al, '0' + jmp .digit + + .digitcapital: + cmp al, 'A' + jl .notdigit + + cmp al, 'F' + jg .digitminuscule + + sub al, 'A' - 10 + jmp .digit + + .digitminuscule: + cmp al, 'a' + jl .notdigit + + cmp al, 'f' + jg .notdigit + + sub al, 'a' - 10 + jmp .digit + + .digit: + xor ah, ah + + test dx, 0xf000 + jnz .overflow + + shl dx, 1 + shl dx, 1 + shl dx, 1 + shl dx, 1 + or dx, ax + + jmp htoi + + .notdigit: + mov byte [char_slot], al + mov si, notdigit_msg + mov ah, 2 + int 0x21 + int 0x20 + + .overflow: + mov si, overflow_msg + mov ah, 2 + int 0x21 + int 0x20 + + .end: + +mov si, decimalstring + 5 +mov ax, dx +itoa: + dec si + xor dx, dx + div word [ten] + add dl, '0' + mov byte [si], dl + + test ax, ax + jnz itoa + +mov ah, 2 +int 0x21 +int 0x20 + +notdigit_msg db "Not a digit '" +char_slot db 0, "'", 0 +overflow_msg db "Value must be in range 0 to ffff", 0 + +decimalstring db "xxxxx", 0 + +ten dw 10 diff --git a/CONVERT/README.MD b/CONVERT/README.MD new file mode 100644 index 0000000..f253093 --- /dev/null +++ b/CONVERT/README.MD @@ -0,0 +1,15 @@ +CONVERT +======= + +DEC2HEX and HEX2DEC convert numbers to and from decimal and hexadecimal +bases. They were written by nortti, and are originally from their +ettinos-programs repository, which can be found at +https://ahti.space/git/nortti/ettinos-programs/. + +Syntax: DEC2HEX|HEX2DEC number + +*** + +This package is part of EttinOS-extra, a collection of programs for +EttinOS, the git repository of which can be found at +https://ahti.space/git/crazyettin/EttinOS-extra. diff --git a/KEYCODE.ZIP b/KEYCODE.ZIP deleted file mode 100644 index e14769b09b57c2b598a367710f8fff02c2e1c383..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1811 zcmaKtc{tR09LIl*$u*WnG9$)Onv^RhLrG~E_c0h|h=wF2SFYJuM`PL1nz=lguGf8NjYexCR1^LDfWiEIG?KnzIBo^)C? zK0#R*0)ToE0FVR}0UL87#=*>7+tk?(?;;L>@JbUTvDiscWQ-&rBr*vCfG@{s=Z@e3 zU73fHtV5cy5s{bkn413d4BnUvGv438k}|!N~*=%!-^}!WjV{g^kVoM1FL%FK7jpa>p}}0PQwBAkUn>ZdkRV3l zf(SX8o0{2~YulN92~Z<>lH_*wy8z)Y?sWj|g(QEpT#}|a+~%YcB+&F9&{@e{oi*|$ zr=dpJ(ADMrT9Q{ZJ${-Yj{LM5n?H=5@j{H}N3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Dn4emHCt#0aR_Fe(IcpGU?2 j$bFC7M!Ca+YT5{&K<_hr-|2xjeRcv8EWY5D`tth=BV6>$ diff --git a/KEYCODE/KEYCODE.ASM b/KEYCODE/KEYCODE.ASM new file mode 100644 index 0000000..e2d95c6 --- /dev/null +++ b/KEYCODE/KEYCODE.ASM @@ -0,0 +1,86 @@ +cpu 8086 +org 0x3000 + +;Store a keycode +;Read a keypress +mov ah, 0x0 +int 0x16 +;Store the keycode +mov [scan], ah +mov [ascii], al + +;Print the prefix +mov si, prefix +mov ah, 0x0 +int 0x21 + +;Convert the keycode to a hex string +;Convert the scancode +mov al, [scan] +mov di, keycode +call byte2hex +;Convert the ascii value +mov al, [ascii] +mov di, keycode +add di, 0x2 +call byte2hex + +;Print the keycode +mov si, keycode +mov ah, 0x2 +int 0x21 + +;Return +int 0x20 + +;Data +prefix db "0x", 0x0 +scan db 0x0 +ascii db 0x0 +keycode times 0x5 db 0x0 + +;*** + +;Convert the value of a byte to a hex string +byte2hex: + +;Store AX, BX, CX, and SI in the stack +push ax +push bx +push cx +push si + +;Setup +;Move the byte to AH +mov ah, al +;Set SI to the hex digit key +mov si, key +;Set a counter for the two hex digits +mov cx, 0x2 + +;Convert the byte +;Read a nibble +loop: +times 0x4 rol ax, 0x1 +mov bx, ax +;Convert the nibble to a hex digit +and bx, 0xf +mov bl, [si + bx] +;Store the hex digit +mov [di], bl +;Convert the next nibble +inc di +dec cx +jnz loop + +;Load SI, CX, BX, and AX from the stack +pop si +pop cx +pop bx +pop ax + +;Return +ret + +;Data +key db "0123456789abcdef" diff --git a/KEYCODE/LICENSE.MD b/KEYCODE/LICENSE.MD new file mode 100644 index 0000000..82c2d65 --- /dev/null +++ b/KEYCODE/LICENSE.MD @@ -0,0 +1,23 @@ +MIT license +=========== + +Copyright (c) 2021 CrazyEttin + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/KEYCODE/README.MD b/KEYCODE/README.MD new file mode 100644 index 0000000..9147a29 --- /dev/null +++ b/KEYCODE/README.MD @@ -0,0 +1,10 @@ +KEYCODE +======= + +KEYCODE reads a keypress and prints its BIOS keycode. + +*** + +This package is part of EttinOS-extra, a collection of programs for +EttinOS, the git repository of which can be found at +https://ahti.space/git/crazyettin/EttinOS-extra. diff --git a/README.MD b/README.MD index 6a6490f..374200c 100644 --- a/README.MD +++ b/README.MD @@ -1,12 +1,21 @@ EttinOS-extra ============= -EttinOS-extra is a collection of programs for EttinOS. Its git -repository can be found at +EttinOS-extra is a collection of programs for EttinOS organised as +packages. Its git repository can be found at https://ahti.space/git/crazyettin/EttinOS-extra and that of EttinOS itself at https://ahti.space/git/crazyettin/EttinOS. -The programs are provided as packages in the form of zip archives -including the assembly source code and other relevant files. - For copyright and license information see the individual packages. + +Building +-------- + +Build dependencies: + * A Unix-like operating system + * coreutils + * nasm + * zip + +Running make.sh will build the programs in the collection and create a +package in the form of a zip archive for each of the directories. diff --git a/ROT13.ZIP b/ROT13.ZIP deleted file mode 100644 index 01ea3d82a45931eb72dc0e71e8c72149c218dd94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?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zjrx8cc8Pl%=j`4tXgt8%${+cmi~m5CRZfn@{CKK=C7a&n@IyQE9L}X_=#^1#$x1*e z)caY{LPi|5Y&{ffvrsiMyYxG|zd}oPTR+;if}-^}7A)}mNHdndkBgpb3T+$u$*?Q< zw4@&V)coeV_0uS^;UadxjwWEWm{h|Ya0GE=2F2fN$q#S!%sCOlZX=!4SgVmqPm{&> zmnxdo1YIFFshGaut{e4QpM+`ZLo4#*3as}Z3MP$@y#w)--04U5ln>c3>@xKvKYse4 zi;9*J1S=*Q%#LLjIp_$0c9gU9Pd$v3|2`K7lXJq1go{^e{dDdz;t1EVC)~KW#3*Dg z=x}Tftw|Q(fp-S27PS}p5)03kVG21UWg!M3s~c_v2Mv)qc_jgr9q@ZeEHvua?lRyj z*bwJs#&MxZ*0=@gi-i+0cYYVGLduMWTxsv@7((~lm1&LR{zy$nB!M8%cDfk~kIJmzDz`8w~w{H&d G@9tm9=~h1g diff --git a/ROT13/CC0 b/ROT13/CC0 new file mode 100644 index 0000000..72cdf27 --- /dev/null +++ b/ROT13/CC0 @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/ROT13/README.MD b/ROT13/README.MD new file mode 100644 index 0000000..cd409ac --- /dev/null +++ b/ROT13/README.MD @@ -0,0 +1,15 @@ +ROT13 +===== + +ROT13 encodes and decodes a message using the ROT13 cipher. It was +written by nortti, and is originally from their ettinos-programs +repository, which can be found at +https://ahti.space/git/nortti/ettinos-programs/. + +Syntax: ROT13 Message to be encoded or decoded + +*** + +This package is part of EttinOS-extra, a collection of programs for +EttinOS, the git repository of which can be found at +https://ahti.space/git/crazyettin/EttinOS-extra. diff --git a/ROT13/ROT13.ASM b/ROT13/ROT13.ASM new file mode 100644 index 0000000..d568871 --- /dev/null +++ b/ROT13/ROT13.ASM @@ -0,0 +1,38 @@ +cpu 8086 +org 0x3000 + +mov bx, si + +rotloop: + cmp byte [bx], 0 + jz .end + + cmp byte [bx], 'A' + jl .next + cmp byte [bx], 'M' + jle .inc + cmp byte [bx], 'Z' + jle .dec + + cmp byte [bx], 'a' + jl .next + cmp byte [bx], 'm' + jle .inc + cmp byte [bx], 'z' + jle .dec + + .next: + inc bx + jmp short rotloop + + .inc: + add byte [bx], 13 + jmp short .next + .dec: + sub byte [bx], 13 + jmp short .next + .end: + +mov ah, 2 +int 0x21 +int 0x20 diff --git a/TEMPLE.ZIP b/TEMPLE.ZIP deleted file mode 100644 index 7d3be082b52969c7c56ea8ecc8197c4f436223e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7205 zcmaKxWl$WaPCL=XsBcJPa%j002M)e3d&=8?07|?negzxWoVeWB>_3LsC&iL6TKeT~Sj5 z2>>H=d|)W|x4U|v0H9zGVE};t9Om?F?RWaI-t4;GjUa6B&~r`l0hCQSWM|WPu2Bu1 z9GEzVsWi=bytMAgYlW^)_rB)lvQv08!&iL)(VI4^yB(t=Toa?r>Xlz^Ph0KZT|BqM zE7pDA_Sah7Q}I*rH`ZEk1pMAH%jFp>zSlT~`1>}sS-gIWbfZX}IiS|Qu?ke}*k3t} zy(ieF%V#QF(^^ZfkOTD<^yIH>+%|R&@XM`nGj7Ij@TYq)2#>tx7gEnmNHc9-n&XR1 zR1mlGh$b`H%R76D)?W0Gp;r~@Gp#Yt&OMinL>WYvo_-_Lf7Pv|^%d@Tiq@-mS-11+ zW9cbxYwlb^fE-7xO({@u%na0i`b-1~7EI}2xx4@B1wlWP?&Y+Rw!9U@sA*&(@~&fg zdSG5bqILaKB9?l86A#a-V4G<|k!7ydvzx1=4e`6MCrK0g;IDi!s=M|nYC)_ zAJ)gAU+7@@bDyQd#WU|U{>cJ_SEYtWwyA6_;d9!hmFwz&srfMLgRmRA{H!4Uo7E1S z$o}VJ2h5FARHmnh-v$`b;a*(8PfAZDK2rJT<@mUDc1wGo)KM$&8k4__ST}16b-g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eM0zpFs4fFAnx$R5+v zcz?eq#s5CgP22n0j=e>TIe7jKF>d<%$+f;iyl#b6 diff --git a/TEMPLE/README.MD b/TEMPLE/README.MD new file mode 100644 index 0000000..b3c1821 --- /dev/null +++ b/TEMPLE/README.MD @@ -0,0 +1,19 @@ +TEMPLE +====== + +TEMPLE is an assembly port for EttinOS of the web-based text adventure +game In the Temple by nortti. Its original readme is reproduced here: + +A small game about a visit to a temple and the reasons for doing so. + +Can be played online at https://ahti.space/~nortti/in-the-temple/ or at +https://nortti.itch.io/in-the-temple + +The game is distributed under the Creative Commons Zero 1.0 Universal +license. + +*** + +This package is part of EttinOS-extra, a collection of programs for +EttinOS, the git repository of which can be found at +https://ahti.space/git/crazyettin/EttinOS-extra. diff --git a/TEMPLE/TEMPLE.ASM b/TEMPLE/TEMPLE.ASM new file mode 100644 index 0000000..de65798 --- /dev/null +++ b/TEMPLE/TEMPLE.ASM @@ -0,0 +1,532 @@ +cpu 8086 +org 0x3000 + +;Intro +;Print the intro +intro: +mov si, introtxt +mov ah, 0x2 +int 0x21 +;Read any key to start +mov ah, 0x0 +int 0x16 +call readquit + +;Start +;Print the text +mov si, startxt +mov ah, 0x2 +int 0x21 +;Read the player choice +readstart: +mov ah, 0x0 +int 0x16 +cmp al, "1" +je give +cmp al, "2" +je take +cmp al, "3" +je do +call readquit +jmp readstart + +;Giving +;Print the text +give: +mov si, givetxt +mov ah, 0x2 +int 0x21 +;Read the player choice +readgive: +mov ah, 0x0 +int 0x16 +cmp al, "1" +je comb +cmp al, "2" +je coin +call readquit +jmp readgive + +;Giving a Comb +;Print the text +comb: +mov si, combtxt +mov ah, 0x2 +int 0x21 +;Read any key to return back to the beginning +mov ah, 0x0 +int 0x16 +call readquit +mov si, crlf +mov ah, 0x0 +int 0x21 +jmp intro + +;Giving a Coin +;Print the text +coin: +mov si, cointxt +mov ah, 0x2 +int 0x21 +;Read any key to return back to the beginning +mov ah, 0x0 +int 0x16 +call readquit +mov si, crlf +mov ah, 0x0 +int 0x21 +jmp intro + +;Taking +;Print the text +take: +mov si, taketxt +mov ah, 0x2 +int 0x21 +;Read the player choice +readtake: +mov ah, 0x0 +int 0x16 +cmp al, "1" +je bowl +cmp al, "2" +je knife +cmp al, "3" +je idol +call readquit +jmp readtake + +;Taking the Bowl +;Print the text +bowl: +mov si, bowltxt +mov ah, 0x2 +int 0x21 +;Read any key to return back to the beginning +mov ah, 0x0 +int 0x16 +call readquit +mov si, crlf +mov ah, 0x0 +int 0x21 +jmp intro + +;Taking the Knife +;Print the text +knife: +mov si, knifetxt +mov ah, 0x2 +int 0x21 +;Read any key to return back to the beginning +mov ah, 0x0 +int 0x16 +call readquit +mov si, crlf +mov ah, 0x0 +int 0x21 +jmp intro + +;Taking the Idol +;Print the text +idol: +mov si, idoltxt +mov ah, 0x2 +int 0x21 +;Read any key to return back to the beginning +mov ah, 0x0 +int 0x16 +call readquit +mov si, crlf +mov ah, 0x0 +int 0x21 +jmp intro + +;Doing +;Print the text +do: +mov si, dotxt +mov ah, 0x2 +int 0x21 +;Read the player choice +reado: +mov ah, 0x0 +int 0x16 +cmp al, "1" +je sacrifice +cmp al, "2" +je iconoclasm +cmp al, "3" +je prayer +call readquit +jmp reado + +;Making a Sacrifice +;Print the text +sacrifice: +mov si, sacrificetxt +mov ah, 0x2 +int 0x21 +;Read the player choice +readsacrifice: +mov ah, 0x0 +int 0x16 +cmp al, "1" +je bread +cmp al, "2" +je blood +call readquit +jmp readsacrifice + +;A Sacrifice of Bread +;Print the text +bread: +mov si, breadtxt +mov ah, 0x2 +int 0x21 +;Read any key to return back to the beginning +mov ah, 0x0 +int 0x16 +call readquit +mov si, crlf +mov ah, 0x0 +int 0x21 +jmp intro + +;A Sacrifice of Blood +;Print the text +blood: +mov si, bloodtxt +mov ah, 0x2 +int 0x21 +;Read any key to return back to the beginning +mov ah, 0x0 +int 0x16 +call readquit +mov si, crlf +mov ah, 0x0 +int 0x21 +jmp intro + +;Iconoclasm +;Print the text +iconoclasm: +mov si, iconoclasmtxt +mov ah, 0x2 +int 0x21 +;Read any key to return back to the beginning +mov ah, 0x0 +int 0x16 +call readquit +mov si, crlf +mov ah, 0x0 +int 0x21 +jmp intro + +;Prayer +;Print the text +prayer: +mov si, prayertxt +mov ah, 0x2 +int 0x21 +;Read any key to return back to the beginning +mov ah, 0x0 +int 0x16 +call readquit +mov si, crlf +mov ah, 0x0 +int 0x21 +jmp intro + +;Return +done: +int 0x20 + +;Data +introtxt db "In the Temple", 0xd, 0xa,\ + "=============", 0xd, 0xa,\ + 0xd, 0xa,\ + "This is a story of your visit to the temple of ",\ + "Arattavesh.",\ + 0xd, 0xa,\ + 0xd, 0xa,\ + "To choose an option press the corresponding number. ",\ + "To quit the game", 0xd, 0xa,\ + "press Q.", 0xd, 0xa,\ + 0xd, 0xa,\ + "Press any key to start.", 0x0 +startxt db 0xd, 0xa,\ + "Before the Idol", 0xd, 0xa,\ + "---------------", 0xd, 0xa,\ + 0xd, 0xa,\ + "You are in the back of the temple, before the idol of ",\ + "Arattavesh. It is", 0xd, 0xa,\ + "a well made wooden statue painted with gold and blue.",\ + 0xd, 0xa,\ + 0xd, 0xa,\ + "In front of the statue there is an ornate knife and a ",\ + "plain wooden bowl.", 0xd, 0xa,\ + 0xd, 0xa,\ + "You have come here to the sanctum to...", 0xd, 0xa,\ + " 1. give something.", 0xd, 0xa,\ + " 2. take something.", 0xd, 0xa,\ + " 3. do something.", 0x0 +givetxt db 0xd, 0xa,\ + "Giving", 0xd, 0xa,\ + "------", 0xd, 0xa,\ + 0xd, 0xa,\ + "You have arrived to deposit a votive offering to ",\ + "Arattavesh for healing", 0xd, 0xa,\ + "your sickness over the winter. You intend to give...",\ + 0xd, 0xa,\ + " 1. a wooden comb.", 0xd, 0xa,\ + " 2. a silver coin.", 0x0 +combtxt db 0xd, 0xa,\ + "Giving a Comb", 0xd, 0xa,\ + "-------------", 0xd, 0xa,\ + 0xd, 0xa,\ + "You hold a finely carved wooden comb in your hands. ",\ + "It is a comb you", 0xd, 0xa,\ + "have made yourself, the masterpiece that gave you ",\ + "full rights in the", 0xd, 0xa,\ + "guild. You are sacrificing not only its monetary ",\ + "value, but its value to", 0xd, 0xa,\ + "you personally.", 0xd, 0xa,\ + 0xd, 0xa,\ + "You place the comb next to the knife, say a few words ",\ + "asking Arattavesh", 0xd, 0xa,\ + "to accept your payment, and walk back to the door to ",\ + "the sanctum. A", 0xd, 0xa,\ + "priest sprinkles water on you, and closes the heavy ",\ + "door after you step", 0xd, 0xa,\ + "outside.", 0xd, 0xa,\ + 0xd, 0xa,\ + "Press any key to return back to the beginning.", 0x0 +cointxt db 0xd, 0xa,\ + "Giving a Coin", 0xd, 0xa,\ + "-------------", 0xd, 0xa,\ + 0xd, 0xa,\ + "You take out a silver coin from the pouch hanging ",\ + "from your belt. It", 0xd, 0xa,\ + "represents the work of several weeks as a cobbler.",\ + 0xd, 0xa,\ + 0xd, 0xa,\ + "You take the coin and throw it to the fountain that ",\ + "is behind the idol,", 0xd, 0xa,\ + "where you hear it clink against other coins that have ",\ + "been deposited", 0xd, 0xa,\ + "previously.", 0xd, 0xa,\ + 0xd, 0xa,\ + "You turn back and walk through the curtains to the ",\ + "common side of the", 0xd, 0xa,\ + "temple, where other devout are waiting for their turn ",\ + "to enter the", 0xd, 0xa,\ + "sanctum.", 0xd, 0xa,\ + 0xd, 0xa,\ + "Press any key to return back to the beginning.", 0x0 +taketxt db 0xd, 0xa,\ + "Taking", 0xd, 0xa,\ + "------", 0xd, 0xa,\ + 0xd, 0xa,\ + "There it is. Right before you. You steal a glance ",\ + "behing you hoping to", 0xd, 0xa,\ + "make sure that nobody spots you in the darkness as ",\ + "you reach out and", 0xd, 0xa,\ + "grab...", 0xd, 0xa,\ + " 1. the bowl.", 0xd, 0xa,\ + " 2. the knife.", 0xd, 0xa,\ + " 3. the idol.", 0x0 +bowltxt db 0xd, 0xa,\ + "Taking the Bowl", 0xd, 0xa,\ + "---------------", 0xd, 0xa,\ + 0xd, 0xa,\ + "The bowl you had offered just a week before is still ",\ + "here. You had left", 0xd, 0xa,\ + "it as a thanks of your husband's recovery, but now ",\ + "your husband is gone,", 0xd, 0xa,\ + "your fields are destroyed, and all this is the name ",\ + "of Arattavesh.", 0xd, 0xa,\ + 0xd, 0xa,\ + "If the gods shall curse you for breaching the ",\ + "holiness of the sanctum", 0xd, 0xa,\ + "let them, for you curse the gods too. You take that ",\ + "which you dedicated", 0xd, 0xa,\ + 'to Arattavesh and quietly state "You have taken back ',\ + "your gift and so I", 0xd, 0xa,\ + 'shall take back mine" before slipping back into the ',\ + "night.", 0xd, 0xa,\ + 0xd, 0xa,\ + "Press any key to return back to the beginning.", 0x0 +knifetxt db 0xd, 0xa,\ + "Taking the Knife", 0xd, 0xa,\ + "----------------", 0xd, 0xa,\ + 0xd, 0xa,\ + "The knife is very nicely made. You admire it for a ",\ + "small while, before", 0xd, 0xa,\ + "slipping it into the bag you carry around your ",\ + "shoulders.", 0xd, 0xa,\ + 0xd, 0xa,\ + "You aren't committing a sin, or if you are it's not a ",\ + "great one. The", 0xd, 0xa,\ + "chanter who lives in the main city has not yet come ",\ + "and completed the", 0xd, 0xa,\ + "dedication. The one who's knelt before the idol and ",\ + "left it here has", 0xd, 0xa,\ + "merely announced an intention to give it to their god ",\ + "so it's still", 0xd, 0xa,\ + "theirs, and they will not miss it.", 0xd, 0xa,\ + 0xd, 0xa,\ + "If Nagiri holds up his end of the bargain your debt ",\ + "shall be gone come", 0xd, 0xa,\ + "tomorrow and you can leave the land you work but do ",\ + "not own. You get", 0xd, 0xa,\ + "excited, but then try to calm down. It is not over ",\ + "yet.", 0xd, 0xa,\ + 0xd, 0xa,\ + "You walk out into the evening crowd still in the ",\ + "market before the", 0xd, 0xa,\ + "sanctum. There are so many people here nobody will ",\ + "remember and be able", 0xd, 0xa,\ + "to speak against you.", 0xd, 0xa,\ + 0xd, 0xa,\ + "Press any key to return back to the beginning.", 0x0 +idoltxt db 0xd, 0xa,\ + "Taking the Idol", 0xd, 0xa,\ + "---------------", 0xd, 0xa,\ + 0xd, 0xa,\ + "Here it is. The protector god of your village, taken ",\ + "by force when you", 0xd, 0xa,\ + "were but a small child.", 0xd, 0xa,\ + 0xd, 0xa,\ + "They call her Arattavesh, after the river, but you ",\ + "know better. As you", 0xd, 0xa,\ + 'lift the idol you whisper: "Panglya, you shall be ',\ + 'home soon."', 0xd, 0xa,\ + 0xd, 0xa,\ + "Press any key to return back to the beginning.", 0x0 +dotxt db 0xd, 0xa,\ + "Doing", 0xd, 0xa,\ + "-----", 0xd, 0xa,\ + 0xd, 0xa,\ + "Yes, it is finally time. You make sure that ",\ + "everything is just right,", 0xd, 0xa,\ + "and...", 0xd, 0xa,\ + " 1. take the knife.", 0xd, 0xa,\ + " 2. raise your axe.", 0xd, 0xa,\ + " 3. kneel before the idol.", 0x0 +sacrificetxt db 0xd, 0xa,\ + "Making a Sacrifice", 0xd, 0xa,\ + "------------------", 0xd, 0xa,\ + 0xd, 0xa,\ + "You take the blade, and think of the long nights ",\ + "spent replaying the", 0xd, 0xa,\ + "formula of the sacrifice in your head. You've seen ",\ + "ones before, but", 0xd, 0xa,\ + "never this one, for it is one that a priest must do ",\ + "alone.", 0xd, 0xa,\ + 0xd, 0xa,\ + "You say the words, and cut...", 0xd, 0xa,\ + " 1. a loaf of bread.", 0xd, 0xa,\ + " 2. your finger.", 0x0 +breadtxt db 0xd, 0xa,\ + "A Sacrifice of Bread", 0xd, 0xa,\ + "--------------------", 0xd, 0xa,\ + 0xd, 0xa,\ + "As Arattavesh gives you grain, you shall give her ",\ + "back. A slice of every", 0xd, 0xa,\ + "loaf made before the next new moon shall be hers, and ",\ + "the bakers will be", 0xd, 0xa,\ + "giving their share starting tomorrow. But this loaf ",\ + "is special, the", 0xd, 0xa,\ + "first loaf baked from new grain, and it is reserved ",\ + "for the junior", 0xd, 0xa,\ + "priest of the temple. Which is you.", 0xd, 0xa,\ + 0xd, 0xa,\ + "You know that you shall not be too stingy and cut ",\ + "only the skin. You", 0xd, 0xa,\ + "also know you have to be exact and not cut a too big ",\ + "of a slice off. But", 0xd, 0xa,\ + "that is no issue. You end up with a slice that is ",\ + "just right, and place", 0xd, 0xa,\ + "it in the bowl before the idol.", 0xd, 0xa,\ + 0xd, 0xa,\ + "After this is done, you lay the knife back down, and ",\ + "recite one of the", 0xd, 0xa,\ + "old hymns, too old for people to understand anymore. ",\ + "You feel that", 0xd, 0xa,\ + "Arattavesh is pleased in you as you walk up to the ",\ + "roof of the temple", 0xd, 0xa,\ + "house and then across to the end of the block.", 0xd,\ + 0xa,\ + 0xd, 0xa,\ + "Press any key to return back to the beginning.", 0x0 +bloodtxt db 0xd, 0xa,\ + "A Sacrifice of Blood", 0xd, 0xa,\ + "--------------------", 0xd, 0xa,\ + 0xd, 0xa,\ + "It hurts a little but you do not care, as you let the ",\ + "droplets of blood", 0xd, 0xa,\ + "drip into the bowl. Just like mixing your blood with ",\ + "that of your sworn", 0xd, 0xa,\ + "sister cements your bond, so does giving it to your ",\ + "god.", 0xd, 0xa,\ + 0xd, 0xa,\ + "You are a fully fledged priest of Arattavesh, the one ",\ + "who rules behind", 0xd, 0xa,\ + "the waves and in the dark caverns of earth. You hurry ",\ + "to your new family", 0xd, 0xa,\ + "who are waiting at the foot of the mountain.", 0xd, 0xa,\ + 0xd, 0xa,\ + "Press any key to return back to the beginning.", 0x0 +iconoclasmtxt db 0xd, 0xa,\ + "Iconoclasm", 0xd, 0xa,\ + "----------", 0xd, 0xa,\ + 0xd, 0xa,\ + "There is but one abomination in the eyes of gods bad ",\ + "enough to warrant a", 0xd, 0xa,\ + "death in the marshes. And that is the worship of ",\ + "earthly images in their", 0xd, 0xa,\ + "stead.", 0xd, 0xa,\ + 0xd, 0xa,\ + "You raise your axe and let it fall onto the head of ",\ + "the idol. There is a", 0xd, 0xa,\ + "crunching sound and you see the wood split, maggots ",\ + "crawling out of it.", 0xd, 0xa,\ + "Of course, of course. The idol is as rotten as the ",\ + "act of worshiping it.", 0xd, 0xa,\ + 0xd, 0xa,\ + "The heathen ways are over again, and the temple shall ",\ + "be cleansed. You", 0xd, 0xa,\ + "raise your arms and shout as loud as you can: ",\ + '"Witness me Arattavesh,', 0xd, 0xa,\ + "for I will cleanse your house of the ways of the ",\ + "Eluwing, and enact", 0xd, 0xa,\ + 'revenge on those who have it thus defiled!"', 0xd, 0xa,\ + 0xd, 0xa,\ + "Press any key to return back to the beginning.", 0x0 +prayertxt db 0xd, 0xa,\ + "Prayer", 0xd, 0xa,\ + "------", 0xd, 0xa,\ + 0xd, 0xa,\ + '"You who will remain when I am gone', 0xd, 0xa,\ + "To help my family in time of need", 0xd, 0xa,\ + "To shield the eastern flank of this city", 0xd, 0xa,\ + "To leave the graves of our ancestors safe", 0xd, 0xa,\ + "To bring the flood as you have brought", 0xd, 0xa,\ + 'I ask you"', 0xd, 0xa,\ + 0xd, 0xa,\ + "Press any key to return back to the beginning.", 0x0 +crlf db 0xd, 0xa, 0x0 + +;*** + +;Quit the game +readquit: + +;Check for keypress Q +cmp al, "Q" +je done +cmp al, "q" +je done + +;Return +ret diff --git a/make.sh b/make.sh new file mode 100755 index 0000000..4328fea --- /dev/null +++ b/make.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +cd CONVERT/ +nasm DEC2HEX.ASM -f bin -o DEC2HEX.BIN +nasm HEX2DEC.ASM -f bin -o HEX2DEC.BIN +zip -r CONVERT.ZIP DEC2HEX.BIN DEC2HEX.ASM HEX2DEC.BIN HEX2DEC.ASM README.MD CC0 1>/dev/null +mv CONVERT.ZIP .. +cd .. + +cd KEYCODE/ +nasm KEYCODE.ASM -f bin -o KEYCODE.BIN +zip -r KEYCODE.ZIP KEYCODE.BIN KEYCODE.ASM README.MD LICENSE.MD 1>/dev/null +mv KEYCODE.ZIP .. +cd .. + +cd ROT13/ +nasm ROT13.ASM -f bin -o ROT13.BIN +zip -r ROT13.ZIP ROT13.BIN ROT13.ASM README.MD CC0 1>/dev/null +mv ROT13.ZIP .. +cd .. + +cd TEMPLE/ +nasm TEMPLE.ASM -f bin -o TEMPLE.BIN +zip -r TEMPLE.ZIP TEMPLE.BIN TEMPLE.ASM README.MD LICENSE.MD 1>/dev/null +mv TEMPLE.ZIP .. +cd ..