Re: A86: on interrupt
[Prev][Next][Index][Thread]
Re: A86: on interrupt
Why cant you make a program that will run a basic program on startup?
someone suggested having a basic program run when the calc was turned on,
kind of like a autoexec.bat file, and Kirk Meyer was going to make a
program to do this; but I emailed him about it a couple weeks ago and he
said that you can't run a basic program on startup.
Andy S Johnson wrote:
> Do this:
>
> _USER EQU $d48f
> _BIT EQU 3
> install:
> res _BIT,(iy+$23) ;turn user routine off so it won't get called by
> ;accident before we're ready
> ld hl,user ;copy prog to user buffer
> ld de,_USER+1
> ld bc,200
> ldir
> ld a,(_USER+1) ;set up checksum byte
> ld hl,_USER+($28*1)
> add a,(hl)
> ld hl,_USER+($28*2)
> add a,(hl)
> ld hl,_USER+($28*3)
> add a,(hl)
> ld hl,_USER+($28*4)
> add a,(hl)
> ld hl,_USER+($28*5)
> add a,(hl)
> ld (_USER),a
> set _BIT,(iy+$23) ;turn it on
> ret
> user:
> push af
> push bc
> push de
> push hl
> ;your program goes here
> pop hl
> pop de
> pop bc
> pop af
> ret
>
> ---
> Andy Johnson
> "Change is inevitable...
> except from vending machines"
>
> On Mon, 30 Mar 1998 18:40:29 +0200 Scalp <Scalp@bigfoot.com> writes:
> >
> >can someone explain me how does the on interrupt work
> >I think I can load my prog in user memory and set some flag, but I
> >don't
> >know how...
> >
> >Thanx
> >Nicolas
> >
> >
>
References: