5 ms·
"We choose to write an OS in asm, not because it is easy, but because it is hard"
by abnry 7y ago
"We choose to write an OS in asm, not because it is easy, but because it is hard"
- MR4D 7y agoMake Assembly Great Again! LOL!!
- pjmlp 7y agoWell, C still doesn't offer the same macro capabilities as 90's macro assemblers were capable of. Thankfully in C++ we have constexpr for that.
- higerordermap 7y agoCan you elaborate which capabilities to those of us interested to know?
- pjmlp 7y agoYes, here is the manual for MASM. https://docs.microsoft.com/en-us/cpp/assembler/masm/directives-reference?view=vs-2019 https://docs.microsoft.com/en-us/cpp/assembler/masm/directiv... Basically already back in the Amiga/MS-DOS days, you could define: - procedures and functions like higher level languages - structures - make use of looping constructs (repeat/while) and conditional logic (if/else) - create hygienic labels for variables and jump targets TASM and the FOSS clones, yasm and fasm do support similar macro capabilities. On the Amiga side, Devpac was the goto Macro Assembler, https://www.amigagamedev.com/Downloads/DevPac_v3.00.Manual.pdf https://www.amigagamedev.com/Downloads/DevPac_v3.00.Manual.p... Only the UNIX Assemblers have been traditionally quite poor in macro capabilities, as they have been mostly used as yet another stage for generating code from C compilers. A good example how to take advantage of such macros is to implement a poor man's compiler, or the first stage of a bootstraped compiler. Generate bytecodes that can be easily mapped into macros, and then just by having your macro library for the target platform you get the compiler very quickly up and running.
- unwind 7y agoIn the Amiga demo scene, I would dare say that ASM-One [1] was the default assembler. [1] https://en.m.wikipedia.org/wiki/ASM-One_Macro_Assembler https://en.m.wikipedia.org/wiki/ASM-One_Macro_Assembler
- pjmlp 7y agoI was into portuguese demoscene Amiga/PC and never heard of it, then again it was back in the days when we exchanged floppies via the post.
- snvzz 7y agoAsmTwo[0] is a decent currently maintained fork of that. [0]: http://coppershade.org/articles/Code/Tools/AsmTwo/ http://coppershade.org/articles/Code/Tools/AsmTwo/
- DarkWiiPlayer 7y ago> Thankfully in C++ we have constexpr for that. The only C++ feature I'm thankful for is the option of not using it
- pjmlp 7y agoI on the other hand appreciate that since 1993, C++ has allowed me avoid C as much as possible.
- nibles_and_bits 7y agoThe greater our knowledge increases, the greater our ignorance unfolds.