[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ninja Force Assembler
- Subject: Re: Ninja Force Assembler
- From: Forrest <forrest@ns1.net-gate.com>
- Date: 1996/03/31
- Newsgroups: comp.sys.apple2
- Organization: InterNET-GATEway news site
- References: <199603311841.NAA01044@wabakimi.carleton.ca>
On Sun, 31 Mar 1996, Michael Quattrocchi wrote:
> > Those who want to use it, however, should have a look at the code at
> > $45CA ($25CA in the file NF.AS.ED); the /RAM disconnect routine is a
> > bit odd and fails to decrement DEVLST, which will cause problems. Quit
> > the NFA and run SHRINKIT, and watch the latter crash when you
> > use OA-O to list volumes.
> > I've patched my copy and am waiting to see whether this was a mistake.
>
> could you send me details on how to patch it?
> thanks!
Since I'm not sure whether my patch breaks something else (it
doesn't seem to, but I don't know for sure) I'll just provide a
different means to the same end.
Cut this and save it as a text file, then use it as an EXEC
file to start the assembler. It disconnects the /RAM driver properly
before NF.AS.ED sees it.
--------
CALL-151
300:AE 31 BF BD 32 BF 29 70 C9 30 F0 05 CA 10 F4 30
310:1A BD 33 BF 9D 32 BF F0 03 E8 D0 F5 AD 10 BF 8D
320:26 BF AD 11 BF 8D 27 BF CE 31 BF 60
PREFIX NF.ASSEMBLER
REM or whatever prefix is appropriate
-NF.AS.ED
---------
Here is the source code, which is Apple's standard routine with
parts removed (as /RAM isn't going to be reconnected anyway, doing
all the fiddly bits seemed like too much work).
NODEV = $BF10 ;no device connected vector
DEVADR32 = $BF26 ;/RAM driver
DEVCNT = $BF31 ;how many devices
DEVLST = $BF32 ;list of devices
ORG $300
LDX DEVCNT ;look for /RAM type device
:1 LDA DEVLST,X
AND #$70
CMP #$30
BEQ FOUND
DEX
BPL :1
BMI CONT
FOUND LDA DEVLST+1,X ;got one, copy other devices over it
STA DEVLST,X
BEQ DISCON
INX
BNE FOUND
DISCON LDA NODEV ;show it as disconnected
STA DEVADR32
LDA NODEV+1
STA DEVADR32+1
DEC DEVCNT ;one fewer device
CONT RTS