Re: A86: Re: Re: Re: Re: Size of programs


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

Re: A86: Re: Re: Re: Re: Size of programs




rom method from v1.2
large vars might display the wrong size (if var size + vat entry >64k)
this works for all variable types
reading the name length out of op1 is better with no penalty

 rst     #10             ;findsym
 push    af              ;save var type for _DATASIZE
 dec     hl
 dec     hl
 dec     hl
 dec     hl
 dec     hl
 ld      a,(hl)          ;read name length out of vat (should use op1+1)
 ex      de,hl           ;_DATASIZE wants bhl->data
 add     a,#06           ;that constant (_DATASIZE adds length word if
needed)
 ld      e,a
 pop     af
 ld      d,#00
 push    de              ;save vat entry size
 call    #20dd           ;_DATASIZE = $477f
 ex      de,hl
 pop     bc
 add     hl,bc           ;add vat entry size
 xor     a               ;clear a -> should do this before the previous
add,
                         ;  then add 1 on carry
 call    #3ce7           ;_dispahl

-josh

On Sun, 12 Dec 1999 19:38:43 EST ComAsYuAre@aol.com writes:
>
>Hmm one byte smaller :P
>
>    rst 10h
>    call _DATA_SIZE_TO_DE
>    ld a,(_OP1+1)
>    add a,8                 ;constant is 8
>    ld l,a
>    xor a
>    ld h,a
>    add hl,de
>    call _dispAHL           ;_dispHL in Clem's files
>
>In a message dated 12/12/99 19:34:49 Eastern Standard Time, 
>ComAsYuAre@aol.com writes:
>
>>     rst 10h
>>      call _DATA_SIZE_TO_DE
>>      ex de,hl
>>      ld a,(_OP1+1)
>>      add a,8                 ;constant is 8
>>      ld e,a
>>      xor a
>>      ld d,a
>>      add hl,de
>>      call _dispAHL           ;_dispHL in Clem's files
>
>
>
>----
>Jonah Cohen
><ComAsYuAre@aol.com>
>http://linux.hypnotic.org/~jonah/
>

___________________________________________________________________
Why pay more to get Web access?
Try Juno for FREE -- then it's just $9.95/month if you act NOW!
Get your free software today: http://dl.www.juno.com/dynoget/tagj.