EDR-DOS kernel ported to JWasm - ident86 validated DRBIO port (Announce)
> > It would be useful to change some instructions "LEA Dst,Addr" to the
> > shorter "MOV Dst,OFFSET Addr"
>
> Apparently this is done by some version of MASM, but JWasm doesn't do it.
TASM and A86 do it by default, but newer MASMs (since v5?) don't do it anymore. Some purists complain when an assembler does things "behind your back".
IIRC, the recommended fix is via a macro with opattr 8 (or such). You probably have to use "option nokeyword:<lea>" first if you insist on calling the macro LEA.
It only saves a byte per instance and probably isn't noticeably faster.
> MASM 6.11 README.TXT
> The MASM 6.1 Reference indicates that the LEA instruction is
> encoded as a MOV when the source operand is a direct memory address.
>
> In response to programmer requests, MASM 6.1x no longer performs this
> optimization automatically. The optimization can be performed by
> using the OPATTR operator, as shown in the following macro:
MOVLEA MACRO Dest, Symbol
IF (OPATTR(Symbol)) AND 08h
MOV Dest, OFFSET Symbol
ELSE
LEA Dest, Symbol
ENDIF
ENDM
Complete thread:
- Enhanced DR-DOS single-file load (2023 December revision) - ecm, 07.01.2024, 20:43 (Announce)
- Enhanced DR-DOS single-file load (2023 December revision) - roytam, 08.01.2024, 07:26
- Enhanced DR-DOS single-file load (2023 December revision) - Guti, 10.01.2024, 17:09
- Enhanced DR-DOS single-file load (2023 December revision) - Ro2003, 13.01.2024, 09:28
- Enhanced DR-DOS development - ecm, 14.01.2024, 22:58
- lDebug boot loading other kernels - ecm, 20.01.2024, 13:24
- Enhanced DR-DOS development - ecm, 14.01.2024, 22:58
- Enhanced DR-DOS single-file load (2023 December revision) - CandyMan, 07.06.2024, 16:19
- Enhanced DR-DOS single-file load (2023 December revision) - ecm, 07.06.2024, 17:12
- Enhanced DR-DOS single-file load (2023 December revision) - CandyMan, 07.06.2024, 18:56
- Enhanced DR-DOS - CD bug - ecm, 07.06.2024, 19:42
- Enhanced DR-DOS - CD bug - ecm, 07.06.2024, 19:47
- Enhanced DR-DOS - CD bug - CandyMan, 07.06.2024, 22:10
- Enhanced DR-DOS - CD bug - ecm, 07.06.2024, 23:17
- Enhanced DR-DOS - CD bug - ecm, 07.06.2024, 23:24
- FAT32 search on GPT partition - CandyMan, 03.07.2024, 18:54
- FAT32 search on GPT partition - tom, 03.07.2024, 19:48
- FAT32 search on GPT partition - tom, 03.07.2024, 19:51
- FAT32 search on GPT partition - CandyMan, 03.07.2024, 20:55
- Kernel ported to JWasm - boeckmann, 08.07.2024, 22:31
- Kernel ported to JWasm - boeckmann, 09.07.2024, 18:22
- Kernel ported to JWasm - Japheth, 10.07.2024, 17:32
- EDR-DOS kernel ported to JWasm - ident86 validated DRBIO port - ecm, 14.07.2024, 21:03
- EDR-DOS kernel ported to JWasm - ident86 validated DRBIO port - boeckmann, 14.07.2024, 22:37
- EDR-DOS kernel ported to JWasm - ident86 validated DRBIO port - CandyMan, 22.07.2024, 16:57
- EDR-DOS kernel ported to JWasm - ident86 validated DRBIO port - boeckmann, 23.07.2024, 20:50
- EDR-DOS kernel ported to JWasm - ident86 validated DRBIO port - ecm, 23.07.2024, 21:34
- EDR-DOS kernel ported to JWasm - ident86 validated DRBIO port - Rugxulo, 24.07.2024, 00:25
- EDR-DOS kernel ported to JWasm - ident86 validated DRBIO port - CandyMan, 22.07.2024, 16:57
- EDR-DOS kernel ported to JWasm - ident86 validated DRBIO port - boeckmann, 14.07.2024, 22:37
- Kernel ported to JWasm - boeckmann, 09.07.2024, 18:22
- Kernel ported to JWasm - boeckmann, 08.07.2024, 22:31
- FAT32 search on GPT partition - CandyMan, 03.07.2024, 20:55
- FAT32 search on GPT partition - tom, 03.07.2024, 19:51
- FAT32 search on GPT partition - tom, 03.07.2024, 19:48
- FAT32 search on GPT partition - CandyMan, 03.07.2024, 18:54
- Enhanced DR-DOS - CD bug - CandyMan, 08.06.2024, 09:59
- Enhanced DR-DOS - CD bug - boeckmann, 20.06.2024, 18:00
- Enhanced DR-DOS - CD bug - boeckmann, 30.06.2024, 16:57
- Enhanced DR-DOS - CD bug - boeckmann, 20.06.2024, 18:00
- ? - CandyMan, 19.06.2024, 19:45
- ? - glennmcc, 22.06.2024, 02:13
- ? - nico7550, 23.06.2024, 08:18
- unnecessary "stc" - CandyMan, 03.07.2024, 17:55
- ? - glennmcc, 22.06.2024, 02:13
- Enhanced DR-DOS - CD bug - ecm, 07.06.2024, 23:24
- Enhanced DR-DOS - CD bug - ecm, 07.06.2024, 23:17
- Enhanced DR-DOS - CD bug - CandyMan, 07.06.2024, 22:10
- Enhanced DR-DOS - CD bug - ecm, 07.06.2024, 19:47
- Enhanced DR-DOS - CD bug - ecm, 07.06.2024, 19:42
- Enhanced DR-DOS single-file load (2023 December revision) - CandyMan, 07.06.2024, 18:56
- Enhanced DR-DOS single-file load (2023 December revision) - ecm, 07.06.2024, 17:12