Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

rebuilding NASM 0.98.39 (without MMX/3DNOW/686/SSE) (Developers)

posted by Rugxulo Homepage, Usono, 17.03.2020, 05:20

> "Invalid opcode" comes from the CPU treating data as code, as you probably
> know.
> Does it happen under "all" memory configurations, i.e., w/o JEMM386?

I always run XMS only these days, so it's not due to EMM386.

> Does it occur if you only remove anything after line 1166 ("Katmai"...)?

Actually, the newer, bloated SIMD stuff starts earlier than that in the file. It's not grouped properly, apparently unsorted.

But, no, I found the problem, a simple error on my part. I forgot to also include "ignore" (pseudo-instructions, e.g. EQU or DW) in my trimmed version.

So it works (after running DJGPP Perl four times to regenerate some sources). I doubt it saved too much actual runtime memory, but the .EXE itself saved 30k (or 6 kb UPX'd), which is seemingly not much. And it runs okay (reassembles INVADERS.COM correctly).

It still didn't fit into Large model (like OpenWatcom), though, but if I exclude "PENT" entirely (which also includes MMX and 3DNOW for later 586s), then it fits into Large model okay. So then it's roughly 50 kb smaller than the "full" .EXE. But it only saves 9 kb UPX'd.

In other words, I'm sure it helps some, but it's maybe not as much as I expected. Saving 50 kb while WmakeR uses 150 kb is probably not enough (for that nonsensical problem, already worked around elsewhere).

So, long story short, I need to rebuild twice and upload those for us: 1). 586/MMX/3DNOW only (no 686 or SSE), 2). 486 (or early 586, e.g. CPUID, but no MMX/3DNOW) only (Large model, is it noticeably faster??). Hmmm, maybe 286 only would be interesting, for comparison (like A86).

But I want to avoid relying on Perl at all, so I need to find a shortcut to trim the pre-existing generated (included) insns*.[ch] files (awk? sed? homegrown tool again?).

P.S. Does anyone know if -O9 will forcibly run nine passes or only those passes needed (e.g. three)? I could be wrong, but I think it does all nine! Inefficient, but maybe it doesn't (or can't) know. Though some assemblers can figure it out (if nothing changed in previous pass then exit?). Maybe that's why -O9v tells you (kinda) how many it took, so you can only run as many as needed next time? Not sure.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 240 users online (0 registered, 240 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum