Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
Mercury127(R)

26.05.2019, 12:00
 

MemTest 437/501/RH - my tries make exe variants (Developers)

hello to all :)

now i try make new exe bulids of Memtests... see link.
yes, i make some patch for loader, and now all three veirsions (as see) normally start.
unfortunately, all three builds halted after approx afster seconds of run.

and i can not understand, why...
look as if unhandled exeption is appears.
i never debug pm code before, onlu real mode code, and know not debuuger, which can trace over lidt instruction...

and also i try run these precomp.bin via loadlin - it nicely work, but on one my machine is TOO BIG EBDA, and loadlin wont load bin here...

yes, i read this topic
https://www.bttr-software.de/forum/board_entry.php?id=14117
but not sure, that here allow post to so old topics.
if alow - ok, i can write there.

sorry for my poor english :)

RayeR(R)

Homepage

CZ,
28.05.2019, 00:14

@ Mercury127
 

MemTest 437/501/RH - my tries make exe variants

The archive is pwd-protected.
I didn't make more attempts to make old loader working. I still can use GRUB4DOS for loading memtest binary image.

---
DOS gives me freedom to unlimited HW access.

Mercury127(R)

28.05.2019, 10:24

@ RayeR
 

MemTest 437/501/RH - my tries make exe variants

> The archive is pwd-protected.

yes, sorry, i forgot - pass 1, just 1

since most newest antiviruses stupid and dont allow download archives with exe...

> I didn't make more attempts to make old loader working. I still can use
> GRUB4DOS for loading memtest binary image.

loadlin also help, but only if u have not ebda 20 kb (occupied memory at 9xxxxh, immediately below a0000 segment), as on new mobos.

but me anyway interesting make normal exe, for one diskette with multiple memory tests.

try just run these 437 and 501, and say, there is any progress in compare with your tries?

tkchia(R)

Homepage

31.05.2019, 17:08

@ Mercury127
 

MemTest 437/501/RH - my tries make exe variants

Good day Mercury127,

> but me anyway interesting make normal exe, for one diskette with multiple
> memory tests.
> try just run these 437 and 501, and say, there is any progress in compare
> with your tries?

In case this helps: it seems that when I run mt437.exe on FreeDOS inside a QEMU VM (qemu-system-i386 -d in_asm ...), the memtest code ends up overwriting and corrupting itself and causing the system to hang:

============================================================================

...
----------------
IN:
0x0002a9fe: mov 0x18(%esp),%edi
0x0002aa02: mov $0x0,%ecx
0x0002aa07: mov $0x0,%edx
0x0002aa0c: mov (%esi,%ecx,1),%al
0x0002aa0f: mov %al,0x0(%ebp,%ecx,1)
0x0002aa13: inc %edx
0x0002aa14: mov %edx,%ecx
0x0002aa16: cmp %edi,%edx
0x0002aa18: jne 0x2aa0c

----------------
IN:
0x0002aa0c: mov (%esi,%ecx,1),%al
0x0002aa0f: mov %al,0x0(%ebp,%ecx,1)
0x0002aa13: inc %edx
0x0002aa14: mov %edx,%ecx
0x0002aa16: cmp %edi,%edx
0x0002aa18: jne 0x2aa0c

----------------
IN:
0x0002aa0f: mov %al,0x0(%ebp,%ecx,1)

----------------
IN:
0x0002aa13: inc %edx
0x0002aa14: mov %edx,%ecx
0x0002aa16: cmp %edi,%edx
0x0002aa18: jne 0x2aa0c

----------------
IN:
0x0002aa0c: add %al,(%esi,%ecx,1)
0x0002aa0f: mov %al,0x0(%ebp,%ecx,1)
0x0002aa13: inc %edx
0x0002aa14: mov %edx,%ecx
0x0002aa16: cmp %edi,%edx
0x0002aa18: jne 0x2aa0c

----------------
IN:
0x0002aa0f: mov %al,0x0(%ebp,%ecx,1)

----------------
IN:
0x0002aa0c: add %al,(%eax)
0x0002aa0e: push %cs
0x0002aa0f: mov %al,0x0(%ebp,%ecx,1)
0x0002aa13: inc %edx
0x0002aa14: mov %edx,%ecx
0x0002aa16: cmp %edi,%edx
0x0002aa18: jne 0x2aa0c

----------------
IN:
0x0002aa0f: mov %al,0x0(%ebp,%ecx,1)

----------------
IN:
0x0002aa0c: add %al,(%eax)
0x0002aa0e: add %cl,0x42000d44(%eax)
0x0002aa14: mov %edx,%ecx
0x0002aa16: cmp %edi,%edx
0x0002aa18: jne 0x2aa0c

============================================================================

Thank you!

RayeR(R)

Homepage

CZ,
08.06.2019, 02:06

@ tkchia
 

MemTest 437/501/RH - my tries make exe variants

I tested the binaries and under bare MSDOS 6.22:
MT211.EXE - cause immediate restart, only background seen
MT420.EXE - works OK
MT437.EXE - cause immediate restart, background and text seen for a moment
MT501.EXE - hangs after a second, progress shows 2%

---
DOS gives me freedom to unlimited HW access.

Mercury127(R)

09.06.2019, 20:53

@ RayeR
 

MemTest 437/501/RH - my tries make exe variants

> MT437.EXE - cause immediate restart, background and text seen for a moment
> MT501.EXE - hangs after a second, progress shows 2%

Yes, I have the same results. Sadly
I have no thoughts yet, why it happens like this, and how to fix it.
I just made small edits in MT86LDR.ASM.
It seems there is nothing more to edit in this file?
And then we need to look in the source of the memtest?

Comparing files MT86LDR.ASM and MT86__~1.ASM
***** MT86LDR.ASM
13: ; compressed, for example with http://upx.sf.net/ (UPX).
15: %define delta 0dh
17: %define fullsize (172476 + buffer - exeh)
18: ; 103308 memtest86 V4.37
19: ; 150024 memtest86+ V5.01
20: ; 172476 memtest86+ V5.0a1
22: %define stacksize 2048
***** MT86__~1.ASM
13: ; compressed, for example with http://upx.sf.net/ (UPX).
15: %define fullsize (150024 + buffer - exeh)
16: ; 150024 is the size of memtest86+ V5.01, adjust as needed!
18: %define stacksize 2048
*****

***** MT86LDR.ASM
141: add [cs:buflinear],eax ; linear address of head.S now
142: mov ax,[buffer+delta+251h] ; should be jmp far dword (ofs, seg)
143: cmp ax,0ea66h
***** MT86__~1.ASM
137: add [cs:buflinear],eax ; linear address of head.S now
138: mov ax,[buffer+251h] ; should be jmp far dword (ofs, seg)
139: cmp ax,0ea66h
*****

***** MT86LDR.ASM
154: mov eax,[cs:buflinear]
155: mov [buffer+delta+253h],eax ; patch the protected mode entry jump
156: ; (offset only - segment selector unchanged: flat linear CS)
***** MT86__~1.ASM
150: mov eax,[cs:buflinear]
151: mov [buffer+253h],eax ; patch the protected mode entry jump
152: ; (offset only - segment selector unchanged: flat linear CS)
*****

***** MT86LDR.ASM
158: findgdt:
159: mov eax,[cs:buffer+delta+20ch] ; should be lgdt offset
160: and eax,00ffffffh
***** MT86__~1.ASM
154: findgdt:
155: mov eax,[cs:buffer+20ch] ; should be lgdt offset
156: and eax,00ffffffh
*****

***** MT86LDR.ASM
162: jnz gdtbug
164: mov ax,[cs:buffer+delta+20fh] ; GDTR contents pointer
165: mov bx,ax
***** MT86__~1.ASM
158: jnz gdtbug
160: mov ax,[cs:buffer+20fh] ; GDTR contents pointer
161: mov bx,ax
*****

RayeR(R)

Homepage

CZ,
12.06.2019, 02:43

@ Mercury127
 

MemTest 437/501/RH - my tries make exe variants

Maybe better way would be to look in grub4dos sources how it loads kernel images and make a minimum stub of it instead patching abandoned memtest dos loader.
BTW sometimes it happen to me that even working memtest.exe hangs at startup from dos and after hard reset it runs. So the loader is not very reliable. I observed this on verious mechines so it is not a specific HW quirk.

---
DOS gives me freedom to unlimited HW access.

Mercury127(R)

12.06.2019, 22:40

@ RayeR
 

MemTest 437/501/RH - my tries make exe variants

> Maybe better way would be to look in grub4dos sources how it loads kernel
> images and make a minimum stub of it instead patching abandoned memtest dos
> loader.
> BTW sometimes it happen to me that even working memtest.exe hangs at
> startup from dos and after hard reset it runs. So the loader is not very
> reliable. I observed this on verious mechines so it is not a specific HW
> quirk.

I think grub4dos is overkill for such task. Better try adopt loadlin...

RayeR(R)

Homepage

CZ,
22.06.2019, 00:28

@ Mercury127
 

MemTest 437/501/RH - my tries make exe variants

> I think grub4dos is overkill for such task. Better try adopt loadlin...

I meant to be inspired by grub kernel loader module (hope it's not large) to make own loader. I didn't try boot memtest via loadlin or linld but probably works as well.

---
DOS gives me freedom to unlimited HW access.

Back to index page
Thread view  Board view
15889 Postings in 1469 Threads, 269 registered users, 85 users online (0 registered, 85 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum