Log in

View Full Version : Vectors


_ColdMind
April 21st, 2004, 01:24
Hi all !
When I say vectors I think at strings, arrays and forces, ETC.
What want +ORC to say in his '97 tutorial with "save all vectors" and "vector compare". What are the vectors for a debugger ?? Is it about that IVT ? Or maybe I am confused.

Fake51
April 21st, 2004, 06:43
Quote:
[Originally Posted by _ColdMind]Hi all !
When I say vectors I think at strings, arrays and forces, ETC.
What want +ORC to say in his '97 tutorial with "save all vectors" and "vector compare". What are the vectors for a debugger ?? Is it about that IVT ? Or maybe I am confused.


ORC's on about DOS and real-mode. He's talking about S-Ice 2.80 (well, basically, the dos-version of s-ice, which are versions prior to 3.x, if memory serves me). And he's talking about the interrupt vectors, which are the addresses for interrupt handlers. The point is two-fold: a description of s-ice, and an introduction to some protection techniques. The last being hooking interrupt vectors for yourself, so your code has more control of the system.
Hope that helps some. Keep asking if it still eludes you.

Fake

naides
April 21st, 2004, 09:59
The concept of vector here is mathematically accurate. the Interrupt Vector table is a rectangular array of bytes. Each Row is a linear array of bytes (Vector) that point to a memory address, the first instruction of the interrupt handler code.

TBone
April 21st, 2004, 12:56
If I'm not mistaken, a "vector" is just what some programmers call a pointer. So a vector is just a byte/word/dword/etc. that contains the address of some data structure such as an object on the heap or the beginning of a stack frame.

Fake51
April 22nd, 2004, 08:18
Quote:
[Originally Posted by Naides]
The concept of vector here is mathematically accurate. the Interrupt Vector table is a rectangular array of bytes. Each Row is a linear array of bytes (Vector) that point to a memory address, the first instruction of the interrupt handler code.

Far as I remember, a vector is defined by a direction and a speed. As such, interrupt vectors fail to be vectors - they may have a direction, but they don't have a speed. Even the direction part of it is a bit off - normally, the direction is fixed (say, in terms of degrees), but in the case of interrupt vectors, the direction is dependent on where the interrupt is raised (when drawing vectors in 3D you represent the direction as to points in space - that gives you both the direction and the speed). The fact that the pointers make up an array does not make it more or less mathematically accurate.

As to the notion that "vectors" in this context is just what programmers denote a pointer, I suspect that is more or less true. However, I have only really heard "vectors" used when talking of interrupt vectors, and not of pointers in general. I could easily be mistaken, though.

Fake

TBone
April 22nd, 2004, 09:37
Well, if the vector consisted of a segment and offset, then I guess maybe you could say that those corrolate to direction and magnitude, but that's probably stretching it a little

I only say that the term "vector" is used as a synonym for "pointer" because I had a professor once who used it that way. He may well have been wrong. He was also one of the old computer hands from the 60s and 70s who was a) way smarter than literally almost everyone around him no matter where he went and b) knew the hardware level and the compilation process better than probably anyone I've met. Perhaps the term "vector" is just a "vintage" term and don't run into it much because of that. I can kind of see how it might originate from the drum memory days - i.e. the drum has to be rotated towards a particular direction before an address is read. *shrug*

naides
April 22nd, 2004, 10:27
Quote:
[Originally Posted by Fake51]Far as I remember, a vector is defined by a direction and a speed. As such, interrupt vectors fail to be vectors - they may have a direction, but they don't have a speed. Even the direction part of it is a bit off - normally, the direction is fixed (say, in terms of degrees), but in the case of interrupt vectors, the direction is dependent on where the interrupt is raised (when drawing vectors in 3D you represent the direction as to points in space - that gives you both the direction and the speed). The fact that the pointers make up an array does not make it more or less mathematically accurate.

As to the notion that "vectors" in this context is just what programmers denote a pointer, I suspect that is more or less true. However, I have only really heard "vectors" used when talking of interrupt vectors, and not of pointers in general. I could easily be mistaken, though.

Fake



http://www.math.montana.edu/frankw//ccp/multiworld/virtual/Vectors1/learn.htm
http://education.yahoo.com/reference/dictionary/entries/13/v0041300.html

I think vector here is defined as a one dimentional array of bytes

ie, int1 V == 00 08:80 09 A4 87

just as a vector in R3 is ( 1,4,5)

_ColdMind
April 23rd, 2004, 05:11
Quote:

Originally Posted by Fake51
Keep asking if it still eludes you.

I understand and maybe all these things about Intrerrupt Vector Table (IVT) was known by me but I swear I don't know how to save that vectors.

Fake51
April 23rd, 2004, 06:57
Quote:
[Originally Posted by _ColdMind]I understand and maybe all these things about Intrerrupt Vector Table (IVT) was known by me but I swear I don't know how to save that vectors.


It was a function in s-ice 2.80 - when saving the interrupts made sense (in dos real-mode). The point of saving the vectors was to be able to compare them to the vector table later - to see if any of the interrupts had been hooked.
I hope you're not trying to re-enact the first ORC tuts - the general knowledge in them applies, but the specifics are ... fairly outdated. While it may serve some personal interest to go through it, it would probably be more fruitful to find newer tuts+targets - note: didn't say the ORC pack isn't worth reading - but single-stepping thru them? Time can be applied in better ways.

@Naides:
I learnt my vector-math from 3d-calculations, and thought that was where vectors had their primary use (and, therefore, their primary definition). Nice to learn something new - cheers.

Fake

_ColdMind
April 25th, 2004, 04:08
Quote:
[Originally Posted by TBone]If I'm not mistaken, a "vector" is just what some programmers call a pointer. So a vector is just a byte/word/dword/etc. that contains the address of some data structure such as an object on the heap or the beginning of a stack frame.

I thought TBone want to say that a pointer is a bidimensional vector (linear array with two elements ??). Is this true ? Who tell Fake51 a vector is defined by a direction and a speed ... the speed is a vector dx/dt but not any vector need to have a speed.

Thanks a lot.
I found something that solve my problem: http://www.woodmann.net/forum/showthread.php?t=2936

Fake51
April 26th, 2004, 08:26
Quote:
[Originally Posted by _ColdMind]I thought TBone want to say that a pointer is a bidimensional vector (linear array with two elements ??). Is this true ?

Well, under dos there is two parts to the interrupt pointers: segment and offset. The two parts make up a dword (both segment and offset are word-sized). If this doesn't make sense to you, read up on real-mode and protected-mode.
However, pointers in general cannot be seen as bidimensional vectors - a pointer is merely an indicator, a direction, if you will. Exactly what the pointer is made of is another question.

Quote:

Who tell Fake51 a vector is defined by a direction and a speed ... the speed is a vector dx/dt but not any vector need to have a speed.

The speed of a vector can be zero, but the the definition of vectors (when used in physics and 3D-graphics) is speed and direction. Whether the actual speed of a vector is zero does not matter - since the vector is still defined in terms of a direction and movement in that direction.

Quote:

Thanks a lot.
I found something that solve my problem: http://www.woodmann.net/forum/showthread.php?t=2936

Nice to see the search button works.

Fake

Edit: far as I can tell, the info in the other thread is about interrupt structure under protected mode - which is ofcourse nice to know about, but a slightly different topic than what I think you were reading about.