Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

mawk 1.3.4 20240622 for DOS (Announce)

posted by bencollver Homepage, 21.08.2024, 00:38

> The msvcrt.dll supplied with Windows XP seems to work - and I guess the
> ones supplied with Win9x are also ok.

Thanks! I tried the following MSVCRT.DLL and at first glance it appeared to work:

https://archive.org/download/microsoftwindowsprein...%29%20%28EN%29.iso/I386%2FSYSTEM32%2FMSVCRT.DLL

C:\BEN\mawk\bin>mawk "BEGIN{print \"hi\"}"
hi


But on closer inspection, it appears to have trouble running itself.

C:\BEN\mawk\bin>type test.awk
function sys(str) {
    printf "test.awk: %s\n", str
    retval = system(str)
    print ""
    return retval
}

BEGIN {
    sys("cd")

    cmd = ARGV[0] " \"BEGIN{print \\\"hi\\\"}\""
    sys(cmd)
    exit 0
}
C:\BEN\mawk\bin>mawk -f test.awk
test.awk: cd
C:\BEN\MAWK\BIN

test.awk: C:\ben\mawk\bin\mawk.exe "BEGIN{print \"hi\"}"
C:\FreeDOS\BIN\COMMAND.COM: line 1: runaway regular expression /c ...


I'm not sure what to blame: this win32 build of mawk.exe, HX, or something else.

For comparison, here's the output from a DJGPP build of mawk.exe.

C:\BEN\BIN>mawk -f test.awk
test.awk: cd
C:\BEN\BIN

test.awk: mawk.exe "BEGIN{print \"hi\"}"
hi

 

Complete thread:

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