Re: A86: (no subject)


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

Re: A86: (no subject)




>     I was just wondering what the rom call for  "_data_size_to_de", is. 
Also, 
> 
>  what is it's function?

I don't know the address offhand, but the function is to get the pointer to 
the data in ahl right after calling _findsym (rst 10h).

  ld hl,varname-1
  rst 20h ;put in op1
  rst 10h ;_findsym
  call _DATA_SIZE_TO_DE
;de=size of prog/string
;ahl->first byte in data after the size word

An alternate way to do this:
  ld hl,varname-1
  rst 20h ;put in op1
  rst 10h ;_findsym
  ld a,b
  ex de,hl
  call _GET_DATA_SIZE_DE_INC
;same output

_DATA_SIZE_TO_DE uses the pointer to the vat which _findsym outputs, whereas 
_GET_DATA_SIZE_DE_INC uses ahl pointing to the start of the prog.  Sometimes 
you need to use the latter one, mainly if it isn't right after calling 
_findsym (which is pretty much the _only_ time the former is of any use).

Both of these equates are in Clem's include file: 
http://perso.wanadoo.fr/vasseur/Include.zip, which is a very thorough include 
file.