Turbo Pascal overlays & NASM Preprocessor (Announce)
> Probably not a great example use for overlays, but I tried anyways. (I
> don't know OOP "design patterns" at all.) It could definitely be a useful
> feature, but not so much here. (Remember I rebuilt old NASM 0.98.39 with
> Turbo C++ 1.01? I assume NASM's preprocessor would make a great overlay
> since you only need it at the beginning. But I have no idea how to fix that
> yet. I still need to read the physical manuals there.)
Actually, the NASM preprocessor is run on each pass of the assembler. That's why my sources won't work with nasm -E
(preprocess-only mode). For example, I often use constructs like %assign foo $ - $$
. Using equ
and *then* %assign
allows even to learn of numbers that cannot be evaluated (as a critical expression) at that point in the source yet. I barely use the latter as yet, though.
For an example of the former, consider the _386 patch section macro in debug.mac. It uses %assign
and then after the to-be-patched part %rep
, each with $ (current assembly address).
During the work to split the data/entry section from the code section (and address them using different segments), I had to enable the _WPT_LABELS option, which avoids the %assign
trickery in the patch macro. As noted there, this made the assembly take more than 2 minutes. Therefore I disabled this option as I finished the split.
---
l
Complete thread:
- MSA assembler released under MIT - DosWorld, 10.11.2019, 13:44 (Announce)
- MSA assembler released under MIT - tom, 10.11.2019, 19:00
- MSA assembler released under MIT - DosWorld, 12.11.2019, 14:42
- MSA assembler released under MIT - Rugxulo, 15.11.2019, 03:24
- MSA assembler released under MIT - DosWorld, 15.11.2019, 16:38
- MSA2 and TP7 overlays - Rugxulo, 02.12.2019, 20:47
- MSA2 and TP7 overlays - marcov, 03.12.2019, 16:37
- MSA2 and TP7 overlays - Rugxulo, 04.12.2019, 03:59
- MSA2 and TP7 overlays - marcov, 04.12.2019, 10:41
- Turbo Pascal overlays (overleden? ha!) - Rugxulo, 16.02.2020, 03:48
- Turbo Pascal overlays - Rugxulo, 18.02.2020, 03:03
- Turbo Pascal overlays & NASM Preprocessor - ecm, 05.03.2020, 16:42
- Turbo Pascal overlays (overleden? ha!) - Rugxulo, 16.02.2020, 03:48
- MSA2 and TP7 overlays - marcov, 04.12.2019, 10:41
- MSA2 and TP7 overlays - Rugxulo, 04.12.2019, 03:59
- MSA2 and TP7 overlays - rr, 03.12.2019, 21:34
- MSA2 and TP7 overlays - Rugxulo, 14.12.2019, 13:28
- MSA2 and TP7 overlays - rr, 14.12.2019, 23:42
- MSA2 and TP7 overlays - marcov, 15.12.2019, 21:07
- MSA2 and TP7 overlays - Rugxulo, 16.12.2019, 19:15
- MSA2 and TP7 overlays - marcov, 15.12.2019, 21:07
- MSA2 and TP7 overlays - rr, 14.12.2019, 23:42
- MSA2 and TP7 overlays - DosWorld, 15.12.2019, 21:42
- MSA2 and one-pass assemblers - Rugxulo, 16.12.2019, 19:32
- MSA2 compilation with GCC - Rugxulo, 12.02.2020, 08:18
- MSA2 and TP7 overlays - marcov, 03.12.2019, 16:37
- MSA assembler released under MIT - Rugxulo, 15.11.2019, 03:24
- MSA assembler released under MIT - DosWorld, 12.11.2019, 14:42
- MSA assembler released under MIT - tom, 10.11.2019, 19:00