: : : : since i sighned in only today
: : : : i have questions in 3 deferent subjects that i didnt resolved in
: : : : the few last weeks.
: : : : ill be glad to recieve an answer.
: : : :
: : : :
: : : : 1) about interrupt creation:
: : : :
: : : : i found a that throught it i found what interrupts are being used and what are free without any program/hardware who use them.
: : : : i tryed to replace the interrupt from an interrupt procedure of my own.
: : : :
: : : : here what i did.
: : : :
: : : :
: : : :
: : : : program setsbwav;
: : : : uses Dos,crt;
: : : : var
: : : : pt : pointer;
: : : :
: : : : {$F+,S-,W-}
: : : : Procedure int60; Interrupt;
: : : : Begin
: : : : write(' hi ');
: : : : End;
: : : : {$F-,S+}
: : : :
: : : : begin
: : : : clrscr;
: : : : GetIntVec($60,pt);
: : : : SetIntVec($60,@int60);
: : : : intr($60,reg);
: : : : {here it should of write hi many time until i press}
: : : : {a key - but it wrote hi only once}
: : : : readkey;
: : : : SetIntVec($60,@pt);
: : : : end.
: : : :
: : : : ill be glad to recieve an answer soon.
: : : :
: : : :
: : : : ill be very very glad to finally figer these out.
: : : : thenk you very much to the man who answer this long letter (sorry for the size).
: : : : dolev
: : : :
: : : :
: : : :
: : : You can create an EMS array up-to the maximum size of the EMS memory, as long as the individual elements aren't larger than 64k. Instead of dumping an heap array into the EMS memory, I would suggest that you use it element for element. This way it is quite simple to overcome the 64k barrier of Pascal (or even the 640k heap size). If each element has the same size, the position of the i-th element is easy to calculate:
: : :
: : : ElementPos(i) = i * ElementSize
: : :
: : : This way the EMS memory acts as a zero-indexed array. The steps of setting the i-th value are simple:
: : :
: : : 1: Seek ElementPos(i)
: : : 2: Set Element
: : :
: : : Reading a value is the same, but uses "Get Element" instead of "Set Element". The number of elements is easily calculated by using:
: : :
: : : ElementCount = EMSStream Size div ElementSize
: : :
: : : and an element position setting a value at the ElementCount-th position allows you to add elements to the array.
: : : As for what you can do with this is almost only limited by your imagination, and of course the EMS memory size. As for its potential over pointers: The maximum usable memory size you can access with pointers is around 400-500 kB. With the EMS memory you can use up to 16 MB of memory. The downside is that it is somewhat slower than pointers.
: : :
: : Hi !
: :
: : In your code you make an interrupt and you call it once : so your message is displayed only once - that's normal.
: :
: : Maybe there is a confusion in your mind between
interrupt 60h and
port 60h ? You may read port 60h to get the code of the last pressed or released key.
: :
: : Am I wrong ?
: :
:
:
:
: i saw 2 interrupts (number $1C - clock interrupt and interrupt
: number sound blasters irq+8 (sound irq - in my computer specificly is 544). when i run them they repeat themselves in my entire program until i set the real interrupt back. but they are the only one who repeated themselves. i succeed making the sound port repeating itself by setting few variables to few ports (will succeed only to my sound blasters irq + 8). and the clock one i do not know why it succeeds... (no any special port variables needed...)
: meaning - im still confused...
: well thx anyway.
: dolev
:
: if interrupts do not repeat all the time - what special about them?
:
Interrupts interrupt the normal program flow to perform some processing. This is determined system-wide instead of process-wide. Thus an TSR program can hook an interrupt and be called during the execution of another program.
As for the code you gave the Intr() procedure only calls the interrupt once. In this case it is the same as calling Int60 directly.