View difference between Paste ID: yUx43prc and vtqfswwS
SHOW: | | - or go back to the newest paste.
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-
 jr c,create
9+
10-
 ; ld hl,op1             ; I belive i need to do this for delvararc.
10+
  jr c,create
11
  bcall(_DelVarArc)   ;delete if since it exists
12
Create: 
13-
  
13+
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