4 ms·
I had initially considered doing it that way but deemed it too tedious. I really can't stand calculating and correcting offsets all the time.
by mniip 8y ago
I had initially considered doing it that way but deemed it too tedious. I really can't stand calculating and correcting offsets all the time.
- Someone 8y agoI think I would get a Forth up and running ASAP, and write the assembler, if one still is needed, in that Forth. looking at https://github.com/nornagon/jonesforth/blob/master/jonesforth.S https://github.com/nornagon/jonesforth/blob/master/jonesfort... for a simple example, that needs assembler labels and macros, but I think a few batch files can give you rough approximations of those (example of rough approximation: assume every function is 64 bytes long, and every jump needs a 2-byte offset. That makes address calculations a bit easier. Wasteful, but that can be fixed later, once you have a better assembler written in your Forth.
- userbinator 8y agoI wrote my initial version on lined paper, using labels, and didn't calculate the offsets until I was ready to enter it in. The planning/design was also done on paper, away from a computer. The state of mind required to do that is something I can safely say is foreign to the majority of developers today, who will write code they're not completely sure of and test/debug/modify later; but when each "cycle" of debugging may take many minutes instead of seconds, one learns to think very very carefully about what the code is doing. Code that works perfectly on the first run is not unusual when you have this mindset.