summary refs log tree commit diff
path: root/quine.asm
AgeCommit message (Collapse)Author
2026-04-08heap impls of the dot and pow stuffIrene Knapp
also, they're topologically sorted now, and the map is up to date these are Forth words, so their binary forms aren't checked Force-Push: yes Change-Id: I4738ae562d0ceb327396298a29598988453a0756
2026-04-08heap impl of stringcmp, also a couple more Forth asm wordsIrene Knapp
Force-Push: yes Change-Id: I10a098e9f6660ebec6a0beea6eda0a318c5e7f53
2026-04-08add heap implementations for more assembly string opsIrene Knapp
also add Forth words for a couple missing assembly instructions the map is kept carefully up-to-date through this, and the binary output of the new implementations was checked against the binary output of the original implementations using the new dictionary-debugging feature Force-Push: yes Change-Id: Icc8666dc0da9697ccab5d235b714efaa9bdba113
2026-04-08implement the new assembly-based words that needed heap implementationsIrene Knapp
Force-Push: yes Change-Id: I5afdff11ce6003deaeae5a9a0844596a593bd393
2026-04-08reorder things to better separate "early" stuffIrene Knapp
Change-Id: Ieba5e3fb7eca5be769cbf798eac0b91e31a1fe75 Force-Push: yes
2026-04-08update the "map" of stuff that needs to be copied to the heapIrene Knapp
a lot of small utilities got added or reorganized as part of writing the debug code. the map now reflects the current state both of what's been implemented in flatassembler, and what has a copy-to-heap implementation Force-Push: yes Change-Id: I749cd1814e4b9e5360b68a77461849b345b16559
2026-04-08change guess_entry_end_in's behavior for inputs that don't existIrene Knapp
this had been an outstanding TODO Force-Push: yes Change-Id: Ib3e4a654f3a4323175e2bbf37a6403a8b84ffc8d
2026-04-07remove debug notes accidentally left inIrene Knapp
Force-Push: yes Change-Id: I5516f0ba9a5fe954a1651dbf36df468a8d420f52
2026-04-07it now completely prints out its own source, backwardsIrene Knapp
if it were Mr. Mxyzptlk, it would now be vanquished Force-Push: yes Change-Id: I7af53bc2a2f5ab69850d9b8bee152c27d1878dc4
2026-04-05add width-padded variants of dotIrene Knapp
Force-Push: yes Change-Id: Idba4d4bc1f77a6dc34196673d7760461f9f99bb8
2026-04-05make dot work with arbitrary basesIrene Knapp
under the new names dothex and dotbase Change-Id: I783ad04c6eda1d607cef794788f7e09586650984 Force-Push: yes
2026-04-05make sure the logarithms work with really big numbersIrene Knapp
Force-Push: yes Change-Id: Ic084e13b4fe715bc08ac9ceb0e97f75d2fe7fedd
2026-04-05implement dot, the function that prints an integerIrene Knapp
Force-Push: yes Change-Id: I3e282f1d850dac1ee31fc8ee55ba6edecdacbfca
2026-04-05implement logfloor and logceilIrene Knapp
the comparators were all backwards; that's fixed now. it wasn't caught before because eq and ne are commutative, and of the others, only lt had ever been used, and only in one place Force-Push: yes Change-Id: I0a44f8abd21dfc8e0327441d8009e5150ea220da
2026-01-13exponentiation wordIrene Knapp
and a placeholder for integer printing Force-Push: yes Change-Id: Ie147f3010820ef740405bba9a932d1ae6067b49a
2025-12-22disassembly stuffIrene Knapp
this will pave the way for the copy thing currently it correctly prints out all the actual codeword pointers that are part of the word it's scrutinizing, but it has a placeholder for integers the hard part of this was figuring out the start and end addresses; the iteration was also kinda fiddly Change-Id: I2bb8d7c768ffc4d3d1d2afd83d1fd2227d15cbae Force-Push: yes
2025-11-29add words to find the next newer entry in the dictionaryIrene Knapp
these are fully debugged. they'll be used for the decompile-and-recompile copy logic Force-Push: yes Change-Id: I25ba5c5934fc3d181dadcfb4cce09727dbacf70f
2025-11-28add the code to traverse from execution token back to dictionary entryIrene Knapp
yay Force-Push: yes Change-Id: I21d21df017db6df3c1b60288f0b8c7270f01ded8
2025-11-28all the basic Forth words are implemented on the heap nowIrene Knapp
yay the assembly-defining words are still not Force-Push: yes Change-Id: I561a9304741f98d8f30209d3ba1c3bec9b84c950
2025-11-28reformat some word-on-heap definitions; change underscores to hyphensIrene Knapp
having chewed on it, we still prefer kebab-case Force-Push: yes Change-Id: I6ec87be808a4060599d052e8698d677dba7d0134
2025-11-28invoke the heap-based docol as part of the heap copyIrene Knapp
this adds an "execute" word, which makes execution tokens useful for something it also builds "emitstring" on the heap, at runtime, to test that that all works properly Force-Push: yes Change-Id: Ic59a489c0a035a4174db516aeef77e23c7d8528b
2025-11-28implement looking up words by name (wow!)Irene Knapp
also, fix strlen to not include the null byte Force-Push: yes Change-Id: Ifd95da1fc0cf7006df0a25278e03651d6185f037
2025-11-10implement stringcmp, with extensive commentingIrene Knapp
and a lot of other stuff necessary for that, as follows implement the "adc" and "sbb" instructions in flatassembler (there's no Forth implementation of them yet) implement "cmps8" in flatassembler; Forth already has a much more thorough suite of string instructions add Forth jmp_rel_imm8 and flatassembler jmp.rel.bimm unconditional jumps. they're nver used, it just seems like they should exist. split the disp8 case from the indirect case for the flatassembler implementation of register-to-register mov, to match how the Forth implementation works fix the name of mov.disp8.qreg.qreg, which had been incorrectly named mov.qreg.disp8.qreg. it's never called anyway. fix a citation for the MOV instruction; Intel's section numbers are confusing. Force-Push: yeah Change-Id: I53761a3487041c142ade1a82a8ab9a3f1129b853
2025-11-09implement the rest of the string instructionsIrene Knapp
in both repeatable and non-repeatable forms no ins or outs though Force-Push: yes Change-Id: Ica93a1de8b3b698db4e9b3c3c2f00b9e145a2064
2025-11-08implement sys_exit and sys_writeIrene Knapp
Force-Push: yes Change-Id: Idbdfe11a5ba4107c90065f015705708030684439
2025-11-08implement branch and 0branch; fix jmp_cc_rel_imm8Irene Knapp
Force-Push: yes Change-Id: I45c0a5e729cae2493e341ad3b6145708826383ab
2025-11-08memory-handling words; fix mov_reg8_indirect_reg64Irene Knapp
Force-Push: yes Change-Id: I511c869c1f5a3c533213a8d3072dd586f29a5a1c
2025-11-08lit, litstring as asm-in-Forth. give repnz_scas8 the correct name.Irene Knapp
Force-Push: yes Change-Id: I6e34fef69b8d254e215eb377f7a50df57190eed0
2025-11-08bitwise operationsIrene Knapp
Force-Push: yes Change-Id: Idf4fe951fa583946f0a51a53f15eff7f1138b7c6
2025-11-08write comparator words; fix cmp, set, and reg8Irene Knapp
Force-Push: yes Change-Id: I56f82c56307a8e0cd20fdac38dd264136478dd60
2025-11-08assembly-in-Forth arithmetic words; also fixed the implementationsIrene Knapp
some basic mistakes in those Force-Push: yes Change-Id: Ife797b31962c26fc8a8ab741f4d97bd3da3c0612
2025-11-08assembly-in-Forth versions of the rest of the stack-manip wordsIrene Knapp
Force-Push: yes Change-Id: I67f3a218ea3c0cbb362e2825adf200e7cca05edc
2025-11-08added assembly-in-forth unroll, and mov_indexed_reg64_reg64Irene Knapp
missed that instruction. oops. well, we have it now. Force-Push: yes Change-Id: I22583d6c6bda3cb66ad67a69a644aeb777114085
2025-11-08added assembly-in-forth implementation of rollIrene Knapp
also fixed scalefield the testing bar we're applying for these next changes is that it runs successfully, we aren't actually calling the generated funcions yet. we'll need to invent some methodology for checking they're generated correctly. Force-Push: yes Change-Id: I820e5671d74fa3bd4342e5d5b26b867e053ba3ca
2025-11-08add workaround for 8-byte strings (yepppppp)Irene Knapp
Force-Push: yepppppp Change-Id: I3afbaf2af5b2d31ba435fdad759117c7fb52c1d8
2025-11-07the naming commit!!!!Irene Knapp
now there are stubs for all the basic words. we took this opportunity to do a pass on thinking about their "real" names :) Force-Push: yes Change-Id: If2c5b94c540a2a0b8e0df7650f6769405dae2ffd
2025-11-07re-order some stuff to make bootstrapping feel easierIrene Knapp
it may not actually be any easier, but at the very least this is a readability improvement Force-Push: yeah Change-Id: I1ab991fc895e41af44f2aaac59d6152053bd9be3
2025-11-06okay now all the conditional operations and jumps are implemented, tooIrene Knapp
this completes the assembly-in-Forth stuff! yay Force-Push: yes Change-Id: I7f9466a3a71375c32991379fc040d6cc3d657302
2025-11-06all the non-64-bit addressing modes for movIrene Knapp
or at least, all the ones we need yay it's theoretically possible these work! it was a lot of details to get right, and they're not tested at all Force-Push: config Change-Id: I4f1bef007982af7901aa263af8e618d19e262f12
2025-11-06did all the pending instructions that use indexed addressing modesIrene Knapp
we're starting to feel vaguely proficient in stack juggling, but it will still be quite a thing if these don't need fixing later Force-Push: yes Change-Id: Ic1285d01cc42c6e8a30d36fc53e67135d8d9e175
2025-11-06rename all the modrm_* words to addressing_*Irene Knapp
also re-order "sib" to be before them we were about to add one for indexed modes, and realized that really, these words are responsible for both the ModRM and SIB bytes, it's just that some modes only need one of them. this makes their responsibilities clearer, and as a bonus it draws a stronger distinction between these high-level words and the low-level "modrm", which omits consistency checking. having it called something else reduces the likelihood of inappropriately using the low-level one when a high-level one would be more suitable. their names are a bit long now, but that's probably also good, it will incentivize building higher-level abstractions that define multiple variants of instructions rather than writing each one by hand. someday. Force-Push: yes Change-Id: Ia8f8fcc0e092f94e66f17a3fa55e8bf3e927fdff
2025-11-06implement a bunch of assembly-in-ForthIrene Knapp
Force-Push: yes Change-Id: Ia9844da8f6e5d59ed77348b85200c28a7113bd1f
2025-11-06listed out all the assembly instructions that need Forth versionsIrene Knapp
Force-Push: yes Change-Id: Ib9efd1cd1c8b362547bef8b15829f9da6a28b4d1
2025-11-06yay now it has "exit" on the heap, tooIrene Knapp
Force-Push: yes Change-Id: I19215825a8891bbc8b36bac03a0f0ca440721cb3
2025-11-06there is now a full implementation of docol on the heapIrene Knapp
yay that was hard. lots of bug-fixing. for some reason the condition code for not-equal was being output as 0x6 instead of 0x4. there was also a lot of stack manipulation to trace through very carefully. Force-Push: yes Change-Id: I8f2c19d5be96ba27a3e8c56c460c761a3b16666f
2025-11-04some notes to figure out the topological sort and so onIrene Knapp
also a minor renaming for consistency Force-Push: yes Change-Id: I80f7a091272fa9a73cedd7caba495a45d5866d16
2025-11-03the variable words are fully defined on the heap nowIrene Knapp
not used for anything yet, but hey verifying this required a lot of time in the debugger Force-Push: yes Change-Id: I38a9536ce8efde236b1ed81ca94e0cf7e101413d
2025-11-03move the output helpers and assembly-in-forth stuff earlier in the fileIrene Knapp
this better reflects the logical dependencies, per the new plan Force-Push: yes Change-Id: I2caa0e6bb1c722a7839f6695c48b05d0b2cfad25
2025-11-03add the beginnings of some word-defining wordsIrene Knapp
Force-Push: yes Change-Id: I7e4c678c27a87b79a9f2c2aad12bd65d7d5600cc
2025-11-02downcase _all_ the thingsIrene Knapp
this will get more painful the longer we put it off Force-Push: yes Change-Id: I82430303d9d9d8a317eb8f020316e2145020a5c8