Looking for info about INT12h, mem tools and copy tools (Miscellaneous)
> Hi,
>
> While searching for the smallest mem like tools that can output
> conventional memory in bytes, I decide to look how it's done.
>
> So I take a look to MEMSTAT from Japheth (in the JEMM package) because of
> the size of the source that it's easier for a skillless like me... and so I
> found the INT12h(AX) but it give the memory in KB only. And all the
> interrupt list I parse only speak of Kb none of bytes.
>
> Can someone point me on some documentation that explain how this info is
> retrieve ?
>
> And If you have a small tools that can display conventional memory in bytes
> and all the others infos, it will be appreciate thanks. (I use mi.com for
> the moment https://www.hiren.info/downloads/dos-files).
>
> In parallel, I was looking for an external copy tools because one of the
> kernel I test (Paragon dos 7.01) give sharing buffer overflow when I
> install a ramdisk. I test VCOPY.COM (2KB) but big file give CRC error, so I
> use XCOPY (16Kb) while waiting to find for a smaller tools, if you have any
> suggestion ?
>
> Thanks
Int 12h returns the content of the word (in KB) from address 0040h:0013h. To convert KB to bytes, multiply by 1024 (shl 10). Usually it is 640KB. In order for this value to fit in a word, it is given in KB and not in bytes. Some programs can use this memory by reducing it, for example, by 4KB. This was done by some viruses that transferred when booting from an infected disk, or by running an infected program.
Look for MCBs (Memory Control Blocks) on the internet.
Format of DOS memory control block:
Offset Size Description (Table 01628)
00h BYTE block type: 5Ah if last block in chain, otherwise 4Dh
01h WORD PSP segment of owner or special flag value (see #01629)
03h WORD size of memory block in paragraphs
05h 3 BYTEs unused by MS-DOS
(386MAX) if locked-out block, region start/prev region end
---DOS 2.x,3.x---
08h 8 BYTEs unused
---DOS 4.0+ ---
08h 8 BYTEs ASCII program name if PSP memory block or DR DOS UMB,
else garbage
null-terminated if less than 8 characters
Notes: the next MCB is at segment (current + size + 1)
under DOS 3.1+, the first memory block is the DOS data segment,
containing installable drivers, buffers, etc. Under DOS 4.0+ it is
divided into subsegments, each with its own memory control block
(see #01633), the first of which is at offset 0000h.
for DOS 5+, blocks owned by DOS may have either "SC" or "SD" in bytes
08h and 09h. "SC" is system code or locked-out inter-UMB memory,
"SD" is system data, device drivers, etc.
Some versions of DR DOS use only seven characters of the program name,
placing a NUL in the eighth byte.
Complete thread:
- Looking for info about INT12h, mem tools and copy tools - nico7550, 21.07.2023, 21:15
- Looking for info about INT12h, mem tools and copy tools - CandyMan, 21.07.2023, 22:51
- Looking for info about INT12h, mem tools and copy tools - nico7550, 22.07.2023, 09:35
- Looking for info about INT12h, mem tools and copy tools - Rugxulo, 25.07.2023, 01:38
- Looking for info about INT12h, mem tools and copy tools - nico7550, 26.07.2023, 12:49
- Looking for info about INT12h, mem tools and copy tools - marcov, 26.07.2023, 17:18
- Looking for info about INT12h, mem tools and copy tools - Rugxulo, 25.07.2023, 01:38
- Looking for info about INT12h, mem tools and copy tools - nico7550, 22.07.2023, 09:35
- Looking for info about INT12h, mem tools and copy tools - CandyMan, 26.07.2023, 14:24
- Looking for info about INT12h, mem tools and copy tools - CandyMan, 21.07.2023, 22:51