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 | bcall(_chkfindsym) | |
| 7 | jr c,create | |
| 8 | ; ld hl,op1 ; I belive i need to do this for delvararc. | |
| 9 | rst 18h ; save op 1 to the FPS | |
| 10 | - | bcall(_DelVarArc) ;delete if since it exists |
| 10 | + | ; Only need to save it if we are calling a delete as it survives chkfindsym |
| 11 | push af | |
| 12 | bcall(_DelVarArc) ;delete if since it exists | |
| 13 | bcall(4390h) ;Popop1 | |
| 14 | pop af ; restore A which has the element type in it. | |
| 15 | Create: | |
| 16 | and 1fh | |
| 17 | cp 1 | |
| 18 | ld hl,(RVarLength) | |
| 19 | jp z,CreateRList | |
| 20 | bcall(_createvar) | |
| 21 | ret | |
| 22 | CreateRlist: | |
| 23 | bcall(_CreateRList) | |
| 24 | ret |