Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
DosWorld(R)

10.11.2019, 13:44
 

MSA assembler released under MIT (Announce)

Hi!

Robert Östling release MSA assembler under MIT-license.
https://github.com/robertostling/msa

---
Make DOS great again!

tom(R)

Homepage

Germany,
10.11.2019, 19:00

@ DosWorld

MSA assembler released under MIT

> Hi!
>
> Robert Östling release MSA assembler under MIT-license.
> https://github.com/robertostling/msa

what's the purpose of yet another assembler? (btw: YASM is already taken)

Tom

DosWorld(R)

12.11.2019, 14:42

@ tom

MSA assembler released under MIT

> > Robert Östling release MSA assembler under MIT-license.
> > https://github.com/robertostling/msa
>
> what's the purpose of yet another assembler? (btw: YASM is already taken)

This is not new assembler - 2000-2001.
Robert make (re)release with modern license.

Purpose - wide. This is very small compiler and easy for modifications. For example - i modify MSA to have possibility compile overlays (something like dll: exe + symbol table) for DOS.

Also, for me it is good target assembler for my toy-compilers.

If you need macros, full x86 support etc - MSA is not your choice.

---
Make DOS great again!

Rugxulo(R)

Homepage

Usono,
15.11.2019, 03:24

@ DosWorld

MSA assembler released under MIT

> > > Robert Östling release MSA assembler under MIT-license.
> > > https://github.com/robertostling/msa
>
> This is not new assembler - 2000-2001.
> Robert make (re)release with modern license.

I see you've changed build methods (makefile) and compiler (wcl), and this is admittedly old code, so my remarks may be obvious or redundant.

Just FYI:

> bcc -Z -C -1 -O -mt -Id:\lang\bc\include -Ld:\lang\bc\lib msa.c
> exe2bin msa.exe msa.com
> del msa.exe

1). The "-I" and "-L" options should always only be in TURBOC.CFG (as created by the installer).

2). "exe2bin" isn't needed, use "-mt -lt" (since TLINK supports .COM directly).

I did try using it a bit, but it lacked some output size optimizations and had other quirks. I haven't looked much beyond that. (Most code doesn't demand it, but it's harder to verify precisely, compared to others.)

DosWorld(R)

15.11.2019, 16:38

@ Rugxulo

MSA assembler released under MIT

> I see you've changed build methods (makefile) and compiler (wcl), and this
> is admittedly old code, so my remarks may be obvious or redundant.

Yes, now, i am remove bcc builds stuff and, now, support Open Watcom C (real-mode DOS target), gcc (Linux), gcc+mingw (Win32).

msa2 (msa) does not support 100% full subset of x86, but i try to extend to full support when find a gaps (something could be missed). For example, today i find and fix uncompilable "retf 2".

---
Make DOS great again!

Rugxulo(R)

Homepage

Usono,
02.12.2019, 20:47

@ DosWorld

MSA2 and TP7 overlays

> i modify MSA to have possibility compile overlays (something like
> dll: exe + symbol table) for DOS.

Apparently you use TP7 for that purpose, which I don't have. So I can't (easily) compile with "freeware" TP 5.5 because it lacks "pchar" (and other things). However, it does support overlays (but I'm not familiar with them at all!).

Anyways, actually I only wanted to mention this (N.B. the forum is getting confused with italics, so I renamed the var byte from "i" to "n"):

> CALLER.PAS
> procedure puts
> for n:=1 to ord(s[0]) do putc(s[n]);

I did put that one function in a separate file, just to prove a point. You can change "ord(s[0])" into "length(s)" (at least with TP 5.5), and the output .EXE has the exact same CRC32. My point is that it might be cleaner, clearer, and more portable to not assume the length is only a byte at offset 0. Compile-time calculations and constant expressions are useful indeed. Just FYI.

marcov(R)

03.12.2019, 16:37

@ Rugxulo

MSA2 and TP7 overlays

> > i modify MSA to have possibility compile overlays (something like
> > dll: exe + symbol table) for DOS.
>
> Apparently you use TP7 for that purpose,
^^^^

You rang mi'lord? :-)

> overlays (but I'm not familiar with them
> at all!).

For a summary and link to details see
https://stackoverflow.com/questions/10155003/how-did-turbo-pascal-overlays-work

rr(R)

Homepage E-mail

Berlin, Germany,
03.12.2019, 21:34

@ Rugxulo

MSA2 and TP7 overlays

> Anyways, actually I only wanted to mention this (N.B. the forum is getting
> confused with italics, so I renamed the var byte from "i" to "n"):

Nice find! This is caused by using italics for the word "exact" later. So, if you change "n" to "b" and use bold on "exact", that {b} will also disappear like the {i} before.

You can't even prevent it by enclosing the Pascal statement in {code}{/code}. I will report this behaviour to Heiko.

> > CALLER.PAS
> > procedure puts
> > for n:=1 to ord(s[0]) do putc(s[n]);
>
> I did put that one function in a separate file, just to prove a point. You
> can change "ord(s[0])" into "length(s)" (at least with TP 5.5), and the
> output .EXE has the exact same CRC32. My point is that it might be
> cleaner, clearer, and more portable to not assume the length is only a byte
> at offset 0. Compile-time calculations and constant expressions are useful
> indeed. Just FYI.

(Just cited to reproduce the bug.)

Rugxulo(R)

Homepage

Usono,
04.12.2019, 03:59

@ marcov

MSA2 and TP7 overlays

(Sorry in advance for the ramble. I just want it all in one place so I don't forget later.)

> > [TP7] overlays (but I'm not familiar with them at all!).
>
> For a summary and link to details see
> https://stackoverflow.com/questions/10155003/how-did-turbo-pascal-overlays-work

Don't personally need it, just mildly curious.

You seem to mostly just point to The Slithy Tove, which I haven't read yet. A quick check of Bob Swart's Borland Pascal Efficiency book doesn't show any overlay usage. Probably old SWAG archives have something, but I haven't checked yet either. Maybe TP55 included some example code for it, I think? But I haven't checked those lately, don't remember. No mention of overlays on FPC's DOS wiki page, probably not supported yet.

Freeware TP 5.5 didn't really come with online books or manuals (except a chapter about their OOP). I feel (unsurprisingly) timid about places like BitSavers, even though they also have German mirrors, so maybe it's legal? Ugh, old copyright is annoying.

I know Go32v2 supports DXE1, but I've never used it much there. In fact, I never used it much (except Matt Mahoney's old C++/ASM code, paq8f, ten years ago!). DXE3 is better but rarely used (e.g. Hexen2, whose code I never studied closely).

I'm definitely curious, but I don't need it. Then again, I did recently recompile NASM 0.98.39 for 8086 with OpenWatcom ("large") and TurboC++ ("huge"), and the latter runs out of memory more easily (FD's kernel.asm)! TC++ 1.01 does support overlays, and I do have the actual physical books on that, so I'll probably read up on that soon, out of mild curiosity.

marcov(R)

04.12.2019, 10:41

@ Rugxulo

MSA2 and TP7 overlays

> Maybe TP55
> included some example code for it, I think? But I haven't checked those
> lately, don't remember. No mention of overlays on FPC's
> DOS wiki page, probably not
> supported yet.

There is an overlay chapter in SWAG. Possibly overlay handling differs between older versions, TP7 real and TP7 protected mode. (if protected mode exist at all)

> I know Go32v2 supports DXE1, but I've never used it much there. In fact, I
> never used it much (except Matt Mahoney's old C++/ASM code,
> paq8f,
> ten years ago!). DXE3 is better but rarely used (e.g. Hexen2, whose code I
> never studied closely).

DXE is slightly different since afaik DXE can be created using separate generation. IOW it can be used to create plugins for already existing (compiled) programs.

Afaik the 16-bit dos maintainers mainly has demo compos as usecase, and overlays overall increase binary size:-P And of course with FPC there is always the upgrade to 32-bit in case it gets too bad.

Back to the board
Thread view  Mix view  Order
16062 Postings in 1490 Threads, 272 registered users, 7 users online (0 registered, 7 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum