Article View: demon.tech.amiga
Article #429Re: Ten-minute timer ... How?
From: Dave Beames
Date: Mon, 15 May 2000 00:00
Date: Mon, 15 May 2000 00:00
82 lines
3936 bytes
3936 bytes
Sorry for the delay -- I've been away for 4 days. This was exactly (most of) what I needed to know :-) Dave Sparks wrote: > >>>>> "DB" == Dave Beames <dave@beames.demon.co.uk> writes: > > DB> Dave Sparks wrote: > >> >>>>> "DB" == Dave Beames <dave@beames.demon.co.uk> writes: > >> > DB> I've just started trying to un-cripple a small text editor > > >> Does the code have any comments in it? > > DB> Er ... all I have is the binary, disassembled. > > That does make things rather difficult. > > You need to look for a call to OpenDevice (execbase-1bc) where A0 > contains the address of a string "timer.device". Note where A1 is > pointing when this call is made - this is the timer request block. OK, found those. > The you need to find the call to DoIO (execbase-1c8) where this > request block (or a copy of it :( ) is used to set up the time > request. This is strange. There is only *one* occurrence of "-$1C8" in the whole (disassembled) program, and that doesn't use 4 as an address. I wondered if it might be a copy of 4, but I've tried to trace the palce where he set tha address up, and it ain't simple. > CMD_NONSTD (9) will have been moved to the 16-bit word > at offset 94 (decimal) of the structure, and the time interval in > seconds will have been moved to the 32-bit word at offset 98 (I > don't guarantee that these offsets have been calculated > correctly). The offsets seem to be $1C & $20 (dec 28 & 32), but apart from that it appears as you say. He puts the addr of the request block in A0, then MOVE.W #$9,$1C(A0) and MOVE.L #$258,$20(A0) $258 is 600 (10 mins), so it seems that he's doing it with a literal, which *should* make it easy for me. > Patch out this DoIO call, and hope for the best. As I said, I can't find one. Maybe the disassembler got confused. Maybe it doesn't matter. > Try changing the timeout to 20971520 seconds, or thereabouts.) I don't know how many bits I'm allowed to do with a literal, but even FFFF should serve my purpose adequately -- I don't often do edits for more than 18 hours :-) But now I've hit a wall. I have a "guide" to 68K assembler, but though it tells me what all the instructions are and how to use them, the damn thing says nothing whatsoever about what they look like after assembly. So, I know that the instruction that I need to alter is the MOVE.L above, and that it occurs approx halfway between F11C and F1B8, but my disassembler *only* gives addresses which are addressed (IYSWIM), so I don't know the addresses of the individual instructions between those two labels. I've looked at the area with NewZAP till I'm blue in the face, but I can't see anything helpful. Can anyone PLEASE tell me what the instruction MOVE.L #$258,$20(A0) would look like in hex after assembly? > Since OpenLibrary is in exec.library , exec.library can't be > opened (its base address has to be fetched from absolute address > 4). Apart from this, exec.library follows all the normal calling > conventions. Of course. I knew 4 held something important, but forgot what. Many thanks -- I'm nearly there :-) DaveB
Technical Details
Message-ID:
<200005152120.0psp@beames.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<200005062051.0pmo@beames.demon.co.uk> <N.20000507.jowb@sisyphus.demon.co.uk> <200005072238.0pnt@beames.demon.co.uk> <N.20000509.hxtb@sisyphus.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1160fd,f0022bbe48f936f5 X-Google-Attributes: gid1160fd,public From: dave@beames.demon.co.uk (Dave Beames) Subject: Re: Ten-minute timer ... How? Date: 2000/05/15 Message-ID: <200005152120.0psp@beames.demon.co.uk> X-Deja-AN: 623772988 X-Mail2News-Path: news.demon.net!anchor-post-33.mail.demon.net!beames.demon.co.uk References: <200005062051.0pmo@beames.demon.co.uk> <N.20000507.jowb@sisyphus.demon.co.uk> <200005072238.0pnt@beames.demon.co.uk> <N.20000509.hxtb@sisyphus.demon.co.uk> X-Trace: mail2news.demon.co.uk 958424066 mail2news:19249 mail2news mail2news.demon.co.uk Organization: the Top of our Stairs Newsgroups: demon.tech.amiga X-Complaints-To: abuse@demon.net