ASM Question

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by freak.

Hi,

I never used ASM, but I've seen people doing this:

Can someone please post a short passage, how to
call an Interrupt with all the Registers and how to read
the output?

I've been using Interrupts in Qbasic, and it would be cool, if I
could use them in PB as well.

thanks,

Timo




A debugged program is one for which you have not yet found the conditions that make it fail.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

Forget to use interrupts (Dos-Interrupts) and Out/Inp ASM-directive directly, coz Windows(NT,2000,XP ) is in protected mode.
Also forget Qbasic and 32 Bit-WindowsSystems.
You have to use a external DLL to call Ports or Memory.See http://www.internals.com/ for further details.
In the german forum is more explained about this topic (See Profi-Section)


Its a long way to the top if you wanna .....CodeGuru
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by TronDoc.

I could be wrong, but it seems to me that regardless of
the process the program is running in; if you are using
the lowest level language (ASM/machine) you should be
able to circumvent the "protection" of protected modes...

elecTRONics DOCtor
{registeredPB}P150 32Mb w98/DOS/Linux NO DirX NO IE :wink:
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

I've heard about this interrupt limitation in latest Windows versions. So, from now on, you must use the API and only the API to make things work, even if it's slower.

Bye,

El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.
I could be wrong, but it seems to me that regardless of
the process the program is running in; if you are using
the lowest level language (ASM/machine) you should be
able to circumvent the "protection" of protected modes...

elecTRONics DOCtor
{registeredPB}P150 32Mb w98/DOS/Linux NO DirX NO IE :wink:
we have all done some discussion on this topic in the german forum.sorry about that, but Windows(NT,2000, XP ) and his further versions do not allow to hack Interrupts or Ports(in Memory) directly via asm-command.You have to write your own drivermodell do do this or use an existing like the link below i posted.If anyone can hack Interrupts and ports, the system will crashes too often(like Win3.2 or 95/98 does)There is only one Programm allowd to tackle for example the soundcard.And this Programm is a native driver.
@ElChoni Yes and Wrong.Use the Api as it is possible.Use a drivermodell to do such trickly things like hacking the hardware.
For now on, forget the older Win9x achitecture.
It's gone.
And for the future (in a few years) in .Net (DOT-NET) all harwaretechniqe has gone..........

btw. there are some trickly methods do tackle the (virtuelly) memory of anothers application.But that is another topic.....

Its a long way to the top if you wanna .....CodeGuru
Post Reply