News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

can't copy first 16 bytes of IVT

Started by guyenMasm, March 10, 2007, 01:05:20 AM

Previous topic - Next topic

guyenMasm

When I copy the 256 int vectors to differnet location in memory, first 16 bytes are always different values and rest are copied correctly. Anyone knows why?

MichaelW

What sort of environment are you doing this under?

In at least some cases some versions of Windows and the some 386 memory-managers will map special values into locations in the bottom 1MB of the address space as a way of controlling what happens there. I can't recall noticing this being done with the interrupt vectors, but I have seen it done with the BIOS JMP to power-up entry point (FFFF0h). Testing with DEBUG just now under MS-DOS, the code at that location is:

JMP F000:E05B

Which looks very normal, but on the same system under Windows 98 FE the code at that location is:

INT 19

And if you are trying to compare the interrupt vectors read from custom boot code, to the interrupt vectors read after DOS, or some other OS that hooks interrupt vectors, loads, they should be different.
eschew obfuscation

guyenMasm

well typically bottom of 1mb should contain the real mode int vectors right?  If you put something different then it screws up because first 16 bytes contain crucial interrupts vectors. But when I copy it in real or virtual mode copied byte in register is not the same as the value in the memory for first 16 bytes, which perplexed me. That was my point.

MichaelW

Comparing the first vectors under Windows 98 FE to the same under Windows 98 MS-DOS mode there are differences.

Under Windows 98 FE:

0000:0000  FB 00 00 00 65 04 70 00-16 00 2F 05 65 04 70 00   ....e.p.../.e.p.
0000:0010  65 04 70 00 54 FF 00 F0-A3 AE 00 F0 53 FF 00 F0   e.p.T.......S...
0000:0020  00 00 00 C8 28 00 2F 05-3A 00 2F 05 52 00 2F 05   ....(./.:./.R./.
0000:0030  6A 00 2F 05 82 00 2F 05-9A 00 2F 05 65 04 70 00   j./.../.../.e.p.
0000:0040  07 00 70 C8 4D F8 00 F0-41 F8 00 F0 27 25 5F FD   ..p.M...A...'%_.
0000:0050  39 E7 00 F0 40 02 0F 02-2D 04 70 00 28 0A 12 03   9...@...-.p.(...
0000:0060  59 FF 00 F0 2F 00 F0 05-6E FE 00 F0 04 06 12 03   Y.../...n.......
0000:0070  1D 00 00 C8 A4 F0 00 F0-22 05 00 00 6C 0F 00 C0   ........"...l...


Under Windows 98 MS-DOS mode:

0000:0000  FB 00 00 00 65 04 70 00-16 00 2F 05 65 04 70 00   ....e.p.../.e.p.
0000:0010  65 04 70 00 54 FF 00 F0-A3 AE 00 F0 53 FF 00 F0   e.p.T.......S...
0000:0020  BF 2C CA 08 28 00 2F 05-3A 00 2F 05 52 00 2F 05   .,..(./.:./.R./.
0000:0030  6A 00 2F 05 82 00 2F 05-9A 00 2F 05 65 04 70 00   j./.../.../.e.p.
0000:0040  2B 26 CA 08 4D F8 00 F0-41 F8 00 F0 40 04 01 06   +&..M...A...@...
0000:0050  39 E7 00 F0 40 02 0F 02-2D 04 70 00 28 0A 12 03   9...@...-.p.(...
0000:0060  59 FF 00 F0 2F 00 F0 05-6E FE 00 F0 04 06 12 03   Y.../...n.......
0000:0070  53 FF 00 F0 A4 F0 00 F0-22 05 00 00 6C 0F 00 C0   S......."...l...


eschew obfuscation

guyenMasm

well, my code is running in DOS and so I really dont need to look at virtual mode.