delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/04/11:05:38

From: Alexander Gottwald <ago AT informatik DOT tu-chemnitz DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: strange irets
Date: Thu, 04 Jun 1998 16:23:17 +0200
Organization: TU Chemnitz
Lines: 35
Message-ID: <3576ADD5.11772433@informatik.tu-chemnitz.de>
NNTP-Posting-Host: samoa.informatik.tu-chemnitz.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello

I want to write a sort of a trainer for a game.
I tought to call my code in this way:

hook a proc in interrupt 1c (periodic interrupt)
 there it's checked a) if i'm already inside my code (using a state_var)
or in the original proc.
		    b) if the hotkey is pressed.
 if im coming from the original prog and the hotkey is pressed, i want
to save the old prog. registers
 from the stack (pushed there before jumping into my interrupt code) and
set it with other values, pointing to my
 trainer proc.
 after iret, the processor should jump int my code.
 here the game data is edited. because of i'm not anymore in a interrupt
code, i can call other ints and use libc code.
 after exiting my code, another interrupt is called (some of the user
interrupts) and the old registers (save from stack)
 are restored in the stack.
 the following iret jumps back into the original prog.

is it possible  a) to change the registers on the stack
		b) to change the iret adresses

or is there any fault in my idea.

-- 
#######################################################
# Alexander DOT Gottwald AT informatik DOT tu-chemnitz DOT de        #
# http://www.informatik.tu-chemnitz.de/~ago           #
#                                                     #
# Soldaten sind Moerder -                             #
# Zivilisten ihre ersten Opfer                        #
#######################################################

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019