Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

minised 1.16 for DOS (Announce)

posted by Rugxulo Homepage, Usono, 30.08.2024, 10:10

> I posted msed116b.zip, which updates the dev86 BCC build to accept any text
> format and output only DOS CRLF format. It also includes minisedw.com
> built with OpenWatcom.

It accepts data files (e.g. *.ASM) in CRLF format but not *.SED scripts.

> > 1. scripts (*.sed) and data files (e.g. *.asm) must be in *nix LF-only
> > format
>
> I tested all of the DOS sed implementations on the FreeDOS site. All but
> one accept any text format, and output only to DOS CRLF format. The
> exception is hsedgcc.zip, which outputs only to Unix LF format.

The old 2004 TC 2.01 default DOS build of Csed had buffering issues (i.e. slow!), so I rebuilt it with TC++ 1.01 (in 2016?).

HHsedGCC was SED15.ZIP, also rebuilt by me (2020), with GCC IA16 (since it was the only Sed which that particular compiler would rebuild). The LF-only problem was a library issue.

> > 2. secondary output files via 'w' command are truncated improperly near
> the
> > end, implying that the file is not flushed (or possibly an explicit
> > fclose() is not used somewhere)
>
> I was not able to reproduce this problem. Would you be willing to post a
> simple example to demonstrate it?


g:\watsed>minisedw -f fixnasm.sed invaders.asm >inv-nasm.asm
g:\watsed>REM ... also creates INV-NASM.INC ...
g:\watsed>nasm16 -O3 inv-nasm.asm -o inv-nasm.com
g:\watsed>crc32 inv-nasm.com

FFF22EF9 *G:\TONY\OLD\INV-NASM.COM

g:\watsed>cd..
g:\bccsed>minised -f fixnasm.sed invaders.asm >inv-nasm.asm
sed: no such command as %idefine offset\

g:\bccsed>an fixnasm.sed
Analyzer v1.36 by Boogie   Copyright (C) 1997 ESP Team
Files: G:\TONY\FIXNASM.SED
--------------------------------------------------------------------
FIXNASM.SED  Text file - DOS/Win
--------------------------------------------------------------------

g:\bccsed>dos2unix -k -q *.sed
g:\bccsed>minised -f fixnasm.sed invaders.asm >inv-nasm.asm

g:\bccsed>nasm16 -O3 inv-nasm.asm -o inv-nasm.com
inv-nasm.asm:48: error: comma or end of line expected
inv-nasm.asm:56: error: comma or end of line expected
inv-nasm.asm:61: error: comma or end of line expected
inv-nasm.asm:69: error: comma or end of line expected

g:\bccsed>diff -q old .
Files old/inv-nasm.inc and ./inv-nasm.inc differ
Only in old: inv-nasm.com
Only in old: minisedw.com
Only in .: minised.com
Only in .: old

g:\bccsed>diff old\*.inc .
141,147c141
< %define s_PlayKeys B
< %define s_Distribution B
< %define s_GameOverMsg B
< %define s_GetReady B
< %define s_TempStore W
< %define s_Palette B
< %define s_VideoBuffer B
---
> %define s_Pl
\ No newline at end of file


invadr11.zip (24 kb)

fixnasm.sed (p.d. / MIT / whatever)

# minisedw -f fixnasm.sed invaders.asm >inv-nasm.asm
# nasm -O3 -o inv-nasm.com inv-nasm.asm
#
# (crc32)
# DEC4AF7B  INV-NASM.ASM
# 8983C5D9  INV-NASM.INC
# FFF22EF9  INV-NASM.COM
1i\
%idefine offset\
%define LEA MOV\
%define B byte\
%define W word\
%include "inv-nasm.inc"
/ DD /s// DW 0,/
/ D[BW] /{
h
s/^\([A-Z][^ ]*\) *D\(.\) .*/%define s_\1 \2/w inv-nasm.inc
g
b
}
/^;/b
/LEA /b
/CODE_SEG/d
/END/d
/ PROC /s/ *PROC .*/:/
/ES:\[/s//[ES:/
/40:/s///
/\[0\]/s///
/,O/b
/Word Ptr /s///
/[+]BX/s/\[\(.*\)[+]BX/s_\1&/
/\[[1-9]\]/s/\([A-Z][a-zA-Z][a-zA-Z][^ ]*\)\[\([1-9]\]\)/s_\1[\1+\2/
/,/s/\([A-Z][a-zA-Z][a-zA-Z][a-zA-Z0-9]*\),/s_\1[\1],/
/,/s/,\([A-Z][a-zA-Z][a-zA-Z][a-zA-Z0-9]*\)/,s_\1[\1]/
/[ID][NE]C/s/\([ID][NE]C\) *\([A-Z][^ ][^ ][^ ]*\)/\1 s_\2[\2]/
/^RemoveNewInt9:/,/CLC$/s/\[\([^0]\)/[cs:\1/
# EOF

 

Complete thread:

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