Re: A83: Resize a program...
[Prev][Next][Index][Thread]
Re: A83: Resize a program...
Try removing the 'inc de' before the call to
'InsertMem'. You are inserting 1 byte into whatever
data follows your program. If this doesn't work
I'll look at it on my simulator.
Later,
Pat
Sebastiaan Roodenburg wrote:
>
> Hi!
>
> After reading Patrick's message, i've changed my code to:
>
> Main: ld hl,file
> rst 20h
> call _chkfindsym
> ld h,d
> ld l,e
> call _ldhlind
> push hl
> inc de
> inc de
> add hl,de
> ex de,hl
> ld hl,20
> inc de
> call _insertmem
> ld hl,file
> rst 20h
> call _chkfindsym
> pop hl
> ld bc,20
> add hl,bc
> ld a,l
> ld (de),a
> inc de
> ld a,h
> ld (de),a
> ret
> file: .db 05,"TEST",0
>
> But the INSERTMEM still doesn't work... it changes the size-word of the
> file, so the file gets 20 bytes larger, but now it screws up the data
> behind the program...
>
> grtx,
>
> Sebastiaan Roodenburg
> sebastiaan@rimsystems.nl
>
> -------------------------------------------------------------------------------
>
> Part 1.2 Type: application/ms-tnef
> Encoding: base64
References: