RE: A92: 256K & interrupt routines
[Prev][Next][Index][Thread]
RE: A92: 256K & interrupt routines
At 11:19 AM 10/26/97 +0100, Jean-Jacques MICHEL wrote:
>$1E0064 would be the highest address possible...
>
>(Would allow 1.9 MByte of SRAM !!!)
Nope. It would have to be $1C0064. And that's assuming that upgrades beyond
256KB (if they are even possible) would check *all* the upper bits. If they
didn't, then you'd need to use $100064, which of course wouldn't work with
2MB.
I would suggest biting the bullet. Just temporarily turn off the memory
protection bit! It'll give you peace of mind. You won't have to worry about
possible future TI-92's that have 2MB of RAM. Or even ones that have 256KB
of RAM but do checking on *all* the address bits.
; hook interrupt 1
move.w #$2700,sr
move.l $64,old_int_1
bclr.b #2,$600001
move.l #int_1_hook,$64
bset.b #2,$600001
move.w #$2000,sr
; unhook interrupt 1
move.w #$2700,sr
bclr.b #2,$600001
move.l old_int_1,$64
bset.b #2,$600001
move.w #$2000,sr
Or if you *really* want to be a step ahead, make it User Mode compatible:
; hook interrupt 1
move.w #$0700,d0
trap #1
move.l $64,old_int_1
bclr.b #2,$600001
move.l #int_1_hook,$64
bset.b #2,$600001
trap #1
; unhook interrupt 1
move.w #$0700,d0
trap #1
bclr.b #2,$600001
move.l old_int_1,$64
bset.b #2,$600001
trap #1
(Fargo II programs will run in User Mode rather than Supervisor Mode.)
---
David Ellsworth
davidell@earthling.net
IRC: eXocomp
ICQ: 2300673
References: