Geekboy

Untitled

Feb 20th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DeleteAndCreate
  2. ;expects pointer to variable name in hl
  3. ;destroys all
  4. ;returns pointer to variable data in de
  5.  rst 20h  ;load op1 with variable name
  6.  rst 18h  ; save op 1 to the FPS
  7.  ; Only need to save it if we are calling a delete as it survives chkfindsym
  8.  bcall(_chkfindsym)
  9.  push af
  10.   jr c,create
  11.   bcall(_DelVarArc)   ;delete if since it exists
  12. Create:
  13.   bcall(4390h) ;Popop1
  14.  pop af               ; restore A which has the element type in it.
  15.  and 1fh
  16.  cp 1
  17.  ld hl,(RVarLength)
  18.  jp z,CreateRList
  19.  bcall(_createvar)
  20.  ret
  21. CreateRlist:
  22.  bcall(_CreateRList)
  23.  ret
Advertisement
Add Comment
Please, Sign In to add comment