[A83] Re: Writeback


[Prev][Next][Index][Thread]

[A83] Re: Writeback




You need to take the 2 bytes before the program data in account too.

i think the following code is needed to get the right hl value (untested!!!)


push whatever you still need
-see that your progs name is in op1
bcall(_chkfindsym)

inc de    ; skip size bytes and Binary AsmPrgm Token
inc de
inc de
inc de


ld hl label_to_write_to - 9d95h     ; you can do - 9d91h instead of the 4 inc's
above for optimization
add hl,de
pop whatever you still need

write happily to hl ever after

--Peter Martijn




Hyperbyte wrote:

> D Weiss wrote:
>
> > If the program runs with the Asm( [////////////////////////], then it won't
> > write back.
>
> I think it depends whether you use the Asm( command to run a squished program
> or not.
>
> --Peter Martijn
>
> >
> > If you are using ASHELL, SOS, ION, CrASH, or any other major shell, then
> > that's it.  Writeback!
> >
> > >From: Gavin Olson <gtolson@snet.net>
> > >Reply-To: assembly-83@lists.ticalc.org
> > >To: assembly-83@lists.ticalc.org
> > >Subject: [A83] Writeback
> > >Date: Mon, 26 Mar 2001 14:46:35 -0500
> > >
> > >
> > >My current project does this to writeback:
> > >
> > >ld hl,label
> > >ld (hl),a
> > >
> > >to write a to the label.  It works, but it seems too easy.  Is there some
> > >adverse consequence that i am not noticing?  I always thought it was harder
> > >than that.
> > >
> > >
> > >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com






References: